diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Revision history for grapesy
+
+## 1.0.0 -- 2025-01-22
+
+* First released version.
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,31 @@
+Copyright (c) 2023-2025, Well-Typed LLP and Anduril Industries Inc.
+
+All rights reserved.
+
+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 Well-Typed LLP, the name of Anduril
+      Industries Inc., nor the names of other 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.
diff --git a/data/grpc-demo.key b/data/grpc-demo.key
new file mode 100644
--- /dev/null
+++ b/data/grpc-demo.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCnQR2GHEAcQIoK
+LL0AdELGNoxw8UFIGLv3QHJH21znxXYL5RPNQc8MC0eoa/QTHHDTvuJ8C6l/7q0D
+CDGdDF/gGBN0fSRsTQNPlC8RwdXI6ulw0jVPmjlTtAb1+L3k6AEV0smv87EPcLpv
+zCpsZbH9Ouew1l+WCP0unTR5GYw4Zdv9vWMHdrIGPmpGwZn3hfALKkrHOsrrdb5n
+iYa05JQi+YcfNmYF8gmSR8GA+2A3VL0itKN7/caBXuBKcvsBkExG/Ov1Vya+pdWc
++N+m1eazBjVm0VarZLv4DMcWNTWed1EULe52a8KAo14FlEDqhJsmmEJiZvzka5TL
+z5stsn7rAgMBAAECggEAUgqDw+wJmpIh5BnL3/QnaPkK7L+6qPXRBdhr9klpCht2
+6yDEFNPqDttdnATQJau2wHcKu5Qw4Zse7LTROVr/kHne2S4ldqZUMG3cpNYy2qo4
+Neo20kQxSJivLWqFI0qWdbD+07syqANAwGQijydXJoMFcV3GZ18jagEc4yYf/O1W
++C8ooKg8/ThBaeUcRYpFWmBckgcvGFcVWMTjweoDZrzC0Bd+WhPykDlM/B6m/LjB
+8kn7goV5iPSD8RICooJocLN2Nc2NW+LXrUw5VY3nlbLRGHDs4Qe30bJoU2b6PyXv
+NDpEbOZrgERoopsI76dpCeDQ/bp06mHTEYEqrghYuQKBgQDQ4qWGkfkG3T5na+u1
+4t5ME+3mwtW34Te/wwUVUStzdg7IelzLx0+qzfINTTW1pvj93gbeVK1vGvTzzIE9
+2AdwxjffV5/woNUMH3vTr1qPRkJvJu+xwneu9PKyLhQHfXMkD0p6jltjBmbvBRCE
+KB+5WYc9FEA8kP44RFOcOPXzvQKBgQDM+qIfn7bI+LdEq9jgOqr6XyUVCnT58W9I
+ZJ30GkdDoP6TwxnAlX8wzwXURH+KIDxJTD6eS8lSOnaYK668sDIWo3OBLK1Fkemi
+7BfZvkNDEtKcpYa9PQv5VtPUBbghK+ae7TGNge8xtMy9TmIu4rT05ynsYibjtWlB
+trq8/EcTxwKBgBvWeLTMc2GkzpI94bXlvDZrWYMtaAoPa7yUovLKVH4Yt7OkCwXl
+VAqxU5bOOWAyFnDOzB+JLWvnLcnn8TlqtuMip4OOS/Rnmrz43SnC7tC1Tlk92SfZ
+gNXCMy3n0ieFYnjlyMk4e5lg2wrzo9XY+xFaixlqv3zS3e5lvLbPKIgJAoGBAIep
+zgleHIzQyAMENaraSXUh6ZoObLNMDtn79eqsRcRF1pgXRYEHsMGuEu6VU1Ao252r
+f7om8JyiowE90A2EE/KVxYmV9ywXUWmKFpL/cOcAmzIf/5hZwgYJaHNoQaB6vM0s
+sWI1wAjG38bfDO55D0kTgdS4dYK5+2sJtHgGBEjbAoGAe0F+xVCikKwhPWJM/GlC
+heTQDapyOV4/TZE2K/VP+ViO4d5CUr6K5qGVtHDDu/XQTaTbiN5CuuP5lvoPwfPF
+L/RULhCv5kdyrlsTZwBofuruxxU5RGPKRREMq5aXqqmQWru1SS05ekdAf8cNoXRL
+m7oXwgfow5GNg6OjduxfhUI=
+-----END PRIVATE KEY-----
diff --git a/data/grpc-demo.pem b/data/grpc-demo.pem
new file mode 100644
--- /dev/null
+++ b/data/grpc-demo.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDCTCCAfGgAwIBAgIUbt4YUTJ3u4cwD1ZrXl7AU792K5AwDQYJKoZIhvcNAQEL
+BQAwFDESMBAGA1UEAwwJMTI3LjAuMC4xMB4XDTI0MDYxNDEwNDcxNVoXDTI1MDYx
+NDEwNDcxNVowFDESMBAGA1UEAwwJMTI3LjAuMC4xMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAp0EdhhxAHECKCiy9AHRCxjaMcPFBSBi790ByR9tc58V2
+C+UTzUHPDAtHqGv0Exxw077ifAupf+6tAwgxnQxf4BgTdH0kbE0DT5QvEcHVyOrp
+cNI1T5o5U7QG9fi95OgBFdLJr/OxD3C6b8wqbGWx/TrnsNZflgj9Lp00eRmMOGXb
+/b1jB3ayBj5qRsGZ94XwCypKxzrK63W+Z4mGtOSUIvmHHzZmBfIJkkfBgPtgN1S9
+IrSje/3GgV7gSnL7AZBMRvzr9VcmvqXVnPjfptXmswY1ZtFWq2S7+AzHFjU1nndR
+FC3udmvCgKNeBZRA6oSbJphCYmb85GuUy8+bLbJ+6wIDAQABo1MwUTAdBgNVHQ4E
+FgQUM565CtSaHBunw9mQnq1/apbCsL4wHwYDVR0jBBgwFoAUM565CtSaHBunw9mQ
+nq1/apbCsL4wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAEiX4
+8xBfkSl6R5sTYpP0eRRTiG0x+tG1hsTLYWbsCQIiUi5gIZm6CnQ25NO4FJ4J623p
+NIM1pfJP44J/7kOzhquLLBX5t9UjWsJdyh/IqRkj4Y3ZZqykLTUDOp9hpGRjXFnu
+Fjas/CCfhfZ/wfvUPUhR1sq843Py7AMnz39OsC9etkGTTlL0QZCteQzDaZ+Yrwwx
+SDMp1TpZQs6+7Gj8cvyrGt/GnCb8Wc6K03cYypdpVtTczl9ouxTXyyPeoVhKRCPv
+Z0JyJMdFuRmoNPnUq8WR08IvKADURaspLbv39X1rAOj8zhEWGwngLQ9LqF1jz4ee
+BOkxakzQa4lbLofyYQ==
+-----END CERTIFICATE-----
diff --git a/data/interop-ca.pem b/data/interop-ca.pem
new file mode 100644
--- /dev/null
+++ b/data/interop-ca.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDWjCCAkKgAwIBAgIUWrP0VvHcy+LP6UuYNtiL9gBhD5owDQYJKoZIhvcNAQEL
+BQAwVjELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
+GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1UEAwwGdGVzdGNhMB4XDTIw
+MDMxNzE4NTk1MVoXDTMwMDMxNTE4NTk1MVowVjELMAkGA1UEBhMCQVUxEzARBgNV
+BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
+ZDEPMA0GA1UEAwwGdGVzdGNhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEAsGL0oXflF0LzoM+Bh+qUU9yhqzw2w8OOX5mu/iNCyUOBrqaHi7mGHx73GD01
+diNzCzvlcQqdNIH6NQSL7DTpBjca66jYT9u73vZe2MDrr1nVbuLvfu9850cdxiUO
+Inv5xf8+sTHG0C+a+VAvMhsLiRjsq+lXKRJyk5zkbbsETybqpxoJ+K7CoSy3yc/k
+QIY3TipwEtwkKP4hzyo6KiGd/DPexie4nBUInN3bS1BUeNZ5zeaIC2eg3bkeeW7c
+qT55b+Yen6CxY0TEkzBK6AKt/WUialKMgT0wbTxRZO7kUCH3Sq6e/wXeFdJ+HvdV
+LPlAg5TnMaNpRdQih/8nRFpsdwIDAQABoyAwHjAMBgNVHRMEBTADAQH/MA4GA1Ud
+DwEB/wQEAwICBDANBgkqhkiG9w0BAQsFAAOCAQEAkTrKZjBrJXHps/HrjNCFPb5a
+THuGPCSsepe1wkKdSp1h4HGRpLoCgcLysCJ5hZhRpHkRihhef+rFHEe60UePQO3S
+CVTtdJB4CYWpcNyXOdqefrbJW5QNljxgi6Fhvs7JJkBqdXIkWXtFk2eRgOIP2Eo9
+/OHQHlYnwZFrk6sp4wPyR+A95S0toZBcyDVz7u+hOW0pGK3wviOe9lvRgj/H3Pwt
+bewb0l+MhRig0/DVHamyVxrDRbqInU1/GTNCwcZkXKYFWSf92U+kIcTth24Q1gcw
+eZiLl5FfrWokUNytFElXob0V0a5/kbhiLc3yWmvWqHTpqCALbVyF+rKJo2f5Kw==
+-----END CERTIFICATE-----
diff --git a/data/interop.key b/data/interop.key
new file mode 100644
--- /dev/null
+++ b/data/interop.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDnE443EknxvxBq
+6+hvn/t09hl8hx366EBYvZmVM/NC+7igXRAjiJiA/mIaCvL3MS0Iz5hBLxSGICU+
+WproA3GCIFITIwcf/ETyWj/5xpgZ4AKrLrjQmmX8mhwUajfF3UvwMJrCOVqPp67t
+PtP+2kBXaqrXdvnvXR41FsIB8V7zIAuIZB6bHQhiGVlc1sgZYsE2EGG9WMmHtS86
+qkAOTjG2XyjmPTGAwhGDpYkYrpzp99IiDh4/Veai81hn0ssQkbry0XRD/Ig3jcHh
+23WiriPNJ0JsbgXUSLKRPZObA9VgOLy2aXoN84IMaeK3yy+cwSYG/99w93fUZJte
+MXwz4oYZAgMBAAECggEBAIVn2Ncai+4xbH0OLWckabwgyJ4IM9rDc0LIU368O1kU
+koais8qP9dujAWgfoh3sGh/YGgKn96VnsZjKHlyMgF+r4TaDJn3k2rlAOWcurGlj
+1qaVlsV4HiEzp7pxiDmHhWvp4672Bb6iBG+bsjCUOEk/n9o9KhZzIBluRhtxCmw5
+nw4Do7z00PTvN81260uPWSc04IrytvZUiAIx/5qxD72bij2xJ8t/I9GI8g4FtoVB
+8pB6S/hJX1PZhh9VlU6Yk+TOfOVnbebG4W5138LkB835eqk3Zz0qsbc2euoi8Hxi
+y1VGwQEmMQ63jXz4c6g+X55ifvUK9Jpn5E8pq+pMd7ECgYEA93lYq+Cr54K4ey5t
+sWMa+ye5RqxjzgXj2Kqr55jb54VWG7wp2iGbg8FMlkQwzTJwebzDyCSatguEZLuB
+gRGroRnsUOy9vBvhKPOch9bfKIl6qOgzMJB267fBVWx5ybnRbWN/I7RvMQf3k+9y
+biCIVnxDLEEYyx7z85/5qxsXg/MCgYEA7wmWKtCTn032Hy9P8OL49T0X6Z8FlkDC
+Rk42ygrc/MUbugq9RGUxcCxoImOG9JXUpEtUe31YDm2j+/nbvrjl6/bP2qWs0V7l
+dTJl6dABP51pCw8+l4cWgBBX08Lkeen812AAFNrjmDCjX6rHjWHLJcpS18fnRRkP
+V1d/AHWX7MMCgYEA6Gsw2guhp0Zf2GCcaNK5DlQab8OL4Hwrpttzo4kuTlwtqNKp
+Q9H4al9qfF4Cr1TFya98+EVYf8yFRM3NLNjZpe3gwYf2EerlJj7VLcahw0KKzoN1
+QBENfwgPLRk5sDkx9VhSmcfl/diLroZdpAwtv3vo4nEoxeuGFbKTGx3Qkf0CgYEA
+xyR+dcb05Ygm3w4klHQTowQ10s1H80iaUcZBgQuR1ghEtDbUPZHsoR5t1xCB02ys
+DgAwLv1bChIvxvH/L6KM8ovZ2LekBX4AviWxoBxJnfz/EVau98B0b1auRN6eSC83
+FRuGldlSOW1z/nSh8ViizSYE5H5HX1qkXEippvFRE88CgYB3Bfu3YQY60ITWIShv
+nNkdcbTT9eoP9suaRJjw92Ln+7ZpALYlQMKUZmJ/5uBmLs4RFwUTQruLOPL4yLTH
+awADWUzs3IRr1fwn9E+zM8JVyKCnUEM3w4N5UZskGO2klashAd30hWO+knRv/y0r
+uGIYs9Ek7YXlXIRVrzMwcsrt1w==
+-----END PRIVATE KEY-----
diff --git a/data/interop.pem b/data/interop.pem
new file mode 100644
--- /dev/null
+++ b/data/interop.pem
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDtDCCApygAwIBAgIUbJfTREJ6k6/+oInWhV1O1j3ZT0IwDQYJKoZIhvcNAQEL
+BQAwVjELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
+GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1UEAwwGdGVzdGNhMB4XDTIw
+MDMxODAzMTA0MloXDTMwMDMxNjAzMTA0MlowZTELMAkGA1UEBhMCVVMxETAPBgNV
+BAgMCElsbGlub2lzMRAwDgYDVQQHDAdDaGljYWdvMRUwEwYDVQQKDAxFeGFtcGxl
+LCBDby4xGjAYBgNVBAMMESoudGVzdC5nb29nbGUuY29tMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEA5xOONxJJ8b8Qauvob5/7dPYZfIcd+uhAWL2ZlTPz
+Qvu4oF0QI4iYgP5iGgry9zEtCM+YQS8UhiAlPlqa6ANxgiBSEyMHH/xE8lo/+caY
+GeACqy640Jpl/JocFGo3xd1L8DCawjlaj6eu7T7T/tpAV2qq13b5710eNRbCAfFe
+8yALiGQemx0IYhlZXNbIGWLBNhBhvVjJh7UvOqpADk4xtl8o5j0xgMIRg6WJGK6c
+6ffSIg4eP1XmovNYZ9LLEJG68tF0Q/yIN43B4dt1oq4jzSdCbG4F1EiykT2TmwPV
+YDi8tml6DfOCDGnit8svnMEmBv/fcPd31GSbXjF8M+KGGQIDAQABo2swaTAJBgNV
+HRMEAjAAMAsGA1UdDwQEAwIF4DBPBgNVHREESDBGghAqLnRlc3QuZ29vZ2xlLmZy
+ghh3YXRlcnpvb2kudGVzdC5nb29nbGUuYmWCEioudGVzdC55b3V0dWJlLmNvbYcE
+wKgBAzANBgkqhkiG9w0BAQsFAAOCAQEAS8hDQA8PSgipgAml7Q3/djwQ644ghWQv
+C2Kb+r30RCY1EyKNhnQnIIh/OUbBZvh0M0iYsy6xqXgfDhCB93AA6j0i5cS8fkhH
+Jl4RK0tSkGQ3YNY4NzXwQP/vmUgfkw8VBAZ4Y4GKxppdATjffIW+srbAmdDruIRM
+wPeikgOoRrXf0LA1fi4TqxARzeRwenQpayNfGHTvVF9aJkl8HoaMunTAdG5pIVcr
+9GKi/gEMpXUJbbVv3U5frX1Wo4CFo+rZWJ/LyCMeb0jciNLxSdMwj/E/ZuExlyeZ
+gc9ctPjSMvgSyXEKv6Vwobleeg88V2ZgzenziORoWj4KszG/lbQZvg==
+-----END CERTIFICATE-----
diff --git a/data/route_guide_db.json b/data/route_guide_db.json
new file mode 100644
--- /dev/null
+++ b/data/route_guide_db.json
@@ -0,0 +1,601 @@
+[{
+    "location": {
+        "latitude": 407838351,
+        "longitude": -746143763
+    },
+    "name": "Patriots Path, Mendham, NJ 07945, USA"
+}, {
+    "location": {
+        "latitude": 408122808,
+        "longitude": -743999179
+    },
+    "name": "101 New Jersey 10, Whippany, NJ 07981, USA"
+}, {
+    "location": {
+        "latitude": 413628156,
+        "longitude": -749015468
+    },
+    "name": "U.S. 6, Shohola, PA 18458, USA"
+}, {
+    "location": {
+        "latitude": 419999544,
+        "longitude": -740371136
+    },
+    "name": "5 Conners Road, Kingston, NY 12401, USA"
+}, {
+    "location": {
+        "latitude": 414008389,
+        "longitude": -743951297
+    },
+    "name": "Mid Hudson Psychiatric Center, New Hampton, NY 10958, USA"
+}, {
+    "location": {
+        "latitude": 419611318,
+        "longitude": -746524769
+    },
+    "name": "287 Flugertown Road, Livingston Manor, NY 12758, USA"
+}, {
+    "location": {
+        "latitude": 406109563,
+        "longitude": -742186778
+    },
+    "name": "4001 Tremley Point Road, Linden, NJ 07036, USA"
+}, {
+    "location": {
+        "latitude": 416802456,
+        "longitude": -742370183
+    },
+    "name": "352 South Mountain Road, Wallkill, NY 12589, USA"
+}, {
+    "location": {
+        "latitude": 412950425,
+        "longitude": -741077389
+    },
+    "name": "Bailey Turn Road, Harriman, NY 10926, USA"
+}, {
+    "location": {
+        "latitude": 412144655,
+        "longitude": -743949739
+    },
+    "name": "193-199 Wawayanda Road, Hewitt, NJ 07421, USA"
+}, {
+    "location": {
+        "latitude": 415736605,
+        "longitude": -742847522
+    },
+    "name": "406-496 Ward Avenue, Pine Bush, NY 12566, USA"
+}, {
+    "location": {
+        "latitude": 413843930,
+        "longitude": -740501726
+    },
+    "name": "162 Merrill Road, Highland Mills, NY 10930, USA"
+}, {
+    "location": {
+        "latitude": 410873075,
+        "longitude": -744459023
+    },
+    "name": "Clinton Road, West Milford, NJ 07480, USA"
+}, {
+    "location": {
+        "latitude": 412346009,
+        "longitude": -744026814
+    },
+    "name": "16 Old Brook Lane, Warwick, NY 10990, USA"
+}, {
+    "location": {
+        "latitude": 402948455,
+        "longitude": -747903913
+    },
+    "name": "3 Drake Lane, Pennington, NJ 08534, USA"
+}, {
+    "location": {
+        "latitude": 406337092,
+        "longitude": -740122226
+    },
+    "name": "6324 8th Avenue, Brooklyn, NY 11220, USA"
+}, {
+    "location": {
+        "latitude": 406421967,
+        "longitude": -747727624
+    },
+    "name": "1 Merck Access Road, Whitehouse Station, NJ 08889, USA"
+}, {
+    "location": {
+        "latitude": 416318082,
+        "longitude": -749677716
+    },
+    "name": "78-98 Schalck Road, Narrowsburg, NY 12764, USA"
+}, {
+    "location": {
+        "latitude": 415301720,
+        "longitude": -748416257
+    },
+    "name": "282 Lakeview Drive Road, Highland Lake, NY 12743, USA"
+}, {
+    "location": {
+        "latitude": 402647019,
+        "longitude": -747071791
+    },
+    "name": "330 Evelyn Avenue, Hamilton Township, NJ 08619, USA"
+}, {
+    "location": {
+        "latitude": 412567807,
+        "longitude": -741058078
+    },
+    "name": "New York State Reference Route 987E, Southfields, NY 10975, USA"
+}, {
+    "location": {
+        "latitude": 416855156,
+        "longitude": -744420597
+    },
+    "name": "103-271 Tempaloni Road, Ellenville, NY 12428, USA"
+}, {
+    "location": {
+        "latitude": 404663628,
+        "longitude": -744820157
+    },
+    "name": "1300 Airport Road, North Brunswick Township, NJ 08902, USA"
+}, {
+    "location": {
+        "latitude": 407113723,
+        "longitude": -749746483
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 402133926,
+        "longitude": -743613249
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 400273442,
+        "longitude": -741220915
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 411236786,
+        "longitude": -744070769
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 411633782,
+        "longitude": -746784970
+    },
+    "name": "211-225 Plains Road, Augusta, NJ 07822, USA"
+}, {
+    "location": {
+        "latitude": 415830701,
+        "longitude": -742952812
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 413447164,
+        "longitude": -748712898
+    },
+    "name": "165 Pedersen Ridge Road, Milford, PA 18337, USA"
+}, {
+    "location": {
+        "latitude": 405047245,
+        "longitude": -749800722
+    },
+    "name": "100-122 Locktown Road, Frenchtown, NJ 08825, USA"
+}, {
+    "location": {
+        "latitude": 418858923,
+        "longitude": -746156790
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 417951888,
+        "longitude": -748484944
+    },
+    "name": "650-652 Willi Hill Road, Swan Lake, NY 12783, USA"
+}, {
+    "location": {
+        "latitude": 407033786,
+        "longitude": -743977337
+    },
+    "name": "26 East 3rd Street, New Providence, NJ 07974, USA"
+}, {
+    "location": {
+        "latitude": 417548014,
+        "longitude": -740075041
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 410395868,
+        "longitude": -744972325
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 404615353,
+        "longitude": -745129803
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 406589790,
+        "longitude": -743560121
+    },
+    "name": "611 Lawrence Avenue, Westfield, NJ 07090, USA"
+}, {
+    "location": {
+        "latitude": 414653148,
+        "longitude": -740477477
+    },
+    "name": "18 Lannis Avenue, New Windsor, NY 12553, USA"
+}, {
+    "location": {
+        "latitude": 405957808,
+        "longitude": -743255336
+    },
+    "name": "82-104 Amherst Avenue, Colonia, NJ 07067, USA"
+}, {
+    "location": {
+        "latitude": 411733589,
+        "longitude": -741648093
+    },
+    "name": "170 Seven Lakes Drive, Sloatsburg, NY 10974, USA"
+}, {
+    "location": {
+        "latitude": 412676291,
+        "longitude": -742606606
+    },
+    "name": "1270 Lakes Road, Monroe, NY 10950, USA"
+}, {
+    "location": {
+        "latitude": 409224445,
+        "longitude": -748286738
+    },
+    "name": "509-535 Alphano Road, Great Meadows, NJ 07838, USA"
+}, {
+    "location": {
+        "latitude": 406523420,
+        "longitude": -742135517
+    },
+    "name": "652 Garden Street, Elizabeth, NJ 07202, USA"
+}, {
+    "location": {
+        "latitude": 401827388,
+        "longitude": -740294537
+    },
+    "name": "349 Sea Spray Court, Neptune City, NJ 07753, USA"
+}, {
+    "location": {
+        "latitude": 410564152,
+        "longitude": -743685054
+    },
+    "name": "13-17 Stanley Street, West Milford, NJ 07480, USA"
+}, {
+    "location": {
+        "latitude": 408472324,
+        "longitude": -740726046
+    },
+    "name": "47 Industrial Avenue, Teterboro, NJ 07608, USA"
+}, {
+    "location": {
+        "latitude": 412452168,
+        "longitude": -740214052
+    },
+    "name": "5 White Oak Lane, Stony Point, NY 10980, USA"
+}, {
+    "location": {
+        "latitude": 409146138,
+        "longitude": -746188906
+    },
+    "name": "Berkshire Valley Management Area Trail, Jefferson, NJ, USA"
+}, {
+    "location": {
+        "latitude": 404701380,
+        "longitude": -744781745
+    },
+    "name": "1007 Jersey Avenue, New Brunswick, NJ 08901, USA"
+}, {
+    "location": {
+        "latitude": 409642566,
+        "longitude": -746017679
+    },
+    "name": "6 East Emerald Isle Drive, Lake Hopatcong, NJ 07849, USA"
+}, {
+    "location": {
+        "latitude": 408031728,
+        "longitude": -748645385
+    },
+    "name": "1358-1474 New Jersey 57, Port Murray, NJ 07865, USA"
+}, {
+    "location": {
+        "latitude": 413700272,
+        "longitude": -742135189
+    },
+    "name": "367 Prospect Road, Chester, NY 10918, USA"
+}, {
+    "location": {
+        "latitude": 404310607,
+        "longitude": -740282632
+    },
+    "name": "10 Simon Lake Drive, Atlantic Highlands, NJ 07716, USA"
+}, {
+    "location": {
+        "latitude": 409319800,
+        "longitude": -746201391
+    },
+    "name": "11 Ward Street, Mount Arlington, NJ 07856, USA"
+}, {
+    "location": {
+        "latitude": 406685311,
+        "longitude": -742108603
+    },
+    "name": "300-398 Jefferson Avenue, Elizabeth, NJ 07201, USA"
+}, {
+    "location": {
+        "latitude": 419018117,
+        "longitude": -749142781
+    },
+    "name": "43 Dreher Road, Roscoe, NY 12776, USA"
+}, {
+    "location": {
+        "latitude": 412856162,
+        "longitude": -745148837
+    },
+    "name": "Swan Street, Pine Island, NY 10969, USA"
+}, {
+    "location": {
+        "latitude": 416560744,
+        "longitude": -746721964
+    },
+    "name": "66 Pleasantview Avenue, Monticello, NY 12701, USA"
+}, {
+    "location": {
+        "latitude": 405314270,
+        "longitude": -749836354
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 414219548,
+        "longitude": -743327440
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 415534177,
+        "longitude": -742900616
+    },
+    "name": "565 Winding Hills Road, Montgomery, NY 12549, USA"
+}, {
+    "location": {
+        "latitude": 406898530,
+        "longitude": -749127080
+    },
+    "name": "231 Rocky Run Road, Glen Gardner, NJ 08826, USA"
+}, {
+    "location": {
+        "latitude": 407586880,
+        "longitude": -741670168
+    },
+    "name": "100 Mount Pleasant Avenue, Newark, NJ 07104, USA"
+}, {
+    "location": {
+        "latitude": 400106455,
+        "longitude": -742870190
+    },
+    "name": "517-521 Huntington Drive, Manchester Township, NJ 08759, USA"
+}, {
+    "location": {
+        "latitude": 400066188,
+        "longitude": -746793294
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 418803880,
+        "longitude": -744102673
+    },
+    "name": "40 Mountain Road, Napanoch, NY 12458, USA"
+}, {
+    "location": {
+        "latitude": 414204288,
+        "longitude": -747895140
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 414777405,
+        "longitude": -740615601
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 415464475,
+        "longitude": -747175374
+    },
+    "name": "48 North Road, Forestburgh, NY 12777, USA"
+}, {
+    "location": {
+        "latitude": 404062378,
+        "longitude": -746376177
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 405688272,
+        "longitude": -749285130
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 400342070,
+        "longitude": -748788996
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 401809022,
+        "longitude": -744157964
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 404226644,
+        "longitude": -740517141
+    },
+    "name": "9 Thompson Avenue, Leonardo, NJ 07737, USA"
+}, {
+    "location": {
+        "latitude": 410322033,
+        "longitude": -747871659
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 407100674,
+        "longitude": -747742727
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 418811433,
+        "longitude": -741718005
+    },
+    "name": "213 Bush Road, Stone Ridge, NY 12484, USA"
+}, {
+    "location": {
+        "latitude": 415034302,
+        "longitude": -743850945
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 411349992,
+        "longitude": -743694161
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 404839914,
+        "longitude": -744759616
+    },
+    "name": "1-17 Bergen Court, New Brunswick, NJ 08901, USA"
+}, {
+    "location": {
+        "latitude": 414638017,
+        "longitude": -745957854
+    },
+    "name": "35 Oakland Valley Road, Cuddebackville, NY 12729, USA"
+}, {
+    "location": {
+        "latitude": 412127800,
+        "longitude": -740173578
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 401263460,
+        "longitude": -747964303
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 412843391,
+        "longitude": -749086026
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 418512773,
+        "longitude": -743067823
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 404318328,
+        "longitude": -740835638
+    },
+    "name": "42-102 Main Street, Belford, NJ 07718, USA"
+}, {
+    "location": {
+        "latitude": 419020746,
+        "longitude": -741172328
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 404080723,
+        "longitude": -746119569
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 401012643,
+        "longitude": -744035134
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 404306372,
+        "longitude": -741079661
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 403966326,
+        "longitude": -748519297
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 405002031,
+        "longitude": -748407866
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 409532885,
+        "longitude": -742200683
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 416851321,
+        "longitude": -742674555
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 406411633,
+        "longitude": -741722051
+    },
+    "name": "3387 Richmond Terrace, Staten Island, NY 10303, USA"
+}, {
+    "location": {
+        "latitude": 413069058,
+        "longitude": -744597778
+    },
+    "name": "261 Van Sickle Road, Goshen, NY 10924, USA"
+}, {
+    "location": {
+        "latitude": 418465462,
+        "longitude": -746859398
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 411733222,
+        "longitude": -744228360
+    },
+    "name": ""
+}, {
+    "location": {
+        "latitude": 410248224,
+        "longitude": -747127767
+    },
+    "name": "3 Hasta Way, Newton, NJ 07860, USA"
+}]
diff --git a/grapesy.cabal b/grapesy.cabal
new file mode 100644
--- /dev/null
+++ b/grapesy.cabal
@@ -0,0 +1,459 @@
+cabal-version:      3.0
+name:               grapesy
+version:            1.0.0
+synopsis:           Native Haskell implementation of the gRPC framework
+description:        This is a fully compliant and feature complete native Haskell
+                    implementation of gRPC, Google's RPC framework.
+license:            BSD-3-Clause
+license-file:       LICENSE
+author:             Edsko de Vries
+maintainer:         edsko@well-typed.com
+category:           Network
+build-type:         Simple
+extra-doc-files:    CHANGELOG.md
+data-dir:           data
+data-files:         route_guide_db.json
+                    grpc-demo.pem
+                    grpc-demo.key
+                    interop.pem
+                    interop.key
+                    interop-ca.pem
+tested-with:        GHC==8.10.7
+                  , GHC==9.2.8
+                  , GHC==9.4.8
+                  , GHC==9.6.6
+                  , GHC==9.8.2
+                  , GHC==9.10.1
+
+source-repository head
+  type:     git
+  location: https://github.com/well-typed/grapesy
+
+common lang
+  ghc-options:
+      -Wall
+      -Wredundant-constraints
+      -Wno-unticked-promoted-constructors
+      -Wprepositive-qualified-module
+      -Widentities
+      -Wmissing-export-lists
+  build-depends:
+      base >= 4.14 && < 4.22
+  default-language:
+      Haskell2010
+  default-extensions:
+      BangPatterns
+      ConstraintKinds
+      DataKinds
+      DeriveAnyClass
+      DeriveFunctor
+      DeriveGeneric
+      DeriveTraversable
+      DerivingStrategies
+      DerivingVia
+      DisambiguateRecordFields
+      FlexibleContexts
+      FlexibleInstances
+      GADTs
+      GeneralizedNewtypeDeriving
+      ImportQualifiedPost
+      InstanceSigs
+      LambdaCase
+      MultiParamTypeClasses
+      MultiWayIf
+      NamedFieldPuns
+      NumericUnderscores
+      PolyKinds
+      RankNTypes
+      ScopedTypeVariables
+      StandaloneDeriving
+      TupleSections
+      TypeApplications
+      TypeFamilies
+      TypeOperators
+      UndecidableInstances
+
+  if impl(ghc >= 9.0)
+    ghc-options:
+      -- This was introduced in 8.10, but it does not work reliably until 9.0.
+      -- In 8.10 you might get spurious warnings when using re-exported modules
+      -- (e.g. in proto-lens-runtime).
+      -Wunused-packages
+
+common common-executable-flags
+  ghc-options:
+      -threaded
+      -rtsopts
+
+library
+  import:          lang
+  autogen-modules: Paths_grapesy
+  hs-source-dirs:  src, proto
+
+  exposed-modules:
+      Network.GRPC.Client
+      Network.GRPC.Client.Binary
+      Network.GRPC.Client.StreamType.CanCallRPC
+      Network.GRPC.Client.StreamType.Conduit
+      Network.GRPC.Client.StreamType.IO
+      Network.GRPC.Client.StreamType.IO.Binary
+      Network.GRPC.Common
+      Network.GRPC.Common.Binary
+      Network.GRPC.Common.Compression
+      Network.GRPC.Common.Headers
+      Network.GRPC.Common.HTTP2Settings
+      Network.GRPC.Common.JSON
+      Network.GRPC.Common.NextElem
+      Network.GRPC.Common.Protobuf
+      Network.GRPC.Common.Protobuf.Any
+      Network.GRPC.Common.StreamElem
+      Network.GRPC.Common.StreamType
+      Network.GRPC.Server
+      Network.GRPC.Server.Binary
+      Network.GRPC.Server.Protobuf
+      Network.GRPC.Server.Run
+      Network.GRPC.Server.StreamType
+      Network.GRPC.Server.StreamType.Binary
+  other-modules:
+      Network.GRPC.Client.Call
+      Network.GRPC.Client.Connection
+      Network.GRPC.Client.Meta
+      Network.GRPC.Client.Session
+      Network.GRPC.Client.StreamType
+      Network.GRPC.Server.Call
+      Network.GRPC.Server.Context
+      Network.GRPC.Server.Handler
+      Network.GRPC.Server.HandlerMap
+      Network.GRPC.Server.RequestHandler
+      Network.GRPC.Server.RequestHandler.API
+      Network.GRPC.Server.Session
+      Network.GRPC.Util.AccumulatedByteString
+      Network.GRPC.Util.GHC
+      Network.GRPC.Util.HTTP2
+      Network.GRPC.Util.HTTP2.Stream
+      Network.GRPC.Util.RedundantConstraint
+      Network.GRPC.Util.Session
+      Network.GRPC.Util.Session.API
+      Network.GRPC.Util.Session.Channel
+      Network.GRPC.Util.Session.Client
+      Network.GRPC.Util.Session.Server
+      Network.GRPC.Util.Thread
+      Network.GRPC.Util.TLS
+
+      Paths_grapesy
+  build-depends:
+    , aeson                     >= 1.5     && < 2.3
+    , async                     >= 2.2     && < 2.3
+    , binary                    >= 0.8     && < 0.9
+    , bytestring                >= 0.10.12 && < 0.13
+    , conduit                   >= 1.3     && < 1.4
+    , containers                >= 0.6     && < 0.8
+    , crypton-x509              >= 1.7     && < 1.8
+    , crypton-x509-store        >= 1.6     && < 1.7
+    , crypton-x509-system       >= 1.6     && < 1.7
+    , data-default              >= 0.7     && < 0.9
+    , deepseq                   >= 1.4     && < 1.6
+    , exceptions                >= 0.10    && < 0.11
+    , grpc-spec                 >= 1.0     && < 1.1
+    , http-types                >= 0.12    && < 0.13
+    , http2-tls                 >= 0.4.5   && < 0.5
+    , lens                      >= 5.0     && < 5.4
+    , mtl                       >= 2.2     && < 2.4
+    , network                   >= 3.2.4   && < 3.3
+    , network-run               >= 0.4.3   && < 0.5
+    , proto-lens                >= 0.7     && < 0.8
+    , proto-lens-protobuf-types >= 0.7     && < 0.8
+    , random                    >= 1.2     && < 1.4
+    , recv                      >= 0.1     && < 0.2
+    , stm                       >= 2.5     && < 2.6
+    , text                      >= 1.2     && < 2.2
+    , time-manager              >= 0.2.2   && < 0.3
+    , tls                       >= 1.7     && < 2.2
+    , unbounded-delays          >= 0.1.1   && < 0.2
+    , unordered-containers      >= 0.2     && < 0.3
+    , utf8-string               >= 1.0     && < 1.1
+
+      -- We pin very specific versions of http2.
+      --
+      -- New versions should be tested against the full grapesy test suite
+      -- (regular tests and stress tests).
+    , http2 == 5.3.9
+
+test-suite test-record-dot
+  import:         lang, common-executable-flags
+  type:           exitcode-stdio-1.0
+  hs-source-dirs: test-record-dot, proto
+  main-is:        Main.hs
+  build-depends:  grapesy
+
+  other-modules:
+      Test.OverloadedRecordDot
+      Test.OverloadedRecordUpdate
+      Proto.Spec
+
+  build-depends:
+      -- Inherited dependencies
+    , bytestring
+    , containers
+    , text
+
+  build-depends:
+      -- Additional dependencies
+    , proto-lens-runtime >= 0.7  && < 0.8
+    , tasty              >= 1.4  && < 1.6
+    , tasty-hunit        >= 0.10 && < 0.11
+    , vector             >= 0.13 && < 0.14
+    , record-hasfield    >= 1.0  && < 1.1
+
+  if impl(ghc < 9.2)
+    buildable: False
+
+test-suite test-grapesy
+  import:          lang, common-executable-flags
+  type:            exitcode-stdio-1.0
+  hs-source-dirs:  test-grapesy, proto
+  main-is:         Main.hs
+  autogen-modules: Paths_grapesy
+  build-depends:   grapesy
+
+  other-modules:
+      Test.Driver.ClientServer
+      Test.Driver.Dialogue
+      Test.Driver.Dialogue.Definition
+      Test.Driver.Dialogue.Execution
+      Test.Driver.Dialogue.Generation
+      Test.Driver.Dialogue.TestClock
+      Test.Prop.Dialogue
+      Test.Regression.Issue102
+      Test.Regression.Issue238
+      Test.Sanity.Any
+      Test.Sanity.BrokenDeployments
+      Test.Sanity.Compression
+      Test.Sanity.Disconnect
+      Test.Sanity.EndOfStream
+      Test.Sanity.Interop
+      Test.Sanity.Reclamation
+      Test.Sanity.StreamingType.CustomFormat
+      Test.Sanity.StreamingType.NonStreaming
+      Test.Util
+      Test.Util.Exception
+      Test.Util.RawTestServer
+
+      Paths_grapesy
+
+      Proto.API.Helloworld
+      Proto.API.Interop
+      Proto.API.Ping
+      Proto.API.RouteGuide
+      Proto.API.TestAny
+      Proto.API.Trivial
+      Proto.Empty
+      Proto.Helloworld
+      Proto.Messages
+      Proto.Ping
+      Proto.RouteGuide
+      Proto.Test
+      Proto.TestAny
+
+  build-depends:
+      -- Inherited dependencies
+    , async
+    , bytestring
+    , containers
+    , deepseq
+    , exceptions
+    , http-types
+    , http2
+    , mtl
+    , network
+    , proto-lens-protobuf-types
+    , stm
+    , text
+    , tls
+    , utf8-string
+
+  build-depends:
+      -- Additional dependencies
+    , proto-lens-runtime >= 0.7   && < 0.8
+    , QuickCheck         >= 2.14  && < 2.16
+    , serialise          >= 0.2   && < 0.3
+    , tasty              >= 1.4   && < 1.6
+    , tasty-hunit        >= 0.10  && < 0.11
+    , tasty-quickcheck   >= 0.10  && < 0.12
+    , temporary          >= 1.3   && < 1.4
+    , unix               >= 2.7   && < 2.9
+
+test-suite test-stress
+  import:             lang, common-executable-flags
+  type:               exitcode-stdio-1.0
+  hs-source-dirs:     test-stress, proto
+  main-is:            Main.hs
+  autogen-modules:    Paths_grapesy
+  build-depends:      grapesy
+  default-extensions: RecordWildCards
+
+  other-modules:
+      Test.Stress.Client
+      Test.Stress.Cmdline
+      Test.Stress.Common
+      Test.Stress.Driver
+      Test.Stress.Driver.Summary
+      Test.Stress.Server
+
+      Proto.API.Trivial
+
+      Paths_grapesy
+
+  build-depends:
+      -- Inherited dependencies
+    , async
+    , bytestring
+    , exceptions
+    , http2
+    , network
+    , text
+    , tls
+
+  build-depends:
+      -- Additional dependencies
+    , Chart                >= 1.9     && < 1.10
+    , Chart-diagrams       >= 1.9     && < 1.10
+    , directory            >= 1.3     && < 1.4
+    , filepath             >= 1.4.2.1 && < 1.6
+    , ghc-events           >= 0.17    && < 0.21
+    , optparse-applicative >= 0.16    && < 0.19
+    , pretty-show          >= 1.10    && < 1.11
+    , process              >= 1.6.12  && < 1.7
+    , random               >= 1.2     && < 1.4
+    , temporary            >= 1.3     && < 1.4
+
+  if !flag(build-stress-test)
+    buildable:
+      False
+
+test-suite grapesy-interop
+  import:             lang, common-executable-flags
+  type:               exitcode-stdio-1.0
+  hs-source-dirs:     interop, proto
+  main-is:            Main.hs
+  autogen-modules:    Paths_grapesy
+  build-depends:      grapesy
+  default-extensions: OverloadedLabels
+
+  other-modules:
+      Interop.Client
+      Interop.Client.Common
+      Interop.Client.Connect
+      Interop.Client.Ping
+      Interop.Client.TestCase.CancelAfterBegin
+      Interop.Client.TestCase.CancelAfterFirstResponse
+      Interop.Client.TestCase.ClientCompressedStreaming
+      Interop.Client.TestCase.ClientCompressedUnary
+      Interop.Client.TestCase.ClientStreaming
+      Interop.Client.TestCase.CustomMetadata
+      Interop.Client.TestCase.EmptyStream
+      Interop.Client.TestCase.EmptyUnary
+      Interop.Client.TestCase.LargeUnary
+      Interop.Client.TestCase.PingPong
+      Interop.Client.TestCase.ServerCompressedStreaming
+      Interop.Client.TestCase.ServerCompressedUnary
+      Interop.Client.TestCase.ServerStreaming
+      Interop.Client.TestCase.SpecialStatusMessage
+      Interop.Client.TestCase.StatusCodeAndMessage
+      Interop.Client.TestCase.TimeoutOnSleepingServer
+      Interop.Client.TestCase.UnimplementedMethod
+      Interop.Client.TestCase.UnimplementedService
+      Interop.Cmdline
+      Interop.SelfTest
+      Interop.Server
+      Interop.Server.Common
+      Interop.Server.PingService.Ping
+      Interop.Server.TestService.EmptyCall
+      Interop.Server.TestService.FullDuplexCall
+      Interop.Server.TestService.StreamingInputCall
+      Interop.Server.TestService.StreamingOutputCall
+      Interop.Server.TestService.UnaryCall
+      Interop.Util.ANSI
+      Interop.Util.Exceptions
+      Interop.Util.Messages
+
+      Paths_grapesy
+
+      Proto.API.Interop
+      Proto.API.Ping
+      Proto.Empty
+      Proto.Messages
+      Proto.Ping
+      Proto.Test
+
+  build-depends:
+      -- Inherited dependencies
+    , bytestring
+    , exceptions
+    , grpc-spec
+    , mtl
+    , network
+    , text
+
+  build-depends:
+      -- Additional dependencies
+    , ansi-terminal        >= 1.1  && < 1.2
+    , optparse-applicative >= 0.16 && < 0.19
+    , proto-lens-runtime   >= 0.7  && < 0.8
+
+benchmark grapesy-kvstore
+  import:             lang, common-executable-flags
+  type:               exitcode-stdio-1.0
+  main-is:            Main.hs
+  hs-source-dirs:     kvstore, proto
+  autogen-modules:    Paths_grapesy
+  build-depends:      grapesy
+  default-extensions: OverloadedLabels
+
+  other-modules:
+      KVStore.API
+      KVStore.API.JSON
+      KVStore.API.Protobuf
+      KVStore.Client
+      KVStore.Cmdline
+      KVStore.Server
+      KVStore.Util.Profiling
+      KVStore.Util.RandomAccessSet
+      KVStore.Util.RandomGen
+      KVStore.Util.Store
+
+      Proto.Kvstore
+
+      Paths_grapesy
+
+  build-depends:
+      -- Inherited dependencies
+    , aeson
+    , bytestring
+    , containers
+    , deepseq
+    , text
+    , unordered-containers
+
+  build-depends:
+      -- Additional dependencies
+    , base16-bytestring    >= 1.0  && < 1.1
+    , base64-bytestring    >= 1.2  && < 1.3
+    , hashable             >= 1.3  && < 1.6
+    , optparse-applicative >= 0.16 && < 0.19
+    , proto-lens-runtime   >= 0.7  && < 0.8
+    , splitmix             >= 0.1  && < 0.2
+
+  if flag(strace)
+    cpp-options: -DSTRACE
+    build-depends: unix >= 2.7 && < 2.9
+
+Flag build-stress-test
+  description: Build the stress test
+  default: False
+  manual: True
+
+Flag strace
+  description: Write events to /dev/null in @grapesy-kvstore@ so that they show up in strace
+  default: False
+  manual: True
diff --git a/interop/Interop/Client.hs b/interop/Interop/Client.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client.hs
@@ -0,0 +1,167 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Client (runInteropClient) where
+
+import Control.Exception
+import Control.Monad
+import Data.IORef
+import System.Exit
+import System.Timeout
+
+import Interop.Cmdline
+import Interop.Util.ANSI
+import Interop.Util.Exceptions
+
+import Interop.Client.TestCase.EmptyUnary                qualified as EmptyUnary
+import Interop.Client.TestCase.LargeUnary                qualified as LargeUnary
+import Interop.Client.TestCase.ClientCompressedUnary     qualified as ClientCompressedUnary
+import Interop.Client.TestCase.ServerCompressedUnary     qualified as ServerCompressedUnary
+import Interop.Client.TestCase.ClientStreaming           qualified as ClientStreaming
+import Interop.Client.TestCase.ClientCompressedStreaming qualified as ClientCompressedStreaming
+import Interop.Client.TestCase.ServerStreaming           qualified as ServerStreaming
+import Interop.Client.TestCase.ServerCompressedStreaming qualified as ServerCompressedStreaming
+import Interop.Client.TestCase.PingPong                  qualified as PingPong
+import Interop.Client.TestCase.EmptyStream               qualified as EmptyStream
+import Interop.Client.TestCase.CustomMetadata            qualified as CustomMetadata
+import Interop.Client.TestCase.StatusCodeAndMessage      qualified as StatusCodeAndMessage
+import Interop.Client.TestCase.SpecialStatusMessage      qualified as SpecialStatusMessage
+import Interop.Client.TestCase.UnimplementedMethod       qualified as UnimplementedMethod
+import Interop.Client.TestCase.UnimplementedService      qualified as UnimplementedService
+import Interop.Client.TestCase.CancelAfterBegin          qualified as CancelAfterBegin
+import Interop.Client.TestCase.CancelAfterFirstResponse  qualified as CancelAfterFirstResponse
+import Interop.Client.TestCase.TimeoutOnSleepingServer   qualified as TimeoutOnSleepingServer
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+runInteropClient :: Cmdline -> IO ()
+runInteropClient cmdline = do
+    stats <- newIORef initTestStats
+
+    case cmdTestCase cmdline of
+      Nothing ->
+        forM_ [minBound .. maxBound] $ testCase cmdline stats
+      Just test ->
+        testCase cmdline stats test
+
+    ranAllTests stats
+
+{-------------------------------------------------------------------------------
+  Running individual tests
+-------------------------------------------------------------------------------}
+
+runTest :: TestCase -> Cmdline -> IO ()
+runTest TestEmptyUnary                = EmptyUnary.runTest
+runTest TestLargeUnary                = LargeUnary.runTest
+runTest TestClientCompressedUnary     = ClientCompressedUnary.runTest
+runTest TestServerCompressedUnary     = ServerCompressedUnary.runTest
+runTest TestClientStreaming           = ClientStreaming.runTest
+runTest TestClientCompressedStreaming = ClientCompressedStreaming.runTest
+runTest TestServerStreaming           = ServerStreaming.runTest
+runTest TestServerCompressedStreaming = ServerCompressedStreaming.runTest
+runTest TestPingPong                  = PingPong.runTest
+runTest TestEmptyStream               = EmptyStream.runTest
+runTest TestCustomMetadata            = CustomMetadata.runTest
+runTest TestStatusCodeAndMessage      = StatusCodeAndMessage.runTest
+runTest TestSpecialStatusMessage      = SpecialStatusMessage.runTest
+runTest TestUnimplementedMethod       = UnimplementedMethod.runTest
+runTest TestUnimplementedService      = UnimplementedService.runTest
+runTest TestCancelAfterBegin          = CancelAfterBegin.runTest
+runTest TestCancelAfterFirstResponse  = CancelAfterFirstResponse.runTest
+runTest TestTimeoutOnSleepingServer   = TimeoutOnSleepingServer.runTest
+
+skips :: Cmdline -> TestCase -> Bool
+skips cmdline test = or [
+      elem test (cmdSkipTest cmdline)
+    , cmdSkipCompression cmdline && elem test [
+          TestClientCompressedUnary
+        , TestServerCompressedUnary
+        , TestClientCompressedStreaming
+        , TestServerCompressedStreaming
+        ]
+    , cmdSkipClientCompression cmdline && elem test [
+          TestClientCompressedUnary
+        , TestClientCompressedStreaming
+        ]
+    ]
+
+testCase :: Cmdline -> IORef TestStats -> TestCase -> IO ()
+testCase cmdline stats test = unless (skips cmdline test) $ do
+    result <- try $ timeout (cmdTimeoutTest cmdline * 1_000_000) $
+                runTest test cmdline
+    case result of
+      Right (Just ()) ->
+        testOK stats test
+      Right Nothing ->
+        testFailed stats test "timeout"
+      Left err | Just (TestSkipped reason) <- fromException err ->
+        testSkipped stats test reason
+      Left err ->
+        testFailed stats test (displayException err)
+
+{-------------------------------------------------------------------------------
+  Test stats
+-------------------------------------------------------------------------------}
+
+data TestStats = TestStats {
+      numSucceeded :: Int
+    , numFailed    :: Int
+    , numSkipped   :: Int
+    }
+
+initTestStats :: TestStats
+initTestStats = TestStats {
+      numSucceeded = 0
+    , numFailed    = 0
+    , numSkipped   = 0
+    }
+
+testOK :: IORef TestStats -> TestCase -> IO ()
+testOK statsRef test = do
+    putDocLn $ mconcat [
+        Show test
+      , ": "
+      , Color Green "OK"
+      ]
+    modifyIORef statsRef $ \stats ->
+      stats { numSucceeded = numSucceeded stats + 1 }
+
+testFailed :: IORef TestStats -> TestCase -> String -> IO ()
+testFailed statsRef test err = do
+    putDocLn $ mconcat [
+        Show test
+      , ": "
+      , Color Red "Failed: "
+      , fromString err
+      ]
+    modifyIORef statsRef $ \stats ->
+      stats { numFailed = numFailed stats + 1 }
+
+testSkipped :: IORef TestStats -> TestCase -> String -> IO ()
+testSkipped statsRef test reason = do
+    putDocLn $ mconcat [
+        Show test
+      , ": "
+      , Color Yellow "Skipped: "
+      , fromString reason
+      ]
+    modifyIORef statsRef $ \stats ->
+      stats { numSkipped = numSkipped stats + 1 }
+
+ranAllTests :: IORef TestStats -> IO ()
+ranAllTests statsRef = do
+    stats <- readIORef statsRef
+
+    when (numSucceeded stats + numFailed stats > 1 || numSkipped stats > 0) $
+      putStrLn $ concat [
+          show $ numSucceeded stats
+        , " succeeded, "
+        , show $ numFailed stats
+        , " failed, "
+        , show $ numSkipped stats
+        , " skipped."
+        ]
+
+    when (numFailed stats > 0) $
+      exitFailure
diff --git a/interop/Interop/Client/Common.hs b/interop/Interop/Client/Common.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/Common.hs
@@ -0,0 +1,143 @@
+-- | Functionality required by many test cases
+module Interop.Client.Common (
+    -- * Setup
+    enableInitCompression
+    -- * Construct server inputs
+  , mkSimpleRequest
+  , mkStreamingInputCallRequest
+  , mkStreamingOutputCallRequest
+    -- * Verify server outputs
+  , verifySimpleResponse
+  , verifyStreamingOutputCallResponse
+  , verifyStreamingOutputs
+  , expectInvalidArgument
+  ) where
+
+
+import Data.ByteString qualified as BS.Strict
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Common.Protobuf
+
+import Interop.Util.Exceptions
+import Interop.Util.Messages
+
+import Proto.API.Interop
+
+{-------------------------------------------------------------------------------
+  Config
+-------------------------------------------------------------------------------}
+
+-- | Enable compression of the first message
+--
+-- Some test specifications (@client_compressed_unary@,
+-- @client_compressed_streaming@) tell us to
+--
+-- 1. First send a request that causes the server to send an error response
+--    (which will use the gRPC Trailers-Only case)
+-- 2. Then send a compressed message
+-- 3. Finally, send an uncompressed message
+--
+-- This is problematic: we don't know which compression algorithms the server
+-- supports until we have had a successful response from the server. We could
+-- fix this by swapping (2) and (3), but this would be deviating from the test
+-- specification. Instead, we override the initial compression to use, and
+-- report the test as skipped if the server comes back with 'GrpcUnimplemented'.
+enableInitCompression :: ConnParams
+enableInitCompression = def {
+      connInitCompression = Just Compr.gzip
+    }
+
+{-------------------------------------------------------------------------------
+  Construct server inputs
+-------------------------------------------------------------------------------}
+
+mkSimpleRequest ::
+     Bool  -- ^ Should the server expect the message to be compressed?
+  -> Proto SimpleRequest
+mkSimpleRequest expectCompressed =
+    defMessage
+      & #expectCompressed .~ boolValue expectCompressed
+      & #responseSize     .~ 314159
+      & #payload          .~ payloadOfZeroes 271828
+
+mkStreamingInputCallRequest ::
+     Bool  -- ^ Should the server expect the message to be compressed?
+  -> Int   -- ^ Payload size
+  -> Proto StreamingInputCallRequest
+mkStreamingInputCallRequest expectCompressed size =
+    defMessage
+      & #expectCompressed .~ boolValue expectCompressed
+      & #payload          .~ payloadOfZeroes size
+
+mkStreamingOutputCallRequest ::
+     [(Bool, Int)] -- ^ Size and compression of each expected response
+  -> Maybe Int     -- ^ Size of the payload, if any
+  -> Proto StreamingOutputCallRequest
+mkStreamingOutputCallRequest expectedSizes payload =
+    defMessage
+      & #responseParameters .~ [
+             defMessage
+               & #size       .~ fromIntegral sz
+               & #compressed .~ boolValue compressed
+           | (compressed, sz) <- expectedSizes
+           ]
+      & ( case payload of
+            Nothing -> id
+            Just sz -> #payload .~ payloadOfZeroes sz
+        )
+
+{-------------------------------------------------------------------------------
+  Verify server outputs
+-------------------------------------------------------------------------------}
+
+verifySimpleResponse :: HasCallStack => Proto SimpleResponse -> IO ()
+verifySimpleResponse resp = do
+    assertEqual 314159 $ BS.Strict.length     (resp ^. #payload . #body)
+    assertBool         $ BS.Strict.all (== 0) (resp ^. #payload . #body)
+
+verifyStreamingOutputCallResponse ::
+     Int -- ^ Expected size
+  -> Proto StreamingOutputCallResponse -> IO ()
+verifyStreamingOutputCallResponse expectedSize resp = do
+    assertEqual expectedSize $ BS.Strict.length     (resp ^. #payload . #body)
+    assertBool               $ BS.Strict.all (== 0) (resp ^. #payload . #body)
+
+verifyStreamingOutputs :: forall rpc.
+     HasCallStack
+  => Call rpc
+  -> (ProperTrailers' -> IO ())            -- ^ Verify trailers
+  -> [(InboundMeta, Output rpc) -> IO ()]  -- ^ Verifier per expected output
+  -> IO ()
+verifyStreamingOutputs call verifyTrailers = go
+  where
+    go :: [(InboundMeta, Output rpc) -> IO ()] -> IO ()
+    go verifiers = do
+        mResp <- recvOutputWithMeta call
+        case (mResp, verifiers) of
+          (NoMoreElems trailers, [])     -> verifyTrailers trailers
+          (StreamElem{}, [])             -> assertFailure "Too many outputs"
+          (FinalElem{}, [])              -> assertFailure "Too many outputs"
+          (NoMoreElems{}, _:_)           -> assertFailure "Not enough outputs"
+          (FinalElem{}, _:_:_)           -> assertFailure "Not enough outputs"
+          (StreamElem resp, v:vs)        -> v resp >> go vs
+          (FinalElem resp trailers, [v]) -> v resp >> verifyTrailers trailers
+
+-- | Expect the server to respond with 'InvalidArgument'
+--
+-- Throws 'TestSkipped' if the server responds with normal response instead
+-- (indicating that the server was unable to perform the required check on
+-- the inputs we sent it).
+--
+-- Also throws 'TestSkipped' is the server returns with 'GrpcUnimplemented'.
+expectInvalidArgument :: IO a -> IO ()
+expectInvalidArgument = assertThrows $ \exception ->
+    case grpcError exception of
+      GrpcInvalidArgument ->
+        return ()
+      GrpcUnimplemented ->
+        throwIO $ TestSkipped "Server sent UNIMPLEMENTED"
+      err ->
+        assertFailure $ "Unexpected failure " ++ show err
diff --git a/interop/Interop/Client/Connect.hs b/interop/Interop/Client/Connect.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/Connect.hs
@@ -0,0 +1,41 @@
+module Interop.Client.Connect (testServer) where
+
+import Network.GRPC.Client
+
+import Interop.Cmdline
+
+-- | Test server to connect to
+--
+-- The spec says
+--
+-- > Clients must not disable certificate checking.
+--
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md>
+testServer :: Cmdline -> Server
+testServer cmdline
+  | cmdUseTLS cmdline
+  = ServerSecure
+          (ValidateServer certStore)
+          (cmdSslKeyLog cmdline)
+          serverAddress
+
+  | otherwise
+  = ServerInsecure serverAddress
+  where
+    certStore :: CertificateStoreSpec
+    certStore
+      | cmdUseTestCA cmdline
+      = mconcat [
+            certStoreFromSystem
+          , certStoreFromPath $ cmdRootCA cmdline
+          ]
+
+      | otherwise
+      = certStoreFromSystem
+
+    serverAddress :: Address
+    serverAddress = Address {
+          addressHost      = cmdHost cmdline
+        , addressPort      = cmdPort cmdline
+        , addressAuthority = cmdServerHostOverride cmdline
+        }
diff --git a/interop/Interop/Client/Ping.hs b/interop/Interop/Client/Ping.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/Ping.hs
@@ -0,0 +1,52 @@
+module Interop.Client.Ping (ping, waitReachable) where
+
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import System.Timeout qualified as System
+
+import Network.GRPC.Client
+import Network.GRPC.Client.StreamType.IO
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Connect
+import Interop.Cmdline
+
+import Proto.API.Ping
+
+ping :: Cmdline -> IO ()
+ping cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      forM_ [1..] $ \i -> do
+        let msgPing :: Proto PingMessage
+            msgPing = defMessage & #id .~ i
+        msgPong <- nonStreaming conn (rpc @Ping) msgPing
+        print msgPong
+        threadDelay 1_000_000
+
+waitReachable :: Cmdline -> IO ()
+waitReachable cmdline = do
+    result <- System.timeout (cmdTimeoutConnect cmdline * 1_000_000) loop
+    case result of
+      Nothing -> fail "Failed to connect to the server"
+      Just () -> return ()
+  where
+    loop :: IO ()
+    loop = do
+        result :: Either SomeException () <- try reach
+        case result of
+          Left ex ->
+            case fromException ex of
+              Just (_ :: System.Timeout) ->
+                throwIO ex
+              _otherwise -> do
+                threadDelay 100_000
+                loop
+          Right _ ->
+            return ()
+
+    reach :: IO ()
+    reach = do
+        withConnection def (testServer cmdline) $ \conn -> void $
+          nonStreaming conn (rpc @Ping) defMessage
diff --git a/interop/Interop/Client/TestCase/CancelAfterBegin.hs b/interop/Interop/Client/TestCase/CancelAfterBegin.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/CancelAfterBegin.hs
@@ -0,0 +1,23 @@
+module Interop.Client.TestCase.CancelAfterBegin (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#cancel_after_begin>
+--
+-- This is not really testing anything about the server, but rather about how
+-- cancellation gets reported by the grapesy client library itself.
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      assertThrows (assertEqual GrpcCancelled . grpcError) $
+        withRPC conn def (Proxy @StreamingInputCall) $ \_call ->
+          -- Immediately cancel request
+          return ()
+
diff --git a/interop/Interop/Client/TestCase/CancelAfterFirstResponse.hs b/interop/Interop/Client/TestCase/CancelAfterFirstResponse.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/CancelAfterFirstResponse.hs
@@ -0,0 +1,27 @@
+module Interop.Client.TestCase.CancelAfterFirstResponse (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+import Interop.Client.Common (mkStreamingOutputCallRequest)
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#cancel_after_first_response>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn -> do
+      assertThrows (assertEqual GrpcCancelled . grpcError) $
+        withRPC conn def (Proxy @FullDuplexCall) $ \call -> do
+          sendNextInput call req
+          -- Cancel request after receiving a response
+          _resp <- recvNextOutput call
+          return ()
+  where
+    req :: Proto StreamingOutputCallRequest
+    req = mkStreamingOutputCallRequest [(False, 31415)] (Just 27182)
+
diff --git a/interop/Interop/Client/TestCase/ClientCompressedStreaming.hs b/interop/Interop/Client/TestCase/ClientCompressedStreaming.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/ClientCompressedStreaming.hs
@@ -0,0 +1,61 @@
+module Interop.Client.TestCase.ClientCompressedStreaming (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#client_compressed_streaming>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection enableInitCompression (testServer cmdline) $ \conn -> do
+      -- 1. Call StreamingInputCall and send the feature-probing message
+      checkServerSupportsCompressedRequest conn
+
+      withRPC conn def (Proxy @StreamingInputCall) $ \call -> do
+        sendInputWithMeta call $ StreamElem compressed
+        sendInputWithMeta call $ FinalElem uncompressed NoMetadata
+
+        (resp, _metadata) <- recvFinalOutput call
+        assertEqual 73086 $ resp ^. #aggregatedPayloadSize
+  where
+    -- Expect compressed, and /is/ compressed
+    compressed :: (OutboundMeta, Proto StreamingInputCallRequest)
+    compressed = (
+          def { outboundEnableCompression = True }
+        , mkStreamingInputCallRequest True 27182
+        )
+
+    -- Expect uncompressed, and /is/ uncompressed
+    uncompressed :: (OutboundMeta, Proto StreamingInputCallRequest)
+    uncompressed = (
+          def { outboundEnableCompression = False }
+        , mkStreamingInputCallRequest False 45904
+        )
+
+-- | Check whether the server supports CompressedRequest
+--
+-- If it does not, throws 'TestSkipped'.
+--
+-- This is similar to the defintiion in
+-- "Interop.Client.TestCase.ClientCompressedUnary", but (per the test spec) not
+-- identical; that one uses the "unaryCall" endpoint, here we use
+-- "streamingInputCall". The probe that we send is also slightly different.
+checkServerSupportsCompressedRequest :: Connection -> IO ()
+checkServerSupportsCompressedRequest conn =
+    withRPC conn def (Proxy @StreamingInputCall) $ \call -> do
+      sendInputWithMeta call $ FinalElem featureProbe NoMetadata
+      expectInvalidArgument $ recvFinalOutput call
+  where
+    -- Expect compressed, but is /not/ actually compressed
+    featureProbe :: (OutboundMeta, Proto StreamingInputCallRequest)
+    featureProbe = (
+          def { outboundEnableCompression = False }
+        , mkStreamingInputCallRequest True 27182
+        )
diff --git a/interop/Interop/Client/TestCase/ClientCompressedUnary.hs b/interop/Interop/Client/TestCase/ClientCompressedUnary.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/ClientCompressedUnary.hs
@@ -0,0 +1,63 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Client.TestCase.ClientCompressedUnary (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#client_compressed_unary>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection enableInitCompression (testServer cmdline) $ \conn -> do
+      -- 1. Call UnaryCall with the feature probe, an uncompressed message
+      checkServerSupportsCompressedRequest conn
+
+      -- 2. Call UnaryCall with the compressed message
+      withRPC conn def (Proxy @UnaryCall) $ \call -> do
+        sendInputWithMeta call $ FinalElem compressed NoMetadata
+        (resp, _metadata) <- recvFinalOutput call
+        verifySimpleResponse resp
+
+      -- 3. Call UnaryCall with the uncompressed message
+      withRPC conn def (Proxy @UnaryCall) $ \call -> do
+        sendInputWithMeta call $ FinalElem uncompressed NoMetadata
+        (resp, _metadata) <- recvFinalOutput call
+        verifySimpleResponse resp
+  where
+    -- Expect compressed, and /is/ compressed
+    compressed :: (OutboundMeta, Proto SimpleRequest)
+    compressed = (
+          def { outboundEnableCompression = True }
+        , mkSimpleRequest True
+        )
+
+    -- Expect uncompressed, and /is/ uncompressed
+    uncompressed :: (OutboundMeta, Proto SimpleRequest)
+    uncompressed = (
+          def { outboundEnableCompression = False }
+        , mkSimpleRequest False
+        )
+
+-- | Check whether the server supports CompressedRequest
+--
+-- If it does not, throws 'TestSkipped'.
+checkServerSupportsCompressedRequest :: Connection -> IO ()
+checkServerSupportsCompressedRequest conn =
+    withRPC conn def (Proxy @UnaryCall) $ \call -> do
+      sendInputWithMeta call $ FinalElem featureProbe NoMetadata
+      expectInvalidArgument $ recvFinalOutput call
+  where
+    -- Expect compressed, but is /not/ actually compressed
+    featureProbe :: (OutboundMeta, Proto SimpleRequest)
+    featureProbe = (
+          def { outboundEnableCompression = False }
+        , mkSimpleRequest True
+        )
+
diff --git a/interop/Interop/Client/TestCase/ClientStreaming.hs b/interop/Interop/Client/TestCase/ClientStreaming.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/ClientStreaming.hs
@@ -0,0 +1,27 @@
+module Interop.Client.TestCase.ClientStreaming (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+import Interop.Util.Messages
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#client_streaming>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      withRPC conn def (Proxy @StreamingInputCall) $ \call -> do
+        sendNextInput  call $ request 27182
+        sendNextInput  call $ request 8
+        sendNextInput  call $ request 1828
+        sendFinalInput call $ request 45904
+        (resp, _metadata) <- recvFinalOutput call
+        assertEqual 74922 $ resp ^. #aggregatedPayloadSize
+  where
+    request :: Int -> Proto StreamingInputCallRequest
+    request sz = defMessage & #payload .~ payloadOfZeroes sz
diff --git a/interop/Interop/Client/TestCase/CustomMetadata.hs b/interop/Interop/Client/TestCase/CustomMetadata.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/CustomMetadata.hs
@@ -0,0 +1,71 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Client.TestCase.CustomMetadata (runTest) where
+
+import Data.ByteString qualified as BS.Strict
+import Data.ByteString qualified as Strict (ByteString)
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#custom_metadata>
+--
+-- For both UnaryCall and FullDuplexCall, the reference server (at least some)
+-- does not return any initial metadata until we send the first request. The
+-- test spec does not specify whether this is expected behaviour or not, so we
+-- play it safe and only ask for the initial metadata after sending the request.
+runTest :: Cmdline -> IO ()
+runTest cmdline = do
+    withConnection def (testServer cmdline) $ \conn -> do
+      -- 1. UnaryCall
+      withRPC conn callParams (Proxy @UnaryCall) $ \call -> do
+        -- For UnaryCall the server does not respond until we send the input
+        sendFinalInput call simpleRequest
+        responseMetadata <- recvResponseInitialMetadata call
+        (_, trailers)    <- recvFinalOutput call
+        verifyRespMetadata responseMetadata trailers
+
+      -- 2. FullDuplexCall
+      withRPC conn callParams (Proxy @FullDuplexCall) $ \call -> do
+        sendFinalInput call streamingRequest
+        responseMetadata <- recvResponseInitialMetadata call
+        (_, trailers) <- recvFinalOutput call
+        verifyRespMetadata responseMetadata trailers
+  where
+    callParams :: forall meth. CallParams (Protobuf TestService meth)
+    callParams = def {
+          callRequestMetadata = InteropReqMeta {
+              interopExpectInit  = Just expectInitVal
+            , interopExpectTrail = Just expectTrailVal
+            }
+        }
+
+    simpleRequest :: Proto SimpleRequest
+    simpleRequest =
+        mkSimpleRequest False
+
+    streamingRequest :: Proto StreamingOutputCallRequest
+    streamingRequest =
+        mkStreamingOutputCallRequest [(False, 314159)] (Just 271828)
+
+verifyRespMetadata ::
+     ResponseInitialMetadata (Protobuf TestService meth)
+  -> ResponseTrailingMetadata (Protobuf TestService meth)
+  -> IO ()
+verifyRespMetadata initMeta trailMeta = do
+    assertEqual initMeta $
+      InteropRespInitMeta (Just expectInitVal)
+    assertEqual trailMeta $
+      InteropRespTrailMeta (Just expectTrailVal)
+
+expectInitVal, expectTrailVal :: Strict.ByteString
+expectInitVal  = "test_initial_metadata_value"
+expectTrailVal = BS.Strict.pack [0xab, 0xab, 0xab]
diff --git a/interop/Interop/Client/TestCase/EmptyStream.hs b/interop/Interop/Client/TestCase/EmptyStream.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/EmptyStream.hs
@@ -0,0 +1,20 @@
+module Interop.Client.TestCase.EmptyStream (runTest) where
+
+import Control.Monad
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+
+import Interop.Client.Connect
+import Interop.Cmdline
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#empty_stream>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      withRPC conn def (Proxy @FullDuplexCall) $ \call -> do
+        sendEndOfInput call
+        void $ recvTrailers call
+
diff --git a/interop/Interop/Client/TestCase/EmptyUnary.hs b/interop/Interop/Client/TestCase/EmptyUnary.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/EmptyUnary.hs
@@ -0,0 +1,37 @@
+module Interop.Client.TestCase.EmptyUnary (runTest) where
+
+import Data.Proxy
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#empty_unary>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      withRPC conn def (Proxy @EmptyCall) $ \call -> do
+        sendFinalInput call empty
+        streamElem <- StreamElem.value <$> recvOutputWithMeta call
+
+        -- The test description asks us to also verify the size of the /outgoing/
+        -- message if possible. This information is not readily available in
+        -- @grapesy@, but we will test it implicitly when running the @grapesy@
+        -- interop client against the @grapesy@ interop server.
+
+        case streamElem of
+          Just (meta, resp) -> do
+            assertEqual empty $ resp
+            assertEqual 0     $ inboundUncompressedSize meta
+          Nothing ->
+            assertFailure "Expected response"
+  where
+    empty :: Proto Empty
+    empty = defMessage
diff --git a/interop/Interop/Client/TestCase/LargeUnary.hs b/interop/Interop/Client/TestCase/LargeUnary.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/LargeUnary.hs
@@ -0,0 +1,22 @@
+module Interop.Client.TestCase.LargeUnary (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Client.StreamType.IO
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#large_unary>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn -> do
+      resp <- nonStreaming conn (rpc @UnaryCall) req
+      verifySimpleResponse resp
+  where
+    req :: Proto SimpleRequest
+    req = mkSimpleRequest False
diff --git a/interop/Interop/Client/TestCase/PingPong.hs b/interop/Interop/Client/TestCase/PingPong.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/PingPong.hs
@@ -0,0 +1,55 @@
+module Interop.Client.TestCase.PingPong (runTest) where
+
+import Control.Monad
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#ping_pong>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      withRPC conn def (Proxy @FullDuplexCall) $ \call -> do
+        resps <- collectResponses call [
+                     mkStreamingOutputCallRequest
+                       [(False, expectedResponseSize)]
+                       (Just payloadSize)
+                   | (expectedResponseSize, payloadSize) <- steps
+                   ]
+
+        -- 'collectResponses' will throw an error if we don't receive the
+        -- expected number of responses, so we don't need to check that again
+        zipWithM_ (verifyStreamingOutputCallResponse . fst) steps resps
+  where
+    -- Expected response size and payload size of each step of the test
+    steps :: [(Int, Int)]
+    steps = [
+          (31415, 27182)
+        , (9, 8)
+        , (2653, 1828)
+        , (58979, 45904)
+        ]
+
+    collectResponses ::
+         Call FullDuplexCall
+      -> [Proto StreamingOutputCallRequest]
+      -> IO [Proto StreamingOutputCallResponse]
+    collectResponses call = go
+      where
+        go ::
+             [Proto StreamingOutputCallRequest]
+          -> IO [Proto StreamingOutputCallResponse]
+        go []     = error "impossible"
+        go [r]    = do sendFinalInput call r
+                       (resp, _metadata) <- recvFinalOutput call
+                       return [resp]
+        go (r:rs) = do sendNextInput call r
+                       resp <- recvNextOutput call
+                       (resp:) <$> go rs
diff --git a/interop/Interop/Client/TestCase/ServerCompressedStreaming.hs b/interop/Interop/Client/TestCase/ServerCompressedStreaming.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/ServerCompressedStreaming.hs
@@ -0,0 +1,29 @@
+module Interop.Client.TestCase.ServerCompressedStreaming (runTest) where
+
+import Data.Maybe (isJust)
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server_compressed_streaming>
+runTest :: Cmdline -> IO ()
+runTest cmdline = do
+    withConnection def (testServer cmdline) $ \conn ->
+      withRPC conn def (Proxy @StreamingOutputCall) $ \call -> do
+        sendFinalInput call $ mkStreamingOutputCallRequest expected Nothing
+        verifyStreamingOutputs call (\_ -> return ()) $ [
+            \(meta, resp) -> do
+               assertEqual compressed $ isJust (inboundCompressedSize meta)
+               verifyStreamingOutputCallResponse sz resp
+          | (compressed, sz) <- expected
+          ]
+  where
+    expected :: [(Bool, Int)]
+    expected = [(True, 31415), (False, 92653)]
diff --git a/interop/Interop/Client/TestCase/ServerCompressedUnary.hs b/interop/Interop/Client/TestCase/ServerCompressedUnary.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/ServerCompressedUnary.hs
@@ -0,0 +1,49 @@
+module Interop.Client.TestCase.ServerCompressedUnary (runTest) where
+
+import Data.Maybe (isJust)
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+import Interop.Util.Messages
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server_compressed_unary>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn -> do
+      withRPC conn def (Proxy @UnaryCall) $ \call -> do
+        sendInputWithMeta call $ FinalElem (request True) NoMetadata
+        resp <- recvOutputWithMeta call
+        verifyResponse True (StreamElem.value resp)
+
+      withRPC conn def (Proxy @UnaryCall) $ \call -> do
+        sendInputWithMeta call $ FinalElem (request False) NoMetadata
+        resp <- recvOutputWithMeta call
+        verifyResponse False (StreamElem.value resp)
+  where
+    -- To keep the test simple, we disable /outbound/ compression
+    -- (this test is testing /inbound/ compression)
+    request :: Bool -> (OutboundMeta, Proto SimpleRequest)
+    request expectCompressed = (
+          def { outboundEnableCompression = False }
+        , mkSimpleRequest False
+            & #responseCompressed .~ boolValue expectCompressed
+        )
+
+verifyResponse ::
+     HasCallStack
+  => Bool -> Maybe (InboundMeta, Proto SimpleResponse) -> IO ()
+verifyResponse _expectCompressed Nothing =
+    assertFailure "Expected response"
+verifyResponse expectCompressed (Just (meta, resp)) = do
+    assertEqual expectCompressed $ isJust (inboundCompressedSize meta)
+    verifySimpleResponse resp
+
diff --git a/interop/Interop/Client/TestCase/ServerStreaming.hs b/interop/Interop/Client/TestCase/ServerStreaming.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/ServerStreaming.hs
@@ -0,0 +1,24 @@
+module Interop.Client.TestCase.ServerStreaming (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server_streaming>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn ->
+      withRPC conn def (Proxy @StreamingOutputCall) $ \call -> do
+        sendFinalInput call $ mkStreamingOutputCallRequest expected Nothing
+        verifyStreamingOutputs call (\_ -> return ()) $ [
+            \(_meta, resp) -> verifyStreamingOutputCallResponse sz resp
+          | (_compressed, sz) <- expected
+          ]
+  where
+    expected :: [(Bool, Int)]
+    expected = map (False,) $ [31415, 9, 2653, 58979]
diff --git a/interop/Interop/Client/TestCase/SpecialStatusMessage.hs b/interop/Interop/Client/TestCase/SpecialStatusMessage.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/SpecialStatusMessage.hs
@@ -0,0 +1,43 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Client.TestCase.SpecialStatusMessage (runTest) where
+
+import Data.Text (Text)
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Spec (fromGrpcStatus)
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#special_status_message>
+runTest :: Cmdline -> IO ()
+runTest cmdline = do
+    withConnection def (testServer cmdline) $ \conn -> do
+      withRPC conn def (Proxy @UnaryCall) $ \call -> do
+        sendFinalInput call simpleRequest
+        assertThrows verifyError $ recvFinalOutput call
+  where
+    simpleRequest :: Proto SimpleRequest
+    simpleRequest = defMessage & #responseStatus .~ echoStatus
+
+    -- Spec mandates the use of code 2, which is 'GrpcUnknown'
+    echoStatus :: Proto EchoStatus
+    echoStatus =
+        defMessage
+          & #code    .~ fromIntegral (fromGrpcStatus $ GrpcError GrpcUnknown)
+          & #message .~ statusMessage
+
+    statusMessage :: Text
+    statusMessage =
+        "\t\ntest with whitespace\r\nand Unicode BMP ☺ and non-BMP 😈\t\n"
+
+    verifyError :: GrpcException -> IO ()
+    verifyError err = do
+        assertEqual GrpcUnknown          $ grpcError        err
+        assertEqual (Just statusMessage) $ grpcErrorMessage err
diff --git a/interop/Interop/Client/TestCase/StatusCodeAndMessage.hs b/interop/Interop/Client/TestCase/StatusCodeAndMessage.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/StatusCodeAndMessage.hs
@@ -0,0 +1,51 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Client.TestCase.StatusCodeAndMessage (runTest) where
+
+import Data.Text (Text)
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Spec (fromGrpcStatus)
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#status_code_and_message>
+runTest :: Cmdline -> IO ()
+runTest cmdline = do
+    withConnection def (testServer cmdline) $ \conn -> do
+      -- 1. UnaryCall
+      withRPC conn def (Proxy @UnaryCall) $ \call -> do
+        sendFinalInput call simpleRequest
+        assertThrows verifyError $ recvFinalOutput call
+
+      -- 2. FullDuplexCall
+      withRPC conn def (Proxy @FullDuplexCall) $ \call -> do
+        sendFinalInput call streamingRequest
+        assertThrows verifyError $ recvFinalOutput call
+  where
+    simpleRequest :: Proto SimpleRequest
+    simpleRequest = defMessage & #responseStatus .~ echoStatus
+
+    streamingRequest :: Proto StreamingOutputCallRequest
+    streamingRequest = defMessage & #responseStatus .~ echoStatus
+
+    -- Spec mandates the use of code 2, which is 'GrpcUnknown'
+    echoStatus :: Proto EchoStatus
+    echoStatus =
+        defMessage
+          & #code    .~ fromIntegral (fromGrpcStatus $ GrpcError GrpcUnknown)
+          & #message .~ statusMessage
+
+    statusMessage :: Text
+    statusMessage = "test status message"
+
+    verifyError :: GrpcException -> IO ()
+    verifyError err = do
+        assertEqual GrpcUnknown          $ grpcError        err
+        assertEqual (Just statusMessage) $ grpcErrorMessage err
diff --git a/interop/Interop/Client/TestCase/TimeoutOnSleepingServer.hs b/interop/Interop/Client/TestCase/TimeoutOnSleepingServer.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/TimeoutOnSleepingServer.hs
@@ -0,0 +1,35 @@
+module Interop.Client.TestCase.TimeoutOnSleepingServer (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Interop.Client.Common
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#timeout_on_sleeping_server>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn -> do
+      assertThrows (assertEqual GrpcDeadlineExceeded . grpcError) $
+        assertTerminatesWithinSeconds 1 $
+          withRPC conn callParams (Proxy @FullDuplexCall) $ \call -> do
+            sendNextInput call req
+            -- We wait for a response, but we didn't request any, so we never
+            -- get one; meanwhile, the server is waiting for the /next/
+            -- 'StreamingOutputCallRequest'. Therefore, the call is only closed
+            -- once the timeout is reached.
+            _resp <- recvNextOutput call
+            return ()
+  where
+    callParams :: CallParams FullDuplexCall
+    callParams = def {
+          callTimeout = Just $ Timeout Millisecond (TimeoutValue 1)
+        }
+
+    req :: Proto StreamingOutputCallRequest
+    req = mkStreamingOutputCallRequest [] (Just 27182)
diff --git a/interop/Interop/Client/TestCase/UnimplementedMethod.hs b/interop/Interop/Client/TestCase/UnimplementedMethod.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/UnimplementedMethod.hs
@@ -0,0 +1,19 @@
+module Interop.Client.TestCase.UnimplementedMethod (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Client.StreamType.IO
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#unimplemented_method>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn -> do
+      assertThrows (assertEqual GrpcUnimplemented . grpcError) $
+        nonStreaming conn (rpc @UnimplementedCall) defMessage
diff --git a/interop/Interop/Client/TestCase/UnimplementedService.hs b/interop/Interop/Client/TestCase/UnimplementedService.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Client/TestCase/UnimplementedService.hs
@@ -0,0 +1,19 @@
+module Interop.Client.TestCase.UnimplementedService (runTest) where
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Client.StreamType.IO
+
+import Interop.Client.Connect
+import Interop.Cmdline
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+-- | <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#unimplemented_service>
+runTest :: Cmdline -> IO ()
+runTest cmdline =
+    withConnection def (testServer cmdline) $ \conn -> do
+      assertThrows (assertEqual GrpcUnimplemented . grpcError) $
+        nonStreaming conn (rpc @UnimplementedServiceCall) defMessage
diff --git a/interop/Interop/Cmdline.hs b/interop/Interop/Cmdline.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Cmdline.hs
@@ -0,0 +1,362 @@
+module Interop.Cmdline (
+    getCmdline
+  , defaultCmdline
+    -- * Definition
+  , Cmdline(..)
+  , cmdPort
+  , Mode(..)
+  , TestCase(..)
+  ) where
+
+import Data.Foldable (asum)
+import Network.Socket (PortNumber, HostName)
+import Options.Applicative ((<**>))
+import Options.Applicative qualified as Opt
+
+import Network.GRPC.Common
+
+import Paths_grapesy
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+data Cmdline = Cmdline {
+
+      --
+      -- Command line arguments used by the gRPC test suite
+      --
+
+      cmdMode         :: Mode
+    , cmdPortOverride :: Maybe PortNumber
+    , cmdUseTLS       :: Bool
+    , cmdTestCase     :: Maybe TestCase
+    , cmdHost         :: HostName
+
+      -- | @:authority@/SNI hostname override
+    , cmdServerHostOverride :: Maybe HostName
+
+      -- | Use test certificate as root CA?
+    , cmdUseTestCA :: Bool
+
+      --
+      -- Additional command line arguments
+      --
+
+    , cmdRootCA    :: FilePath
+    , cmdPubCert   :: FilePath
+    , cmdPrivKey   :: FilePath
+    , cmdSslKeyLog :: SslKeyLog
+
+    , cmdTimeoutTest    :: Int
+    , cmdTimeoutConnect :: Int
+
+    , cmdSkipTest              :: [TestCase]
+    , cmdSkipCompression       :: Bool
+    , cmdSkipClientCompression :: Bool
+    }
+  deriving (Show)
+
+cmdPort :: Cmdline -> PortNumber
+cmdPort Cmdline{cmdPortOverride, cmdMode, cmdUseTLS} =
+    case (cmdPortOverride, cmdMode, cmdUseTLS) of
+      (Just port, _, _) -> port
+      (_, SelfTest, _)  -> 0
+      (_, _, False)     -> defaultInsecurePort
+      (_, _, True)      -> defaultSecurePort
+
+data Mode =
+    Server   -- ^ Interop server (against reference client)
+  | Client   -- ^ Interop client (against reference server)
+  | Ping     -- ^ Ping the grapesy server (for debugging connectivity)
+  | SelfTest -- ^ Run interop tests against itself
+  deriving (Show)
+
+-- | Interop test cases
+--
+-- The test cases are described at
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md>.
+--
+-- Currently unsupported:
+--
+-- * @cacheable_unary@
+-- * @compute_engine_creds@
+-- * @jwt_token_creds@
+-- * @oauth2_auth_token@
+-- * @per_rpc_creds@
+-- * @google_default_credentials@
+-- * @compute_engine_channel_credentials@
+-- * @rpc_soak@
+-- * @channel_soak@
+--
+-- None of the reference clients we have tested with support these.
+--
+-- Also unsupported:
+--
+-- * @orca_per_rpc@
+-- * @orca_oob@
+--
+-- These /are/ supported by some reference clients, but use features we do not
+-- currently provide.
+data TestCase =
+    TestEmptyUnary
+  | TestLargeUnary
+  | TestClientCompressedUnary
+  | TestServerCompressedUnary
+  | TestClientStreaming
+  | TestClientCompressedStreaming
+  | TestServerStreaming
+  | TestServerCompressedStreaming
+  | TestPingPong
+  | TestEmptyStream
+  | TestCustomMetadata
+  | TestStatusCodeAndMessage
+  | TestSpecialStatusMessage
+  | TestUnimplementedMethod
+  | TestUnimplementedService
+  | TestCancelAfterBegin
+  | TestCancelAfterFirstResponse
+  | TestTimeoutOnSleepingServer
+  deriving (Eq, Enum, Bounded)
+
+instance Show TestCase where
+  show TestEmptyUnary                = "empty_unary"
+  show TestLargeUnary                = "large_unary"
+  show TestClientCompressedUnary     = "client_compressed_unary"
+  show TestServerCompressedUnary     = "server_compressed_unary"
+  show TestClientStreaming           = "client_streaming"
+  show TestClientCompressedStreaming = "client_compressed_streaming"
+  show TestServerStreaming           = "server_streaming"
+  show TestServerCompressedStreaming = "server_compressed_streaming"
+  show TestPingPong                  = "ping_pong"
+  show TestEmptyStream               = "empty_stream"
+  show TestCustomMetadata            = "custom_metadata"
+  show TestStatusCodeAndMessage      = "status_code_and_message"
+  show TestSpecialStatusMessage      = "special_status_message"
+  show TestUnimplementedMethod       = "unimplemented_method"
+  show TestUnimplementedService      = "unimplemented_service"
+  show TestCancelAfterBegin          = "cancel_after_begin"
+  show TestCancelAfterFirstResponse  = "cancel_after_first_response"
+  show TestTimeoutOnSleepingServer   = "timeout_on_sleeping_server"
+
+{-------------------------------------------------------------------------------
+  Get command line args
+-------------------------------------------------------------------------------}
+
+defaultCmdline :: IO Cmdline
+defaultCmdline = do
+    rootCA  <- getDataFileName "interop-ca.pem"
+    pubCert <- getDataFileName "interop.pem"
+    privKey <- getDataFileName "interop.key"
+
+    return Cmdline {
+        cmdMode                  = error "cmdMode: no default"
+      , cmdPortOverride          = Nothing
+      , cmdUseTLS                = True
+      , cmdTestCase              = Nothing
+      , cmdHost                  = "127.0.0.1"
+      , cmdServerHostOverride    = Just "foo.test.google.fr"
+      , cmdUseTestCA             = True
+      , cmdRootCA                = rootCA
+      , cmdPubCert               = pubCert
+      , cmdPrivKey               = privKey
+      , cmdSslKeyLog             = SslKeyLogNone
+      , cmdTimeoutTest           = 5
+      , cmdTimeoutConnect        = 5
+      , cmdSkipTest              = []
+      , cmdSkipCompression       = False
+      , cmdSkipClientCompression = False
+      }
+
+getCmdline :: IO Cmdline
+getCmdline = do
+    defaults <- defaultCmdline
+
+    let parser :: Opt.Parser Cmdline
+        parser = parseCmdline defaults
+
+    let opts :: Opt.ParserInfo Cmdline
+        opts =
+            Opt.info (parser <**> Opt.helper) $ mconcat [
+                Opt.fullDesc
+              , Opt.progDesc "Server and client for official gRPC interop tests"
+              ]
+
+    Opt.execParser opts
+
+{-------------------------------------------------------------------------------
+  Parsers
+-------------------------------------------------------------------------------}
+
+parseCmdline :: Cmdline -> Opt.Parser Cmdline
+parseCmdline defaults =
+    Cmdline
+      <$> parseMode
+
+      --
+      -- gRPC test suite command line arguments
+      --
+
+      <*> (Opt.optional $ asum [
+              Opt.option Opt.auto $ mconcat [
+                  Opt.long "server_port"
+                , Opt.help "Alternative spelling for --port"
+                ]
+            , Opt.option Opt.auto $ mconcat [
+                  Opt.long "port"
+                , Opt.help "Override default port. If not specified, will use 50051 if TLS is disabled, 50052 is TLS enabled, and 0 for self-tests (i.e., pick an arbitrary available port number)."
+                ]
+            ])
+      <*> (Opt.option readBool $ mconcat [
+              Opt.long "use_tls"
+            , Opt.help "Enable TLS"
+            , Opt.value (cmdUseTLS defaults)
+            , Opt.showDefault
+            ])
+      <*> (Opt.optional $ Opt.option readTestCase $ mconcat [
+              Opt.long "test_case"
+            , Opt.help "Test case (ignored by the server; if not specified in the client, run all tests)"
+            ])
+      <*> (Opt.option Opt.str $ mconcat [
+              Opt.long "server_host"
+            , Opt.help "Address to bind to (when running as server) or to connect to (as client)"
+            , Opt.value (cmdHost defaults)
+            , Opt.showDefault
+            ])
+      <*> (Opt.option readOptionalString $ mconcat [
+              Opt.long "server_host_override"
+            , Opt.help ":authority/SNI override (set to empty to disable)"
+            , Opt.value (cmdServerHostOverride defaults)
+            , Opt.showDefault
+            ])
+      <*> (Opt.option readBool $ mconcat [
+              Opt.long "use_test_ca"
+            , Opt.help "Use test certificate as root CA"
+            , Opt.value (cmdUseTestCA defaults)
+            , Opt.showDefault
+            ])
+
+      --
+      -- Additional command line arguments
+      --
+
+      <*> (Opt.strOption $ mconcat [
+              Opt.long "root_ca"
+            , Opt.value (cmdRootCA defaults)
+            , Opt.showDefault
+            , Opt.help "Root certificate authority"
+            ])
+      <*> (Opt.strOption $ mconcat [
+              Opt.long "pub_cert"
+            , Opt.value (cmdPubCert defaults)
+            , Opt.showDefault
+            , Opt.help "Server certificate"
+            ])
+      <*> (Opt.strOption $ mconcat [
+              Opt.long "priv_key"
+             ,Opt.value (cmdPrivKey defaults)
+            , Opt.showDefault
+            , Opt.help "Server private key"
+            ])
+      <*> parseSslkeyLog
+
+      <*> (Opt.option Opt.auto $ mconcat [
+               Opt.long "test_timeout"
+             , Opt.metavar "SEC"
+             , Opt.showDefault
+             , Opt.value (cmdTimeoutTest defaults)
+             , Opt.help "Test timeout"
+             ])
+      <*> (Opt.option Opt.auto $ mconcat [
+               Opt.long "connect_timeout"
+             , Opt.metavar "SEC"
+             , Opt.showDefault
+             , Opt.value (cmdTimeoutConnect defaults)
+             , Opt.help "Timeout for trying to connect to the server"
+             ])
+
+      <*> (Opt.many $ Opt.option readTestCase $ mconcat [
+              Opt.long "skip_test"
+            , Opt.help "Skip test case (all --skip-xyz arguments are ignored by the server)"
+            ])
+      <*> (Opt.switch $ mconcat [
+              Opt.long "skip_compression"
+            , Opt.help "Skip compression tests"
+            ])
+      <*> (Opt.switch $ mconcat [
+              Opt.long "skip_client_compression"
+            , Opt.help "Skip client compression tests"
+            ])
+
+parseSslkeyLog :: Opt.Parser SslKeyLog
+parseSslkeyLog = asum [
+      Opt.flag' SslKeyLogFromEnv $ mconcat [
+          Opt.long "key_log_from_env"
+        , Opt.help "Set SSL key logging based on SSLKEYLOGFILE (default is no logging)"
+        ]
+    , fmap SslKeyLogPath $ Opt.strOption $ mconcat [
+          Opt.long "key_log_path"
+        , Opt.help "Set the SSL key logging filepath"
+        ]
+    , pure SslKeyLogNone
+    ]
+
+parseMode :: Opt.Parser Mode
+parseMode = asum [
+      Opt.flag' Server $ mconcat [
+          Opt.long "server"
+        , Opt.help "Run in server mode"
+        ]
+    , Opt.flag' Client $ mconcat [
+          Opt.long "client"
+        , Opt.help "Run in client mode"
+        ]
+    , Opt.flag' Ping $ mconcat [
+          Opt.long "ping"
+        , Opt.help "Ping the server (to verify that we can reach it)"
+        ]
+    , Opt.flag' SelfTest $ mconcat [
+          Opt.long "self-test"
+        , Opt.help "Run grapesy interop tests against itself (this is the default)"
+        ]
+    , pure SelfTest
+    ]
+
+readBool :: Opt.ReadM Bool
+readBool = Opt.str >>= aux
+  where
+    aux :: String -> Opt.ReadM Bool
+    aux "true"  = return True
+    aux "false" = return False
+    aux x       = fail $ "Could not parse bool " ++ show x
+
+readOptionalString :: Opt.ReadM (Maybe String)
+readOptionalString = Opt.str >>= aux
+  where
+    aux :: String -> Opt.ReadM (Maybe String)
+    aux ""  = return Nothing
+    aux str = return $ Just str
+
+readTestCase :: Opt.ReadM TestCase
+readTestCase = Opt.str >>= aux
+  where
+    aux :: String -> Opt.ReadM TestCase
+    aux "cancel_after_begin"          = return TestCancelAfterBegin
+    aux "cancel_after_first_response" = return TestCancelAfterFirstResponse
+    aux "client_compressed_streaming" = return TestClientCompressedStreaming
+    aux "client_compressed_unary"     = return TestClientCompressedUnary
+    aux "client_streaming"            = return TestClientStreaming
+    aux "custom_metadata"             = return TestCustomMetadata
+    aux "empty_stream"                = return TestEmptyStream
+    aux "empty_unary"                 = return TestEmptyUnary
+    aux "large_unary"                 = return TestLargeUnary
+    aux "ping_pong"                   = return TestPingPong
+    aux "server_compressed_streaming" = return TestServerCompressedStreaming
+    aux "server_compressed_unary"     = return TestServerCompressedUnary
+    aux "server_streaming"            = return TestServerStreaming
+    aux "special_status_message"      = return TestSpecialStatusMessage
+    aux "status_code_and_message"     = return TestStatusCodeAndMessage
+    aux "timeout_on_sleeping_server"  = return TestTimeoutOnSleepingServer
+    aux "unimplemented_method"        = return TestUnimplementedMethod
+    aux "unimplemented_service"       = return TestUnimplementedService
+    aux x                             = fail $ "Unknown test case " ++ show x
diff --git a/interop/Interop/SelfTest.hs b/interop/Interop/SelfTest.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/SelfTest.hs
@@ -0,0 +1,28 @@
+-- | Run the interop tests against itself
+module Interop.SelfTest (selfTest) where
+
+import Network.GRPC.Server.Run
+
+import Interop.Client (runInteropClient)
+import Interop.Client.Ping
+import Interop.Cmdline
+import Interop.Server (withInteropServer)
+
+selfTest :: Cmdline -> IO ()
+selfTest cmdline = do
+    -- Start the server
+    withInteropServer cmdline $ \server -> do
+
+      -- Ask the server for its port
+      port <- getServerPort server
+      let cmdline' = cmdline{cmdMode = Client, cmdPortOverride = Just port}
+
+      -- Give the server a chance to get ready
+      --
+      -- We could configure the client to automatically reconnect, but this
+      -- changes the semantics of doing RPCs (and in a way that the spec says
+      -- should /not/ be done by default), so we prefer to do things this way.
+      waitReachable cmdline'
+
+      -- Run the client; when the client terminates, we're done
+      runInteropClient cmdline'
diff --git a/interop/Interop/Server.hs b/interop/Interop/Server.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server.hs
@@ -0,0 +1,132 @@
+module Interop.Server (
+      withInteropServer
+    , runInteropServer
+    ) where
+
+import Control.Exception
+import Control.Monad.Catch (generalBracket, ExitCase(..))
+
+import Network.GRPC.Common
+import Network.GRPC.Server
+import Network.GRPC.Server.Protobuf
+import Network.GRPC.Server.Run
+import Network.GRPC.Server.StreamType
+
+import Interop.Cmdline
+
+import Interop.Server.PingService.Ping                qualified as Ping
+import Interop.Server.TestService.EmptyCall           qualified as EmptyCall
+import Interop.Server.TestService.FullDuplexCall      qualified as FullDuplexCall
+import Interop.Server.TestService.StreamingInputCall  qualified as StreamingInputCall
+import Interop.Server.TestService.StreamingOutputCall qualified as StreamingOutputCall
+import Interop.Server.TestService.UnaryCall           qualified as UnaryCall
+
+import Proto.API.Interop
+import Proto.API.Ping
+
+{-------------------------------------------------------------------------------
+  Handlers
+
+  The expected server functionality is described at
+  <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server>
+
+  The relevant @.proto@ definitions are
+
+  * @grpc-repo/src/proto/grpc/testing/test.proto@ (main service definition)
+  * @grpc-repo/src/proto/grpc/testing/messages.proto@ (most message types)
+  * @grpc-repo/src/proto/grpc/testing/empty.proto@ (@Empty@ message)
+-------------------------------------------------------------------------------}
+
+methodsPingService :: Methods IO (ProtobufMethodsOf PingService)
+methodsPingService =
+      Method (mkNonStreaming Ping.handle)
+    $ NoMoreMethods
+
+methodsTestService :: Methods IO (ProtobufMethodsOf TestService)
+methodsTestService =
+      UnsupportedMethod -- cacheableUnaryCall
+    $ Method    (mkNonStreaming EmptyCall.handle)
+    $ RawMethod (mkRpcHandler FullDuplexCall.handle)
+    $ UnsupportedMethod -- halfDuplexCall
+    $ RawMethod (mkRpcHandler StreamingInputCall.handle)
+    $ RawMethod (mkRpcHandler StreamingOutputCall.handle)
+    $ RawMethod (mkRpcHandler UnaryCall.handle)
+    $ UnsupportedMethod -- unimplementedCall
+    $ NoMoreMethods
+
+services :: Services IO (ProtobufServices '[PingService, TestService])
+services =
+      Service methodsPingService
+    $ Service methodsTestService
+    $ NoMoreServices
+
+{-------------------------------------------------------------------------------
+  Main server definition
+-------------------------------------------------------------------------------}
+
+withInteropServer :: Cmdline -> (RunningServer -> IO a) -> IO a
+withInteropServer cmdline k = do
+    server <- mkGrpcServer serverParams $ fromServices services
+    forkServer def serverConfig server k
+  where
+    serverConfig :: ServerConfig
+    serverConfig
+      | cmdUseTLS cmdline
+      = ServerConfig {
+            serverInsecure = Nothing
+          , serverSecure   = Just SecureConfig {
+                secureHost       = "0.0.0.0"
+              , securePort       = cmdPort cmdline
+              , securePubCert    = cmdPubCert cmdline
+              , secureChainCerts = []
+              , securePrivKey    = cmdPrivKey cmdline
+              , secureSslKeyLog  = cmdSslKeyLog cmdline
+              }
+          }
+
+     | otherwise
+     = ServerConfig {
+            serverSecure   = Nothing
+          , serverInsecure = Just InsecureConfig {
+                insecureHost = Just "127.0.0.1"
+              , insecurePort = cmdPort cmdline
+              }
+          }
+
+    serverParams :: ServerParams
+    serverParams = def {
+          serverTopLevel      = swallowExceptions
+        , serverVerifyHeaders = True
+        }
+
+    -- Don't show handler exceptions on stderr
+    swallowExceptions :: RequestHandler () -> RequestHandler ()
+    swallowExceptions h unmask req resp = h unmask req resp `catch` handler
+      where
+        handler :: SomeException -> IO ()
+        handler _ = return ()
+
+runInteropServer :: Cmdline -> IO ()
+runInteropServer cmdline = withInteropServer cmdline $ \server ->
+    showStartStop $
+      waitServer server
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary
+-------------------------------------------------------------------------------}
+
+showStartStop :: forall a. IO a -> IO a
+showStartStop act = fst <$>
+    generalBracket
+      start
+      (\() -> stop)
+      (\() -> act)
+  where
+    start :: IO ()
+    start = putStrLn "grapesy interop server started"
+
+    stop :: ExitCase a -> IO ()
+    stop (ExitCaseSuccess _)   = putStrLn $ "server terminated normally"
+    stop (ExitCaseException e) = putStrLn $ "server exception: " ++ show e
+    stop  ExitCaseAbort        = error "impossible in IO"
+
diff --git a/interop/Interop/Server/Common.hs b/interop/Interop/Server/Common.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/Common.hs
@@ -0,0 +1,93 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Functionality required by many handlers
+module Interop.Server.Common (
+    constructResponseMetadata
+  , echoStatus
+  , checkInboundCompression
+  ) where
+
+import Control.Exception
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server
+import Network.GRPC.Spec (toGrpcStatus)
+
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+{-------------------------------------------------------------------------------
+  Dealing with the test-suite's message types
+-------------------------------------------------------------------------------}
+
+-- | Construct response metadata
+--
+-- Sends the initial response metadata now, and returns the trailing metadata.
+--
+-- See <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#custom_metadata>
+constructResponseMetadata ::
+     Call (Protobuf TestService rpc)
+  -> IO InteropRespTrailMeta
+constructResponseMetadata call = do
+    requestMetadata <- getRequestMetadata call
+
+    let initMeta  :: InteropRespInitMeta
+        trailMeta :: InteropRespTrailMeta
+
+        initMeta  = InteropRespInitMeta  $ interopExpectInit  requestMetadata
+        trailMeta = InteropRespTrailMeta $ interopExpectTrail requestMetadata
+
+    -- Send initial metadata
+    setResponseInitialMetadata call initMeta
+    initiateResponse call
+
+    -- Return the final metadata to be sent at the end of the call
+    return trailMeta
+  where
+
+-- | Echo any non-OK status back to the client
+--
+-- Does nothing if @code@ is set to @0@ ('GrpcOk').
+--
+-- See <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#status_code_and_message>
+echoStatus :: Proto EchoStatus -> IO ()
+echoStatus status =
+    case toGrpcStatus code of
+      Just GrpcOk ->
+        return ()
+      Just (GrpcError err) ->
+        throwIO $ GrpcException {
+            grpcError         = err
+          , grpcErrorMessage  = Just $ status ^. #message
+          , grpcErrorDetails  = Nothing
+          , grpcErrorMetadata = []
+          }
+      Nothing ->
+        assertUnrecognized code
+  where
+    code :: Word
+    code = fromIntegral $ status ^. #code
+
+checkInboundCompression :: Bool -> InboundMeta -> IO ()
+checkInboundCompression expectCompressed meta =
+    case (expectCompressed, inboundCompressedSize meta) of
+      (True, Just _) ->
+        return ()
+      (False, Nothing) ->
+        return ()
+      (True, Nothing) ->
+        throwIO GrpcException {
+            grpcError         = GrpcInvalidArgument
+          , grpcErrorMessage  = Just "Expected compressed message"
+          , grpcErrorDetails  = Nothing
+          , grpcErrorMetadata = []
+          }
+      (False, Just _) ->
+        throwIO GrpcException {
+            grpcError         = GrpcInvalidArgument
+          , grpcErrorMessage  = Just "Expected uncompressed message"
+          , grpcErrorDetails  = Nothing
+          , grpcErrorMetadata = []
+          }
diff --git a/interop/Interop/Server/PingService/Ping.hs b/interop/Interop/Server/PingService/Ping.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/PingService/Ping.hs
@@ -0,0 +1,11 @@
+module Interop.Server.PingService.Ping (handle) where
+
+import Network.GRPC.Common.Protobuf
+
+import Proto.Ping
+
+-- | Handle @PingService.Ping@
+--
+-- This is not part of the gRPC interop tests, but an internal debugging tool.
+handle :: Proto PingMessage -> IO (Proto PongMessage)
+handle ping = return $ defMessage & #id .~ (ping ^. #id)
diff --git a/interop/Interop/Server/TestService/EmptyCall.hs b/interop/Interop/Server/TestService/EmptyCall.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/TestService/EmptyCall.hs
@@ -0,0 +1,12 @@
+module Interop.Server.TestService.EmptyCall (handle) where
+
+import Network.GRPC.Common.Protobuf
+
+import Proto.API.Interop
+
+-- | Handle @TestService.EmptyCall@
+--
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#emptycall>
+handle :: Proto Empty -> IO (Proto Empty)
+handle _ = return defMessage
+
diff --git a/interop/Interop/Server/TestService/FullDuplexCall.hs b/interop/Interop/Server/TestService/FullDuplexCall.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/TestService/FullDuplexCall.hs
@@ -0,0 +1,33 @@
+module Interop.Server.TestService.FullDuplexCall (handle) where
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server
+
+import Interop.Server.Common
+import Interop.Server.TestService.StreamingOutputCall qualified as StreamingOutputCall
+
+import Proto.API.Interop
+
+-- | Handle @TestService.FullDuplexCall@
+--
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#fullduplexcall>
+handle :: Call FullDuplexCall -> IO ()
+handle call = do
+    trailers <- constructResponseMetadata call
+
+    let handleRequest :: Proto StreamingOutputCallRequest -> IO ()
+        handleRequest request = do
+            StreamingOutputCall.handleRequest call request
+            echoStatus (request ^. #responseStatus)
+
+        loop :: IO ()
+        loop = do
+            streamElem <- recvInput call
+            case streamElem of
+              StreamElem  r   -> handleRequest r >> loop
+              FinalElem   r _ -> handleRequest r
+              NoMoreElems   _ -> return ()
+
+    loop
+    sendTrailers call trailers
diff --git a/interop/Interop/Server/TestService/StreamingInputCall.hs b/interop/Interop/Server/TestService/StreamingInputCall.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/TestService/StreamingInputCall.hs
@@ -0,0 +1,43 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Server.TestService.StreamingInputCall (handle) where
+
+import Data.ByteString qualified as BS.Strict
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server
+
+import Interop.Server.Common
+
+import Proto.API.Interop
+
+-- | Handle @TestService.StreamingInputCall@
+--
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#streaminginputcall>
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#client_compressed_streaming>
+handle :: Call StreamingInputCall -> IO ()
+handle call = do
+    sz <- loop 0
+
+    let response :: Proto StreamingInputCallResponse
+        response = defMessage & #aggregatedPayloadSize .~ fromIntegral sz
+
+    sendFinalOutput call (response, def)
+  where
+    -- Returns the sum of all request payload bodies received.
+    loop :: Int -> IO Int
+    loop !acc = do
+        streamElem <- recvInputWithMeta call
+        case streamElem of
+          StreamElem  r   -> handleRequest r >>= \sz -> loop (acc + sz)
+          FinalElem   r _ -> handleRequest r >>= \sz -> return $ acc + sz
+          NoMoreElems   _ -> return acc
+
+    handleRequest :: (InboundMeta, Proto StreamingInputCallRequest) -> IO Int
+    handleRequest (meta, request) = do
+        checkInboundCompression expectCompressed meta
+        return $ BS.Strict.length (request ^. #payload ^. #body)
+      where
+        expectCompressed :: Bool
+        expectCompressed = request ^. #expectCompressed ^. #value
diff --git a/interop/Interop/Server/TestService/StreamingOutputCall.hs b/interop/Interop/Server/TestService/StreamingOutputCall.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/TestService/StreamingOutputCall.hs
@@ -0,0 +1,53 @@
+module Interop.Server.TestService.StreamingOutputCall (
+    handle
+  , handleRequest
+  ) where
+
+import Control.Concurrent
+import Control.Monad
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server
+
+import Interop.Util.Messages
+
+import Proto.API.Interop
+
+-- | Handle @TestService.StreamingOutputCall@
+--
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#streamingoutputcall>
+handle :: Call StreamingOutputCall -> IO ()
+handle call = do
+    request <- recvFinalInput call
+    handleRequest call request
+    sendTrailers call def
+
+-- | Handle specific request
+--
+-- Abstracted out because also used in the @fullDuplexCall@ test.
+handleRequest :: forall rpc.
+     (Output rpc ~ Proto StreamingOutputCallResponse)
+  => Call rpc
+  -> Proto StreamingOutputCallRequest
+  -> IO ()
+handleRequest call request =
+    forM_ (request ^. #responseParameters) $ \responseParameters -> do
+      let size, intervalUs :: Int
+          size       = fromIntegral $ responseParameters ^. #size
+          intervalUs = fromIntegral $ responseParameters ^. #intervalUs
+
+          shouldCompress :: Bool
+          shouldCompress = responseParameters ^. #compressed ^. #value
+
+      payload <- payloadOfType (Proto COMPRESSABLE) size
+
+      let meta :: OutboundMeta
+          meta = def { outboundEnableCompression = shouldCompress }
+
+          response :: Proto StreamingOutputCallResponse
+          response = defMessage & #payload .~ payload
+
+      sendOutputWithMeta call $ StreamElem (meta, response)
+      threadDelay intervalUs
+
diff --git a/interop/Interop/Server/TestService/UnaryCall.hs b/interop/Interop/Server/TestService/UnaryCall.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Server/TestService/UnaryCall.hs
@@ -0,0 +1,55 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Server.TestService.UnaryCall (handle) where
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+import Network.GRPC.Server
+
+import Interop.Server.Common
+import Interop.Util.Messages
+
+import Proto.API.Interop
+
+-- | Handle @TestService.UnaryCall@
+--
+-- This is not implemented using the Protobuf communication patterns because
+-- we need to deal with metadata.
+--
+-- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#unarycall>
+handle :: Call UnaryCall -> IO ()
+handle call = do
+    -- Send initial metadata, hold on the trailers
+    trailers <- constructResponseMetadata call
+
+    -- Wait for the request
+    (inboundMeta, request) <- do
+      streamElem <- recvInputWithMeta call
+      case StreamElem.value streamElem of
+        Nothing -> fail "Expected element"
+        Just x  -> return x
+
+    -- Check compression of the input
+    -- <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#client_compressed_unary>
+    let expectCompressed :: Bool
+        expectCompressed = request ^. #expectCompressed . #value
+    checkInboundCompression expectCompressed inboundMeta
+
+    -- Send response
+    payload <- payloadOfType (request ^. #responseType) (request ^. #responseSize)
+
+    let outboundMeta :: OutboundMeta
+        outboundMeta = def {
+              outboundEnableCompression =
+                request ^. #responseCompressed . #value
+            }
+
+        response :: Proto SimpleResponse
+        response = defMessage & #payload .~ payload
+
+    sendOutputWithMeta call $ StreamElem (outboundMeta, response)
+
+    -- Send status and trailers
+    echoStatus (request ^. #responseStatus)
+    sendTrailers call trailers
diff --git a/interop/Interop/Util/ANSI.hs b/interop/Interop/Util/ANSI.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Util/ANSI.hs
@@ -0,0 +1,62 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Interop.Util.ANSI (
+    Doc(Color, Show)
+  , putDoc
+  , putDocLn
+    -- * Re-exports
+  , ColorIntensity(..)
+  , Color(..)
+  , IsString(..)
+  ) where
+
+import Data.String
+import System.Console.ANSI
+import System.IO
+
+data Doc =
+    Color Color Doc
+  | String String
+  | forall a. Show a => Show a
+  | Empty
+  | Append Doc Doc
+
+instance Semigroup Doc where (<>)       = Append
+instance Monoid    Doc where mempty     = Empty
+instance IsString  Doc where fromString = String
+
+putDoc :: Doc -> IO ()
+putDoc = \doc -> do
+    stdoutSupportsANSI <- hSupportsANSIColor stdout
+    if stdoutSupportsANSI
+      then go doc
+      else putStr $ flattenDoc doc
+  where
+    -- By rights we should keep track of the state of the console here, so that
+    -- we can properly deal with nesting, rather than just resetting everything.
+    -- For now this is good enough.
+    go :: Doc -> IO ()
+    go (Color color doc) = do
+      setSGR [SetColor Foreground Vivid color]
+      go doc
+      setSGR [Reset]
+    go (String str) =
+      putStr str
+    go (Show x) =
+      putStr $ show x
+    go Empty =
+      return ()
+    go (Append doc1 doc2) = do
+      go doc1
+      go doc2
+
+putDocLn :: Doc -> IO ()
+putDocLn doc = putDoc (doc <> "\n")
+
+flattenDoc :: Doc -> String
+flattenDoc (Color _ doc)      = flattenDoc doc
+flattenDoc (String str)       = str
+flattenDoc (Show x)           = show x
+flattenDoc Empty              = mempty
+flattenDoc (Append doc1 doc2) = mappend (flattenDoc doc1) (flattenDoc doc2)
+
diff --git a/interop/Interop/Util/Exceptions.hs b/interop/Interop/Util/Exceptions.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Util/Exceptions.hs
@@ -0,0 +1,84 @@
+module Interop.Util.Exceptions (
+    TestSkipped(..)
+  , TestUnimplemented(..)
+    -- * Test failures
+  , TestFailure(..)
+  , assertFailure
+  , assertUnrecognized
+  , assertBool
+  , assertEqual
+  , assertThrows
+  , assertTerminatesWithinSeconds
+    -- * Re-exports
+  , HasCallStack
+  , throwIO
+  ) where
+
+import Control.Exception
+import Data.List (intercalate)
+import GHC.Stack
+import System.Timeout
+
+data TestSkipped = TestSkipped String
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+data TestUnimplemented = TestUnimplemented
+  deriving stock (Show)
+
+instance Exception TestUnimplemented where
+  displayException TestUnimplemented = "test unimplemented"
+
+{-------------------------------------------------------------------------------
+  Test failures
+
+  The output of the test messages is relatively minimal: we show only a
+  callstack, so that we know /which/ test failed, and any runtime values.
+-------------------------------------------------------------------------------}
+
+data TestFailure =
+     TestFailure {
+         failureCallStack :: CallStack
+       , failureMessage   :: String
+       }
+  deriving stock (Show)
+
+instance Exception TestFailure where
+  displayException (TestFailure cs msg) = intercalate "\n" [
+      msg
+    , prettyCallStack cs
+    ]
+
+assertFailure :: HasCallStack => String -> IO x
+assertFailure = throwIO . TestFailure callStack
+
+assertUnrecognized :: (HasCallStack, Show a) => a -> IO x
+assertUnrecognized x = assertFailure $ "Unrecognized: " ++ show x
+
+assertBool :: HasCallStack => Bool -> IO ()
+assertBool True  = return ()
+assertBool False = assertFailure "Predicate failed"
+
+assertEqual :: (HasCallStack, Eq a, Show a) => a -> a -> IO ()
+assertEqual expected actual
+  | expected == actual
+  = return ()
+
+  | otherwise
+  = assertFailure $ "Expected: " ++ show expected ++ ", actual: " ++ show actual
+
+assertThrows :: (HasCallStack, Exception e) => (e -> IO ()) -> IO a -> IO ()
+assertThrows p io = do
+    ma <- try io
+    case ma of
+      Right _  -> assertFailure "Expected exception"
+      Left err -> p err
+
+assertTerminatesWithinSeconds :: Int -> IO () -> IO ()
+assertTerminatesWithinSeconds s io = do
+    result <- timeout (s * 1_000_000) io
+    case result of
+      Nothing -> assertFailure "Timeout"
+      Just () -> return ()
+
+
diff --git a/interop/Interop/Util/Messages.hs b/interop/Interop/Util/Messages.hs
new file mode 100644
--- /dev/null
+++ b/interop/Interop/Util/Messages.hs
@@ -0,0 +1,60 @@
+-- | Utilities for working with the message types from the interop testsuite
+module Interop.Util.Messages (
+    -- * BoolValue
+    boolValue
+    -- * Payload
+  , payloadOfZeroes
+  , payloadOfType
+  , clearPayload
+  ) where
+
+import Data.ByteString qualified as BS.Strict
+import Data.ByteString qualified as Strict (ByteString)
+import Data.ByteString.Char8 qualified as BS.Strict.Char8
+
+import Network.GRPC.Common.Protobuf
+
+import Interop.Util.Exceptions
+
+import Proto.API.Interop
+
+{-------------------------------------------------------------------------------
+  BoolValue
+-------------------------------------------------------------------------------}
+
+boolValue :: Bool -> Proto BoolValue
+boolValue b = defMessage & #value .~ b
+
+{-------------------------------------------------------------------------------
+  Payload
+-------------------------------------------------------------------------------}
+
+payloadOfZeroes :: Int -> Proto Payload
+payloadOfZeroes sz = defMessage & #body .~ BS.Strict.pack (replicate sz 0)
+
+payloadOfType :: Integral size => Proto PayloadType -> size -> IO (Proto Payload)
+payloadOfType type' size = do
+    body <-
+      case getProto type' of
+        COMPRESSABLE ->
+          return $ BS.Strict.pack (replicate (fromIntegral size) 0)
+        PayloadType'Unrecognized x ->
+          assertUnrecognized x
+    return $
+      defMessage
+        & #type' .~ type'
+        & #body  .~ body
+
+clearPayload ::
+     ( HasField a "payload" b
+     , HasField b "body" Strict.ByteString
+     )
+  => a -> a
+clearPayload x = x & #payload . #body .~ BS.Strict.Char8.pack replacement
+  where
+    replacement :: String
+    replacement = concat [
+          "<<payload of "
+        , show (BS.Strict.length (x ^. #payload . #body))
+        , " bytes>>"
+        ]
diff --git a/interop/Main.hs b/interop/Main.hs
new file mode 100644
--- /dev/null
+++ b/interop/Main.hs
@@ -0,0 +1,31 @@
+module Main (main) where
+
+import GHC.Conc (setUncaughtExceptionHandler)
+import System.IO
+
+import Interop.Client (runInteropClient)
+import Interop.Client.Ping (ping)
+import Interop.Cmdline
+import Interop.SelfTest (selfTest)
+import Interop.Server (runInteropServer)
+
+{-------------------------------------------------------------------------------
+  Top-level application driver
+-------------------------------------------------------------------------------}
+
+main :: IO ()
+main = do
+    setUncaughtExceptionHandler $ \err -> do
+      hPutStrLn stderr $ "Uncaught exception: " ++ show err
+      hFlush stderr
+
+    -- Ensure we see server output when running inside docker
+    hSetBuffering stdout NoBuffering
+    hSetBuffering stderr NoBuffering
+
+    cmdline <- getCmdline
+    case cmdMode cmdline of
+      Server   -> runInteropServer cmdline
+      Client   -> runInteropClient cmdline
+      Ping     -> ping cmdline
+      SelfTest -> selfTest cmdline
diff --git a/kvstore/KVStore/API.hs b/kvstore/KVStore/API.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/API.hs
@@ -0,0 +1,63 @@
+-- | Serialization format agnostic layer
+--
+-- This allows us to the run the same client with either Protobuf or Java, and
+-- similarly for the server.
+module KVStore.API (
+    Key(..)
+  , Value(..)
+  , KVStore(..)
+  ) where
+
+import Control.DeepSeq (NFData)
+import Control.Monad
+import Data.Aeson.Types qualified as Aeson
+import Data.ByteString (ByteString)
+import Data.ByteString.Base64 qualified as Base64
+import Data.Hashable
+import Data.Text.Encoding qualified as Text
+
+import Network.GRPC.Common.JSON
+
+{-------------------------------------------------------------------------------
+  Key and value
+-------------------------------------------------------------------------------}
+
+newtype Key = Key {
+       getKey :: ByteString
+     }
+  deriving stock (Show, Eq, Ord)
+  deriving newtype (Hashable, NFData)
+  deriving (ToJSON, FromJSON) via Base64
+
+newtype Value = Value {
+      getValue :: ByteString
+    }
+  deriving stock (Show, Eq, Ord)
+  deriving newtype (NFData)
+  deriving (ToJSON, FromJSON) via Base64
+
+{-------------------------------------------------------------------------------
+  Main API
+-------------------------------------------------------------------------------}
+
+data KVStore = KVStore {
+      create   :: (Key, Value) -> IO ()
+    , retrieve :: Key -> IO Value
+    , update   :: (Key, Value) -> IO ()
+    , delete   :: Key -> IO ()
+    }
+
+{-------------------------------------------------------------------------------
+  Auxiliary: base64 encoding
+-------------------------------------------------------------------------------}
+
+newtype Base64 = Base64 { getBase64 :: ByteString }
+
+instance ToJSON Base64 where
+  toJSON = toJSON . Text.decodeUtf8 . Base64.encode . getBase64
+
+instance FromJSON Base64 where
+  parseJSON = fmap Base64 . decode . Text.encodeUtf8 <=< parseJSON
+    where
+      decode :: ByteString -> Aeson.Parser ByteString
+      decode = either fail return . Base64.decode
diff --git a/kvstore/KVStore/API/JSON.hs b/kvstore/KVStore/API/JSON.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/API/JSON.hs
@@ -0,0 +1,94 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module KVStore.API.JSON (client, server) where
+
+import Network.GRPC.Client (rpc)
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.JSON
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.StreamType qualified as Server
+
+import KVStore.API
+import KVStore.Util.Profiling
+
+{-------------------------------------------------------------------------------
+  API
+-------------------------------------------------------------------------------}
+
+type KeyValueService = "io.grpc.KeyValueService"
+
+type Create   = JsonRpc KeyValueService "Create"
+type Delete   = JsonRpc KeyValueService "Delete"
+type Retrieve = JsonRpc KeyValueService "Retrieve"
+type Update   = JsonRpc KeyValueService "Update"
+
+type instance Input  Create = JsonObject '[ '("key", Required Key), '("value", Required Value) ]
+type instance Output Create = JsonObject '[ ]
+
+type instance Input  Retrieve = JsonObject '[ '("key", Required Key) ]
+type instance Output Retrieve = JsonObject '[ '("value", Required Value) ]
+
+type instance Input  Update = JsonObject '[ '("key", Required Key), '("value", Required Value) ]
+type instance Output Update = JsonObject '[ ]
+
+type instance Input  Delete = JsonObject '[ '("key", Required Key) ]
+type instance Output Delete = JsonObject '[ ]
+
+{-------------------------------------------------------------------------------
+  Metadata
+-------------------------------------------------------------------------------}
+
+type instance RequestMetadata          (JsonRpc KeyValueService meth) = NoMetadata
+type instance ResponseInitialMetadata  (JsonRpc KeyValueService meth) = NoMetadata
+type instance ResponseTrailingMetadata (JsonRpc KeyValueService meth) = NoMetadata
+
+{-------------------------------------------------------------------------------
+  Client
+-------------------------------------------------------------------------------}
+
+client :: Client.Connection -> KVStore
+client conn = KVStore {
+      create   = fmap to0 . Client.nonStreaming conn (rpc @Create)   . from2
+    , delete   = fmap to0 . Client.nonStreaming conn (rpc @Delete)   . from1
+    , retrieve = fmap to1 . Client.nonStreaming conn (rpc @Retrieve) . from1
+    , update   = fmap to0 . Client.nonStreaming conn (rpc @Update)   . from2
+    }
+
+{-------------------------------------------------------------------------------
+  Server
+
+  Unlike in the Protobuf case, we don't have a type-level description of the
+  full API here.
+-------------------------------------------------------------------------------}
+
+server :: KVStore -> [Server.SomeRpcHandler IO]
+server kvstore = [
+      Server.fromMethod @Create   $ markNonStreaming "create"   $ fmap from0 . create   kvstore . to2
+    , Server.fromMethod @Delete   $ markNonStreaming "delete"   $ fmap from0 . delete   kvstore . to1
+    , Server.fromMethod @Retrieve $ markNonStreaming "retrieve" $ fmap from1 . retrieve kvstore . to1
+    , Server.fromMethod @Update   $ markNonStreaming "update"   $ fmap from0 . update   kvstore . to2
+    ]
+
+{-------------------------------------------------------------------------------
+  Marshalling
+-------------------------------------------------------------------------------}
+
+to0 :: JsonObject '[] -> ()
+to0 JsonObject = ()
+
+from0 :: () -> JsonObject '[]
+from0 () = JsonObject
+
+to1 :: JsonObject '[ '(a, Required x) ] -> x
+to1 (Required x :* JsonObject) = x
+
+from1 :: x -> JsonObject '[ '(a, Required x) ]
+from1 x = Required x :* JsonObject
+
+to2 :: JsonObject '[ '(a, Required x), '(b, Required y) ] -> (x, y)
+to2 (Required key :* Required value :* JsonObject) = (key, value)
+
+from2 :: (x, y) -> JsonObject '[ '(a, Required x), '(b, Required y) ]
+from2 (key, value) = Required key :* Required value :* JsonObject
diff --git a/kvstore/KVStore/API/Protobuf.hs b/kvstore/KVStore/API/Protobuf.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/API/Protobuf.hs
@@ -0,0 +1,127 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module KVStore.API.Protobuf (client, server) where
+
+import Network.GRPC.Client (rpc)
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.StreamType (Services(..), Methods(..))
+import Network.GRPC.Server.StreamType qualified as Server
+import Network.GRPC.Server.Protobuf qualified as Server
+
+import Proto.Kvstore
+
+import KVStore.API
+import KVStore.Util.Profiling
+
+{-------------------------------------------------------------------------------
+  API
+-------------------------------------------------------------------------------}
+
+type Create   = Protobuf KeyValueService "create"
+type Delete   = Protobuf KeyValueService "delete"
+type Retrieve = Protobuf KeyValueService "retrieve"
+type Update   = Protobuf KeyValueService "update"
+
+{-------------------------------------------------------------------------------
+  Metadata
+-------------------------------------------------------------------------------}
+
+type instance RequestMetadata          (Protobuf KeyValueService meth) = NoMetadata
+type instance ResponseInitialMetadata  (Protobuf KeyValueService meth) = NoMetadata
+type instance ResponseTrailingMetadata (Protobuf KeyValueService meth) = NoMetadata
+
+{-------------------------------------------------------------------------------
+  Client
+-------------------------------------------------------------------------------}
+
+client :: Client.Connection -> KVStore
+client conn = KVStore {
+      create   = fmap fromCreateResponse   . Client.nonStreaming conn (rpc @Create)   . createRequest
+    , retrieve = fmap fromRetrieveResponse . Client.nonStreaming conn (rpc @Retrieve) . retrieveRequest
+    , update   = fmap fromUpdateResponse   . Client.nonStreaming conn (rpc @Update)   . updateRequest
+    , delete   = fmap fromDeleteResponse   . Client.nonStreaming conn (rpc @Delete)   . deleteRequest
+    }
+
+{-------------------------------------------------------------------------------
+  Server
+-------------------------------------------------------------------------------}
+
+server :: KVStore -> [Server.SomeRpcHandler IO]
+server kvstore =
+    Server.fromServices $ Service methods NoMoreServices
+  where
+   methods :: Methods IO (Server.ProtobufMethodsOf KeyValueService)
+   methods =
+         Method (markNonStreaming "create"   $ fmap createResponse   . create   kvstore . fromCreateRequest)
+       $ Method (markNonStreaming "delete"   $ fmap deleteResponse   . delete   kvstore . fromDeleteRequest)
+       $ Method (markNonStreaming "retrieve" $ fmap retrieveResponse . retrieve kvstore . fromRetrieveRequest)
+       $ Method (markNonStreaming "update"   $ fmap updateResponse   . update   kvstore . fromUpdateRequest)
+       $ NoMoreMethods
+
+{-------------------------------------------------------------------------------
+  Marshalling
+-------------------------------------------------------------------------------}
+
+createRequest :: (Key, Value) -> Input Create
+createRequest (Key key, Value value)  =
+    defMessage
+      & #key   .~ key
+      & #value .~ value
+
+fromCreateRequest :: Input Create -> (Key, Value)
+fromCreateRequest req = (
+      Key   $ req ^. #key
+    , Value $ req ^. #value
+    )
+
+createResponse :: () -> Output Create
+createResponse _ = defMessage
+
+fromCreateResponse :: Output Create -> ()
+fromCreateResponse _ = ()
+
+retrieveRequest :: Key -> Input Retrieve
+retrieveRequest (Key key) = defMessage & #key .~ key
+
+fromRetrieveRequest :: Input Retrieve -> Key
+fromRetrieveRequest req = Key $ req ^. #key
+
+retrieveResponse :: Value -> Output Retrieve
+retrieveResponse (Value value) = defMessage & #value .~ value
+
+fromRetrieveResponse :: Output Retrieve -> Value
+fromRetrieveResponse resp = Value $ resp ^. #value
+
+updateRequest :: (Key, Value) -> Input Update
+updateRequest (Key key, Value value) =
+    defMessage
+      & #key   .~ key
+      & #value .~ value
+
+fromUpdateRequest :: Input Update -> (Key, Value)
+fromUpdateRequest req = (
+      Key   $ req ^. #key
+    , Value $ req ^. #value
+    )
+
+updateResponse :: () -> Output Update
+updateResponse _ = defMessage
+
+fromUpdateResponse :: Output Update -> ()
+fromUpdateResponse _ = ()
+
+deleteRequest :: Key -> Input Delete
+deleteRequest (Key key) = defMessage & #key .~ key
+
+fromDeleteRequest :: Input Delete -> Key
+fromDeleteRequest req = Key $ req ^. #key
+
+deleteResponse :: () -> Output Delete
+deleteResponse _ = defMessage
+
+fromDeleteResponse :: Output Delete -> ()
+fromDeleteResponse _ = ()
diff --git a/kvstore/KVStore/Client.hs b/kvstore/KVStore/Client.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Client.hs
@@ -0,0 +1,265 @@
+module KVStore.Client (runKeyValueClient) where
+
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import Data.ByteString (ByteString)
+import Data.ByteString qualified as BS
+import Data.IORef
+import Data.Maybe
+import System.Timeout
+import Text.Printf
+
+import Network.GRPC.Client
+import Network.GRPC.Common
+
+import KVStore.API
+import KVStore.API.JSON qualified as JSON
+import KVStore.API.Protobuf qualified as Protobuf
+import KVStore.Cmdline
+import KVStore.Util.Profiling
+import KVStore.Util.RandomAccessSet (RandomAccessSet)
+import KVStore.Util.RandomAccessSet qualified as RandomAccessSet
+import KVStore.Util.RandomGen qualified as RandomGen
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+-- | Run the client for the specified time in seconds
+--
+-- Print the number of RPC calls.
+runKeyValueClient :: Cmdline -> IO ()
+runKeyValueClient cmdline@Cmdline{cmdDuration} = do
+    statsVar <- newIORef zeroStats
+    void $ timeout (cmdDuration * 1_000_000) $ client cmdline statsVar
+    putStr . showStats cmdline =<< readIORef statsVar
+
+{-------------------------------------------------------------------------------
+  Stats
+-------------------------------------------------------------------------------}
+
+data Stats = Stats {
+      statsNumCreate   :: !Int
+    , statsNumUpdate   :: !Int
+    , statsNumRetrieve :: !Int
+    , statsNumDelete   :: !Int
+    }
+
+zeroStats :: Stats
+zeroStats = Stats {
+      statsNumCreate   = 0
+    , statsNumUpdate   = 0
+    , statsNumRetrieve = 0
+    , statsNumDelete   = 0
+    }
+
+statsTotal :: Stats -> Int
+statsTotal stats = sum [
+      statsNumCreate   stats
+    , statsNumUpdate   stats
+    , statsNumRetrieve stats
+    , statsNumDelete   stats
+    ]
+
+incNumCreate, incNumUpdate, incNumRetrieve, incNumDelete :: Stats -> (Stats, ())
+incNumCreate   stats = (stats{statsNumCreate   = statsNumCreate   stats + 1}, ())
+incNumUpdate   stats = (stats{statsNumUpdate   = statsNumUpdate   stats + 1}, ())
+incNumRetrieve stats = (stats{statsNumRetrieve = statsNumRetrieve stats + 1}, ())
+incNumDelete   stats = (stats{statsNumDelete   = statsNumDelete   stats + 1}, ())
+
+showStats :: Cmdline -> Stats -> String
+showStats Cmdline{cmdDuration} stats = unlines [
+      printf "Did %.3f RPCs/s" countPerSec
+    , "Totals:"
+    , printf "  %d CREATE"   (statsNumCreate   stats)
+    , printf "  %d UPDATE"   (statsNumUpdate   stats)
+    , printf "  %d RETRIEVE" (statsNumRetrieve stats)
+    , printf "  %d DELETE"   (statsNumDelete   stats)
+    ]
+  where
+    countPerSec :: Double
+    countPerSec = fromIntegral (statsTotal stats) / fromIntegral cmdDuration
+
+{-------------------------------------------------------------------------------
+  Main client
+-------------------------------------------------------------------------------}
+
+-- | Connect to the server and keep calling random RPCs
+--
+-- Caller should create an 'IORef' initialized to 0, then call 'client' in
+-- separate thread, and kill the thread after some amount of time. The number
+-- of RPC calls made can then be read off from the 'IORef'.
+client :: Cmdline -> IORef Stats -> IO ()
+client Cmdline{
+           cmdJSON
+         , cmdSecure
+         , cmdDisableTcpNoDelay
+         , cmdPingRateLimit
+         , cmdSemaphoreLimit
+         } statsVar = do
+    knownKeys <- RandomAccessSet.new
+    random    <- RandomGen.new
+    limiter   <- newQSem (fromMaybe 1 cmdSemaphoreLimit)
+
+    withConnection params server $ \conn -> do
+      let kvstore :: KVStore
+          kvstore
+            | cmdJSON   = JSON.client     conn
+            | otherwise = Protobuf.client conn
+
+      forever $ do
+        waitQSem limiter
+        forkIO $
+          doRandomCRUD random knownKeys kvstore `finally` signalQSem limiter
+  where
+    params :: ConnParams
+    params = def {
+          connHTTP2Settings = def {
+              http2TcpNoDelay            = not cmdDisableTcpNoDelay
+            , http2OverridePingRateLimit = cmdPingRateLimit
+            }
+        }
+
+    server :: Server
+    server
+      | cmdSecure
+      = ServerSecure
+          NoServerValidation
+          SslKeyLogNone -- Let the server write the log
+          Address {
+              addressHost      = "127.0.0.1"
+            , addressPort      = defaultSecurePort
+            , addressAuthority = Nothing
+            }
+
+      | otherwise
+      = ServerInsecure $ Address {
+             addressHost      = "127.0.0.1"
+           , addressPort      = defaultInsecurePort
+           , addressAuthority = Nothing
+           }
+
+    doRandomCRUD ::
+         RandomGen.RandomGen
+      -> RandomAccessSet Key
+      -> KVStore
+      -> IO ()
+    doRandomCRUD random knownKeys kvstore = do
+        -- Pick a random CRUD action to take
+        command <- RandomGen.nextInt random 4
+
+        if command == 0 then do
+          doCreate kvstore knownKeys
+          atomicModifyIORef' statsVar incNumCreate
+        else do
+          -- If we don't know about any keys, retry with a new random action
+          noKnownKeys <- RandomAccessSet.isEmpty knownKeys
+          unless noKnownKeys $ do
+            case command of
+              1 -> do doRetrieve kvstore knownKeys
+                      atomicModifyIORef' statsVar incNumRetrieve
+              2 -> do doUpdate kvstore knownKeys
+                      atomicModifyIORef' statsVar incNumUpdate
+              3 -> do doDelete kvstore knownKeys
+                      atomicModifyIORef' statsVar incNumDelete
+              _ -> error "impossible"
+
+{-------------------------------------------------------------------------------
+  Access the various server features
+-------------------------------------------------------------------------------}
+
+-- | Create a random key and value
+doCreate :: KVStore -> RandomAccessSet Key -> IO ()
+doCreate kvstore knownKeys = markRequest "CREATE" $ do
+    key   <- createRandomKey knownKeys
+    value <- Value <$> randomBytes meanValueSize
+
+    let handleGrpcException :: GrpcException -> IO ()
+        handleGrpcException e =
+            if grpcError e == GrpcAlreadyExists
+              then putStrLn "Key already existed"
+              else throwIO e
+
+    handle handleGrpcException $
+      create kvstore (key, value)
+
+-- | Retrieve the value of a random key
+doRetrieve :: KVStore -> RandomAccessSet Key -> IO ()
+doRetrieve kvstore knownKeys = markRequest "RETRIEVE" $ do
+    key <- RandomAccessSet.getRandomKey knownKeys
+
+    let handleGrpcException :: GrpcException -> IO ()
+        handleGrpcException e =
+            if grpcError e == GrpcNotFound then do
+              RandomAccessSet.remove knownKeys key
+              putStrLn "Key not found"
+            else
+              throwIO e
+
+    handle handleGrpcException $ do
+      Value res <- retrieve kvstore key
+      when (BS.length res < 1) $
+        error "Invalid response"
+
+-- | Update a random key with a random value
+doUpdate :: KVStore -> RandomAccessSet Key -> IO ()
+doUpdate kvstore knownKeys = markRequest "UPDATE" $ do
+    key   <- RandomAccessSet.getRandomKey knownKeys
+    value <- Value <$> randomBytes meanValueSize
+
+    let handleGrpcException :: GrpcException -> IO ()
+        handleGrpcException e =
+            if grpcError e == GrpcNotFound then do
+              RandomAccessSet.remove knownKeys key
+              putStrLn "Key not found"
+            else
+              throwIO e
+
+    handle handleGrpcException $
+      update kvstore (key, value)
+
+-- | Delete the value of a random key
+doDelete :: KVStore -> RandomAccessSet Key -> IO ()
+doDelete kvstore knownKeys = markRequest "DELETE" $ do
+    key <- RandomAccessSet.getRandomKey knownKeys
+    delete kvstore key
+    RandomAccessSet.remove knownKeys key
+
+{-------------------------------------------------------------------------------
+  Creating random keys and values
+-------------------------------------------------------------------------------}
+
+meanKeySize, meanValueSize :: Int
+meanKeySize   = 64
+meanValueSize = 65536
+
+-- | Create and add a key to the set of known keys
+createRandomKey :: RandomAccessSet Key -> IO Key
+createRandomKey knownKeys = loop
+  where
+    loop :: IO Key
+    loop = do
+      key   <- Key <$> randomBytes meanKeySize
+      added <- RandomAccessSet.add knownKeys key
+      if added
+        then return key
+        else loop
+
+-- | Create an exponentially sized byte string with a mean size
+randomBytes :: Int -> IO ByteString
+randomBytes mean = do
+    random <- RandomGen.new
+    d      <- RandomGen.nextDouble random
+    let size :: Int
+        size = round (fromIntegral mean * (-1 * log (1 - d)))
+    RandomGen.getRandomBytes <$> RandomGen.nextBytes random (1 + size)
+
+{-------------------------------------------------------------------------------
+  Debugging
+-------------------------------------------------------------------------------}
+
+markRequest :: String -> IO a -> IO a
+markRequest label =
+    bracket_ (markEvent $ "CLIENT start " ++ label)
+             (markEvent $ "CLIENT stop "  ++ label)
diff --git a/kvstore/KVStore/Cmdline.hs b/kvstore/KVStore/Cmdline.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Cmdline.hs
@@ -0,0 +1,106 @@
+module KVStore.Cmdline (
+    Cmdline(..)
+  , Mode(..)
+  , getCmdline
+  ) where
+
+import Data.Foldable (asum)
+import Options.Applicative (Parser, (<**>))
+import Options.Applicative qualified as Opt
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+data Cmdline = Cmdline {
+      cmdMode              :: Mode
+    , cmdDuration          :: Int
+    , cmdSimulateWork      :: Bool
+    , cmdJSON              :: Bool
+    , cmdSecure            :: Bool
+    , cmdDisableTcpNoDelay :: Bool
+    , cmdPingRateLimit     :: Maybe Int
+    , cmdSemaphoreLimit    :: Maybe Int
+    }
+
+data Mode =
+    Benchmark
+  | Server
+  | Client
+
+{-------------------------------------------------------------------------------
+  Get command line arguments
+-------------------------------------------------------------------------------}
+
+getCmdline :: IO Cmdline
+getCmdline =
+    Opt.execParser opts
+  where
+    opts = Opt.info (parseCmdline <**> Opt.helper) $ mconcat [
+        Opt.fullDesc
+      , Opt.progDesc "Server and client for official gRPC interop tests"
+      ]
+
+{-------------------------------------------------------------------------------
+  Parsers
+-------------------------------------------------------------------------------}
+
+parseCmdline :: Parser Cmdline
+parseCmdline =
+    Cmdline
+      <$> parseMode
+      <*> (Opt.option Opt.auto $ mconcat [
+              Opt.long "duration"
+            , Opt.showDefault
+            , Opt.value 60
+            , Opt.metavar "SEC"
+            ])
+      <*> (Opt.flag True False $ mconcat [
+              Opt.long "no-work-simulation"
+            , Opt.help "Disable work simulation (just run as quickly as possible)"
+            ])
+      <*> (Opt.switch $ mconcat [
+              Opt.long "json"
+            , Opt.help "Use JSON instead of Protobuf"
+            ])
+      <*> (Opt.switch $ mconcat [
+              Opt.long "secure"
+            , Opt.help "Enable TLS"
+            ])
+      <*> (Opt.switch $ mconcat [
+              Opt.long "disable-tcp-nodelay"
+            , Opt.help "Disable the TCP_NODELAY option"
+            ])
+      <*> (Opt.optional $
+            Opt.option Opt.auto $ mconcat [
+              Opt.long "ping-rate-limit"
+            , Opt.metavar "PINGs/sec"
+            , Opt.help "Allow at most this many pings per second from the peer"
+            ]
+          )
+      <*> (Opt.optional $
+            Opt.option Opt.auto $ mconcat [
+              Opt.long "semaphore-limit"
+            , Opt.metavar "NUM_TOKENS"
+            , Opt.help "Allow at most this many clients to run concurrently"
+            ]
+          )
+
+parseMode :: Parser Mode
+parseMode = asum [
+      Opt.flag' Server $ mconcat [
+          Opt.long "server"
+        , Opt.help "Run in server mode"
+        ]
+    , Opt.flag' Client $ mconcat [
+          Opt.long "client"
+        , Opt.help "Run in client mode"
+        ]
+    , Opt.flag' Benchmark $ mconcat [
+          Opt.long "benchmark"
+        , Opt.help "Run the server against itself, and count RPCs (this is the default)"
+        ]
+    , pure Benchmark
+    ]
+
+
diff --git a/kvstore/KVStore/Server.hs b/kvstore/KVStore/Server.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Server.hs
@@ -0,0 +1,113 @@
+module KVStore.Server (withKeyValueServer) where
+
+import Control.Concurrent (threadDelay)
+import Control.Monad
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Server
+import Network.GRPC.Server.Run
+
+import KVStore.API
+import KVStore.API.JSON qualified as JSON
+import KVStore.API.Protobuf qualified as Protobuf
+import KVStore.Cmdline
+import KVStore.Util.Store (Store)
+import KVStore.Util.Store qualified as Store
+
+import Paths_grapesy
+
+{-------------------------------------------------------------------------------
+  Server proper
+-------------------------------------------------------------------------------}
+
+withKeyValueServer :: Cmdline -> (RunningServer -> IO ()) -> IO ()
+withKeyValueServer cmdline@Cmdline{
+                       cmdJSON
+                     , cmdSecure
+                     , cmdDisableTcpNoDelay
+                     , cmdPingRateLimit
+                     } k = do
+    store <- Store.new
+
+    config :: ServerConfig <-
+      if cmdSecure then do
+        pub  <- getDataFileName "grpc-demo.pem"
+        priv <- getDataFileName "grpc-demo.key"
+        return ServerConfig {
+            serverInsecure = Nothing
+          , serverSecure   = Just $ SecureConfig {
+                secureHost       = "0.0.0.0"
+              , securePort       = defaultSecurePort
+              , securePubCert    = pub
+              , secureChainCerts = []
+              , securePrivKey    = priv
+              , secureSslKeyLog  = SslKeyLogFromEnv
+              }
+          }
+      else
+        return ServerConfig {
+            serverInsecure = Just $ InsecureConfig (Just "127.0.0.1") defaultInsecurePort
+          , serverSecure   = Nothing
+          }
+
+    let rpcHandlers :: [SomeRpcHandler IO]
+        rpcHandlers
+          | cmdJSON   = JSON.server     $ handlers cmdline store
+          | otherwise = Protobuf.server $ handlers cmdline store
+
+    server <- mkGrpcServer params rpcHandlers
+    forkServer http2 config server k
+  where
+    http2 :: HTTP2Settings
+    http2 = def {
+          http2TcpNoDelay            = not cmdDisableTcpNoDelay
+        , http2OverridePingRateLimit = cmdPingRateLimit
+        }
+
+    params :: ServerParams
+    params = def {
+          -- The Java benchmark does not use compression (unclear if the Java
+          -- implementation supports compression at all; the compression Interop
+          -- tests are also disabled for Java). For a fair comparison, we
+          -- therefore disable compression here also.
+          serverCompression = Compr.none
+        }
+
+{-------------------------------------------------------------------------------
+  Handlers
+-------------------------------------------------------------------------------}
+
+handlers :: Cmdline -> Store Key Value -> KVStore
+handlers cmdline store = KVStore {
+      create = \(key, value) -> do
+        simulateWork cmdline writeDelayMillis
+        inserted <- Store.putIfAbsent store key value
+        unless inserted $ throwGrpcError GrpcAlreadyExists
+    , update = \(key, value) -> do
+        simulateWork cmdline writeDelayMillis
+        replaced <- Store.replace store key value
+        unless replaced $ throwGrpcError GrpcNotFound
+    , retrieve = \key -> do
+        simulateWork cmdline readDelayMillis
+        mValue <- Store.get store key
+        case mValue of
+          Just value -> return value
+          Nothing    -> throwGrpcError GrpcNotFound
+    , delete = \key -> do
+        simulateWork cmdline writeDelayMillis
+        Store.remove store key
+    }
+
+{-------------------------------------------------------------------------------
+  Delays
+-------------------------------------------------------------------------------}
+
+simulateWork :: Cmdline -> Int -> IO ()
+simulateWork Cmdline{cmdSimulateWork} n
+  | cmdSimulateWork = threadDelay (n * 1_000)
+  | otherwise       = return ()
+
+readDelayMillis, writeDelayMillis :: Int
+readDelayMillis  = 10
+writeDelayMillis = 50
diff --git a/kvstore/KVStore/Util/Profiling.hs b/kvstore/KVStore/Util/Profiling.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Util/Profiling.hs
@@ -0,0 +1,73 @@
+{-# LANGUAGE CPP #-}
+
+-- | Profiling utilities
+--
+-- Function 'markEvent' is normally just an alias for 'traceEventIO'. However,
+-- when grapey is compiled with the @strace@ flag enabled, 'markEvent' also
+-- writes the string to /dev/null using a posix @write@ call. This will show
+-- up in the output of @strace@, thereby making it possible to relate strace
+-- events to user events.
+module KVStore.Util.Profiling (
+    markEvent
+  , markNonStreaming
+  ) where
+
+import Debug.Trace (traceEventIO)
+import Control.Exception (bracket_)
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Common
+import Network.GRPC.Server.StreamType (ServerHandler')
+import Network.GRPC.Server.StreamType qualified as Server
+
+#ifdef STRACE
+import Control.Monad
+import System.IO.Unsafe (unsafePerformIO)
+import System.Posix
+#endif
+
+{-------------------------------------------------------------------------------
+  markEvent
+-------------------------------------------------------------------------------}
+
+#ifdef STRACE
+
+devNull :: Fd
+{-# NOINLINE devNull #-}
+devNull = unsafePerformIO $ do
+#if MIN_VERSION_unix(2,8,0)
+   openFd "/dev/null" WriteOnly defaultFileFlags
+#else
+   openFd "/dev/null" WriteOnly Nothing defaultFileFlags
+#endif
+
+markEvent :: String -> IO ()
+markEvent str' = do
+    -- We also write to /dev/null; the benefit of doing this is that this will
+    -- show up in the strace output, allowing us to relate events to syscalls.
+    _bytesWritten <- fdWrite devNull str
+    when (fromIntegral _bytesWritten /= length str) $
+      error "markEvent: fdWrite failed to write complete string"
+    traceEventIO str
+  where
+    str = str' ++ "\n"
+
+#else
+
+markEvent :: String -> IO ()
+markEvent = traceEventIO
+
+#endif
+
+{-------------------------------------------------------------------------------
+  Derived
+-------------------------------------------------------------------------------}
+
+markNonStreaming ::
+     SupportsStreamingType rpc NonStreaming
+  => String
+  -> (Input rpc -> IO (Output rpc))
+  -> ServerHandler' NonStreaming IO rpc
+markNonStreaming label handler = Server.mkNonStreaming $ \inp ->
+    bracket_ (markEvent $ "HANDLER start " ++ label)
+             (markEvent $ "HANDLER stop  " ++ label)
+             (handler inp)
diff --git a/kvstore/KVStore/Util/RandomAccessSet.hs b/kvstore/KVStore/Util/RandomAccessSet.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Util/RandomAccessSet.hs
@@ -0,0 +1,76 @@
+-- | A set which supports random access.
+--
+-- Intended for qualified import.
+--
+-- > import KVStore.Util.RandomAccessSet (RandomAccessSet)
+-- > import KVStore.Util.RandomAccessSet qualified as RandomAccessSet
+module KVStore.Util.RandomAccessSet (
+    RandomAccessSet -- opaque
+    -- * API
+  , new
+  , isEmpty
+  , getRandomKey
+  , add
+  , remove
+  ) where
+
+import Control.Concurrent
+import Data.Set (Set)
+import Data.Set qualified as Set
+
+import KVStore.Util.RandomGen qualified as Random
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+newtype RandomAccessSet a = Wrap {
+      unwrap :: MVar (Set a)
+    }
+
+{-------------------------------------------------------------------------------
+  API
+-------------------------------------------------------------------------------}
+
+new :: IO (RandomAccessSet a)
+new = Wrap <$> newMVar Set.empty
+
+isEmpty :: RandomAccessSet a -> IO Bool
+isEmpty ras = withRAS ras $ Set.null
+
+getRandomKey :: RandomAccessSet a -> IO a
+getRandomKey ras = do
+    gen  <- Random.new
+    withRASIO ras $ \s -> do
+      n <- Random.nextInt gen (Set.size s)
+      return $ Set.elemAt n s
+
+add :: Ord a => RandomAccessSet a -> a -> IO Bool
+add ras value =
+    modifyRAS ras $ \set ->
+      if value `Set.member` set
+        then (set, False)
+        else (Set.insert value set, True)
+
+remove :: Ord a => RandomAccessSet a -> a -> IO ()
+remove ras value = modifyRAS_ ras $ Set.delete value
+
+{-------------------------------------------------------------------------------
+  Internal: wrap pure operations
+-------------------------------------------------------------------------------}
+
+withRAS :: RandomAccessSet a -> (Set a -> b) -> IO b
+withRAS ras f = withMVar (unwrap ras) $ return . f
+
+modifyRAS :: RandomAccessSet a -> (Set a -> (Set a, b)) -> IO b
+modifyRAS ras f = modifyMVar (unwrap ras) $ return . f
+
+modifyRAS_ :: RandomAccessSet a -> (Set a -> Set a) -> IO ()
+modifyRAS_ ras f = modifyMVar_ (unwrap ras) $ return . f
+
+{-------------------------------------------------------------------------------
+  Internal: wrap IO operations
+-------------------------------------------------------------------------------}
+
+withRASIO :: RandomAccessSet a -> (Set a -> IO b) -> IO b
+withRASIO ras = withMVar (unwrap ras)
diff --git a/kvstore/KVStore/Util/RandomGen.hs b/kvstore/KVStore/Util/RandomGen.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Util/RandomGen.hs
@@ -0,0 +1,98 @@
+{-# OPTIONS_GHC -O2 #-}
+
+-- | Stateful random number generation
+--
+-- Intended for qualified import.
+--
+-- > import KVStore.Util.RandomGen (RandomGen)
+-- > import KVStore.Util.RandomGen qualified as RandomGen
+module KVStore.Util.RandomGen (
+    RandomGen -- opaque
+    -- * API
+  , new
+  , nextDouble
+  , nextWord64
+  , nextInt
+  , RandomBytes(..)
+  , nextBytes
+  ) where
+
+import Control.Concurrent
+import Data.ByteString (ByteString)
+import Data.ByteString qualified as BS
+import Data.ByteString.Base16 qualified as BS.Base16
+import Data.ByteString.Char8 qualified as BS.Char8
+import Data.ByteString.Unsafe (unsafePackMallocCStringLen)
+import Data.Tuple (swap)
+import Data.Word
+import Foreign qualified as C
+import Foreign.Ptr
+import System.Random.SplitMix (SMGen)
+import System.Random.SplitMix qualified as SplitMix
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | Thread-safe PRNG
+newtype RandomGen = Wrap {
+      unwrap :: MVar SMGen
+    }
+
+{-------------------------------------------------------------------------------
+  Basic API
+-------------------------------------------------------------------------------}
+
+new :: IO RandomGen
+new = SplitMix.newSMGen >>= fmap Wrap . newMVar
+
+-- | Generate a Double in @[0, 1)@ range
+nextDouble :: RandomGen -> IO Double
+nextDouble gen = withGen gen $ SplitMix.nextDouble
+
+nextWord64 :: RandomGen -> IO Word64
+nextWord64 gen = withGen gen $ SplitMix.nextWord64
+
+-- | Uniformly distributed int value in @[0, n)@ range
+nextInt :: RandomGen -> Int -> IO Int
+nextInt gen n
+  | n <= 0    = error "bound must be positive"
+  | otherwise = (\w -> fromIntegral w `mod` n) <$> nextWord64 gen
+
+{-------------------------------------------------------------------------------
+  Random bytes
+-------------------------------------------------------------------------------}
+
+newtype RandomBytes = RandomBytes {
+      getRandomBytes :: ByteString
+    }
+
+instance Show RandomBytes where
+  show = BS.Char8.unpack . BS.Base16.encode . getRandomBytes
+
+nextBytes :: RandomGen -> Int -> IO RandomBytes
+nextBytes _   0 = return $ RandomBytes BS.empty
+nextBytes gen n = modifyMVar (unwrap gen) $ \initGen -> do
+    -- Allocate enough memory for a whole number of Word64
+    ptr :: Ptr Word64 <- C.mallocBytes (numWords * 8)
+
+    let loop :: SMGen -> [Int] -> IO SMGen
+        loop g []     = return g
+        loop g (i:is) = do
+            let (w, g') = SplitMix.nextWord64 g
+            C.poke (ptr `plusPtr` i) w
+            loop g' is
+
+    g' <- loop initGen [0, 8 .. n - 1]
+    bs <- unsafePackMallocCStringLen (castPtr ptr, n)
+    return (g', RandomBytes bs)
+  where
+    numWords :: Int
+    numWords = (n - 1) `div` 8 + 1
+
+{-------------------------------------------------------------------------------
+  Internal: wrap pure operations
+-------------------------------------------------------------------------------}
+
+withGen :: RandomGen -> (SMGen -> (a, SMGen)) -> IO a
+withGen gen f = modifyMVar (unwrap gen) $ return . swap . f
diff --git a/kvstore/KVStore/Util/Store.hs b/kvstore/KVStore/Util/Store.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/KVStore/Util/Store.hs
@@ -0,0 +1,78 @@
+-- | Simple in-memory key-value var
+--
+-- Intended for qualified import.
+--
+-- > import KVStore.Util.Store (Store)
+-- > import KVStore.Util.Store qualified as Store
+module KVStore.Util.Store (
+    Store -- opaque
+    -- * API
+  , new
+  , get
+  , putIfAbsent
+  , replace
+  , remove
+  ) where
+
+import Control.Concurrent
+import Data.Hashable (Hashable)
+import Data.HashMap.Strict (HashMap)
+import Data.HashMap.Strict qualified as HashMap
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+newtype Store a b = Wrap {
+      unwrap :: MVar (HashMap a b)
+    }
+
+{-------------------------------------------------------------------------------
+  API
+-------------------------------------------------------------------------------}
+
+new :: IO (Store a b)
+new = Wrap <$> newMVar HashMap.empty
+
+-- | Get value associated with the key, if it exists
+get :: Hashable a => Store a b -> a -> IO (Maybe b)
+get store key = withStore store $ HashMap.lookup key
+
+-- | Remove an key from the map
+remove :: Hashable a => Store a b -> a -> IO ()
+remove store key = modifyStore_ store $ HashMap.delete key
+
+-- | Put a new key/value pair into the var
+--
+-- Returns 'True' on success, or 'False' if they key was already present.
+putIfAbsent :: Hashable a => Store a b -> a -> b -> IO Bool
+putIfAbsent store key value =
+    modifyStore store $ \hm ->
+      case HashMap.lookup key hm of
+        Nothing -> (HashMap.insert key value hm, True)
+        Just _  -> (hm, False)
+
+-- | Replace the value associated with the key, if the key already exists
+--
+-- Returns 'True' if the value was successfully replaced, or 'False' if the key
+-- was not present.
+replace :: Hashable a => Store a b -> a -> b -> IO Bool
+replace store key newValue =
+    modifyStore store $ \hm ->
+      case HashMap.lookup key hm of
+        Nothing -> (hm, False)
+        Just _  -> (HashMap.insert key newValue hm, True)
+
+{-------------------------------------------------------------------------------
+  Internal: wrap pure operations
+-------------------------------------------------------------------------------}
+
+withStore :: Store a b -> (HashMap a b -> r) -> IO r
+withStore store f = withMVar (unwrap store) $ return . f
+
+modifyStore :: Store a b -> (HashMap a b -> (HashMap a b, r)) -> IO r
+modifyStore store f = modifyMVar (unwrap store) $ return . f
+
+modifyStore_ :: Store a b -> (HashMap a b -> HashMap a b) -> IO ()
+modifyStore_ store f = modifyMVar_ (unwrap store) $ return . f
+
diff --git a/kvstore/Main.hs b/kvstore/Main.hs
new file mode 100644
--- /dev/null
+++ b/kvstore/Main.hs
@@ -0,0 +1,33 @@
+-- | Key-value client/server example
+--
+-- See <docs/kvstore.md> for details.
+module Main (main) where
+
+import Control.Concurrent
+
+import Network.GRPC.Server.Run (waitServer)
+
+import KVStore.Client
+import KVStore.Cmdline
+import KVStore.Server
+
+{-------------------------------------------------------------------------------
+  Main application
+-------------------------------------------------------------------------------}
+
+main :: IO ()
+main = do
+    cmdline <- getCmdline
+    case cmdMode cmdline of
+      Client ->
+        runKeyValueClient cmdline
+      Server ->
+        withKeyValueServer cmdline $ waitServer
+      Benchmark -> do
+        withKeyValueServer cmdline $ \_server -> do
+          -- Give the server a chance to start
+          --
+          -- (We don't want to enable automatic reconnects, as that might throw
+          -- off the benchmarking.)
+          threadDelay 1_000_000
+          runKeyValueClient cmdline
diff --git a/proto/Proto/API/Helloworld.hs b/proto/Proto/API/Helloworld.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/API/Helloworld.hs
@@ -0,0 +1,64 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Proto.API.Helloworld (
+    -- * Greeter
+    SayHello
+  , SayHelloStreamReply
+  , SayHelloBidiStream
+
+    -- ** Metadata
+  , SayHelloMetadata(..)
+
+    -- * Re-exports
+  , module Proto.Helloworld
+  ) where
+
+import Control.Monad.Catch
+import Data.ByteString qualified as Strict
+import GHC.TypeLits
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Proto.Helloworld
+
+{-------------------------------------------------------------------------------
+  Greeter
+-------------------------------------------------------------------------------}
+
+type SayHello            = Protobuf Greeter "sayHello"
+type SayHelloStreamReply = Protobuf Greeter "sayHelloStreamReply"
+type SayHelloBidiStream  = Protobuf Greeter "sayHelloBidiStream"
+
+type instance RequestMetadata          (Protobuf Greeter meth) = NoMetadata
+type instance ResponseInitialMetadata  (Protobuf Greeter meth) = GreeterResponseInitialMetadata meth
+type instance ResponseTrailingMetadata (Protobuf Greeter meth) = NoMetadata
+
+{-------------------------------------------------------------------------------
+  .. metadata
+-------------------------------------------------------------------------------}
+
+type family GreeterResponseInitialMetadata (meth :: Symbol) where
+  GreeterResponseInitialMetadata "sayHelloStreamReply" = SayHelloMetadata
+  GreeterResponseInitialMetadata meth                  = NoMetadata
+
+data SayHelloMetadata = SayHelloMetadata (Maybe Strict.ByteString)
+  deriving (Show)
+
+instance BuildMetadata SayHelloMetadata where
+  buildMetadata (SayHelloMetadata mVal) = concat [
+        [ CustomMetadata "initial-md" val
+        | Just val <- [mVal]
+        ]
+      ]
+
+instance ParseMetadata SayHelloMetadata where
+  parseMetadata headers =
+      case headers of
+        [] ->
+          return $ SayHelloMetadata $ Nothing
+        [md] | customMetadataName md == "initial-md" ->
+          return $ SayHelloMetadata $ Just (customMetadataValue md)
+        _otherwise ->
+          throwM $ UnexpectedMetadata headers
diff --git a/proto/Proto/API/Interop.hs b/proto/Proto/API/Interop.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/API/Interop.hs
@@ -0,0 +1,179 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Proto.API.Interop (
+    -- * TestService
+
+    -- ** Endpoints
+    EmptyCall
+  , UnaryCall
+  , StreamingInputCall
+  , StreamingOutputCall
+  , FullDuplexCall
+  , UnimplementedCall
+
+    -- ** Metadata
+  , InteropReqMeta(..)
+  , InteropRespInitMeta(..)
+  , InteropRespTrailMeta(..)
+
+    -- * UnimplementedService
+  , UnimplementedServiceCall
+
+    -- * Re-exports
+  , module Proto.Empty
+  , module Proto.Messages
+  , module Proto.Test
+  ) where
+
+import Data.ByteString qualified as Strict (ByteString)
+import Control.Monad.Catch (MonadThrow(throwM))
+import Control.Monad.State (StateT, execStateT, modify)
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Proto.Empty
+import Proto.Messages
+import Proto.Test
+
+{-------------------------------------------------------------------------------
+  Endpoints
+-------------------------------------------------------------------------------}
+
+type EmptyCall           = Protobuf TestService "emptyCall"
+type UnaryCall           = Protobuf TestService "unaryCall"
+type StreamingInputCall  = Protobuf TestService "streamingInputCall"
+type StreamingOutputCall = Protobuf TestService "streamingOutputCall"
+type FullDuplexCall      = Protobuf TestService "fullDuplexCall"
+type UnimplementedCall   = Protobuf TestService "unimplementedCall"
+
+{-------------------------------------------------------------------------------
+  Metadata
+-------------------------------------------------------------------------------}
+
+type instance RequestMetadata          (Protobuf TestService meth) = InteropReqMeta
+type instance ResponseInitialMetadata  (Protobuf TestService meth) = InteropRespInitMeta
+type instance ResponseTrailingMetadata (Protobuf TestService meth) = InteropRespTrailMeta
+
+data InteropReqMeta = InteropReqMeta {
+      -- | Header we expect the server to include in the initial metadata
+      interopExpectInit :: Maybe Strict.ByteString
+
+      -- | Header we expect the server to include in the trailng metadata
+    , interopExpectTrail :: Maybe Strict.ByteString
+    }
+  deriving (Show, Eq)
+
+newtype InteropRespInitMeta = InteropRespInitMeta {
+      -- | Metadata the server /actually/ included in the initial metadata
+      --
+      -- See also 'interopExpectInit'
+      interopActualInit :: Maybe Strict.ByteString
+    }
+  deriving (Show, Eq)
+
+newtype InteropRespTrailMeta = InteropRespTrailMeta {
+      -- | Metadata the server /actually/ included in the trailing metadata
+      --
+      -- See also 'interopExpectTrail'
+      interopActualTrail :: Maybe Strict.ByteString
+    }
+  deriving (Show, Eq)
+
+grpcTestEchoInitial :: HeaderName
+grpcTestEchoInitial = "x-grpc-test-echo-initial"
+
+grpcTestEchoTrailingBin :: HeaderName
+grpcTestEchoTrailingBin = "x-grpc-test-echo-trailing-bin"
+
+{-------------------------------------------------------------------------------
+  Client instances
+-------------------------------------------------------------------------------}
+
+instance Default InteropReqMeta where
+  def = InteropReqMeta {
+        interopExpectInit  = Nothing
+      , interopExpectTrail = Nothing
+      }
+
+instance BuildMetadata InteropReqMeta where
+  buildMetadata md = concat [
+        [ CustomMetadata grpcTestEchoInitial val
+        | Just val <- [interopExpectInit md]
+        ]
+      , [ CustomMetadata grpcTestEchoTrailingBin val
+        | Just val <- [interopExpectTrail md]
+        ]
+      ]
+
+instance ParseMetadata InteropRespInitMeta where
+  parseMetadata headers =
+      case headers of
+        [] ->
+          return $ InteropRespInitMeta $ Nothing
+        [md] | customMetadataName md == grpcTestEchoInitial ->
+          return $ InteropRespInitMeta $ Just (customMetadataValue md)
+        _otherwise ->
+          throwM $ UnexpectedMetadata headers
+
+instance ParseMetadata InteropRespTrailMeta where
+  parseMetadata headers =
+      case headers of
+        [] ->
+          return $ InteropRespTrailMeta $ Nothing
+        [md] | customMetadataName md == grpcTestEchoTrailingBin ->
+          return $ InteropRespTrailMeta $ Just (customMetadataValue md)
+        _otherwise ->
+          throwM $ UnexpectedMetadata headers
+
+{-------------------------------------------------------------------------------
+  Server instances
+-------------------------------------------------------------------------------}
+
+instance Default InteropRespInitMeta where
+  def = InteropRespInitMeta Nothing
+
+instance Default InteropRespTrailMeta where
+  def = InteropRespTrailMeta Nothing
+
+instance ParseMetadata InteropReqMeta where
+  parseMetadata = flip execStateT def . mapM go
+    where
+      go :: MonadThrow m => CustomMetadata -> StateT InteropReqMeta m ()
+      go md
+        | customMetadataName md == grpcTestEchoInitial
+        = modify $ \x -> x{interopExpectInit = Just $ customMetadataValue md}
+
+        | customMetadataName md == grpcTestEchoTrailingBin
+        = modify $ \x -> x{interopExpectTrail = Just $ customMetadataValue md}
+
+        | otherwise
+        = throwM $ UnexpectedMetadata [md]
+
+instance BuildMetadata InteropRespInitMeta where
+  buildMetadata md = concat [
+        [ CustomMetadata grpcTestEchoInitial val
+        | Just val <- [interopActualInit md]
+        ]
+      ]
+
+instance BuildMetadata InteropRespTrailMeta where
+  buildMetadata md = concat [
+        [ CustomMetadata grpcTestEchoTrailingBin val
+        | Just val <- [interopActualTrail md]
+        ]
+      ]
+
+instance StaticMetadata InteropRespTrailMeta where
+  metadataHeaderNames _ = [grpcTestEchoTrailingBin]
+
+{-------------------------------------------------------------------------------
+  UnimplementedService service
+-------------------------------------------------------------------------------}
+
+type UnimplementedServiceCall = Protobuf UnimplementedService "unimplementedCall"
+
+type instance RequestMetadata          (Protobuf UnimplementedService meth) = NoMetadata
+type instance ResponseInitialMetadata  (Protobuf UnimplementedService meth) = NoMetadata
+type instance ResponseTrailingMetadata (Protobuf UnimplementedService meth) = NoMetadata
diff --git a/proto/Proto/API/Ping.hs b/proto/Proto/API/Ping.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/API/Ping.hs
@@ -0,0 +1,23 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Proto.API.Ping (
+    Ping
+
+    -- * Re-exports
+  , module Proto.Ping
+) where
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Proto.Ping
+
+{-------------------------------------------------------------------------------
+  Ping
+-------------------------------------------------------------------------------}
+
+type Ping = Protobuf PingService "ping"
+
+type instance RequestMetadata          (Protobuf PingService meth) = NoMetadata
+type instance ResponseInitialMetadata  (Protobuf PingService meth) = NoMetadata
+type instance ResponseTrailingMetadata (Protobuf PingService meth) = NoMetadata
diff --git a/proto/Proto/API/RouteGuide.hs b/proto/Proto/API/RouteGuide.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/API/RouteGuide.hs
@@ -0,0 +1,30 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Proto.API.RouteGuide (
+    -- * RouteGuide
+    GetFeature
+  , ListFeatures
+  , RecordRoute
+  , RouteChat
+
+    -- * Re-exports
+  , module Proto.RouteGuide
+  ) where
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Proto.RouteGuide
+
+{-------------------------------------------------------------------------------
+  RouteGuide
+-------------------------------------------------------------------------------}
+
+type GetFeature   = Protobuf RouteGuide "getFeature"
+type ListFeatures = Protobuf RouteGuide "listFeatures"
+type RecordRoute  = Protobuf RouteGuide "recordRoute"
+type RouteChat    = Protobuf RouteGuide "routeChat"
+
+type instance RequestMetadata          (Protobuf RouteGuide meth) = NoMetadata
+type instance ResponseInitialMetadata  (Protobuf RouteGuide meth) = NoMetadata
+type instance ResponseTrailingMetadata (Protobuf RouteGuide meth) = NoMetadata
diff --git a/proto/Proto/API/TestAny.hs b/proto/Proto/API/TestAny.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/API/TestAny.hs
@@ -0,0 +1,23 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Proto.API.TestAny (
+    Reverse
+
+    -- * Re-exports
+  , module Proto.TestAny
+  ) where
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+
+import Proto.TestAny
+
+{-------------------------------------------------------------------------------
+  TestAnyService
+-------------------------------------------------------------------------------}
+
+type Reverse = Protobuf TestAnyService "reverse"
+
+type instance RequestMetadata          (Protobuf TestAnyService meth) = NoMetadata
+type instance ResponseInitialMetadata  (Protobuf TestAnyService meth) = NoMetadata
+type instance ResponseTrailingMetadata (Protobuf TestAnyService meth) = NoMetadata
diff --git a/proto/Proto/API/Trivial.hs b/proto/Proto/API/Trivial.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/API/Trivial.hs
@@ -0,0 +1,21 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Proto.API.Trivial
+  ( -- * Trivial RPC
+    Trivial
+  , Trivial'
+  ) where
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary
+
+{-------------------------------------------------------------------------------
+  Trivial RPC
+-------------------------------------------------------------------------------}
+
+type Trivial    = RawRpc "trivial" "trivial"
+type Trivial' s = RawRpc "trivial" s
+
+type instance RequestMetadata          (Trivial' s) = NoMetadata
+type instance ResponseInitialMetadata  (Trivial' s) = NoMetadata
+type instance ResponseTrailingMetadata (Trivial' s) = NoMetadata
diff --git a/proto/Proto/Empty.hs b/proto/Proto/Empty.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Empty.hs
@@ -0,0 +1,130 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from empty.proto by the proto-lens-protoc program. -}
+{-# 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.Empty (
+        Empty()
+    ) 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
+{- | Fields :
+      -}
+data Empty
+  = Empty'_constructor {_Empty'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show Empty where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message Empty where
+  messageName _ = Data.Text.pack "grpc.testing.Empty"
+  packedMessageDescriptor _
+    = "\n\
+      \\ENQEmpty"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _Empty'_unknownFields
+        (\ x__ y__ -> x__ {_Empty'_unknownFields = y__})
+  defMessage = Empty'_constructor {_Empty'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: Empty -> Data.ProtoLens.Encoding.Bytes.Parser Empty
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Empty"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData Empty where
+  rnf
+    = \ x__ -> Control.DeepSeq.deepseq (_Empty'_unknownFields x__) ()
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\vempty.proto\DC2\fgrpc.testing\"\a\n\
+    \\ENQEmptyJ\144\a\n\
+    \\ACK\DC2\EOT\SI\NUL\ESC\DLE\n\
+    \\191\EOT\n\
+    \\SOH\f\DC2\ETX\SI\NUL\DC22\180\EOT Copyright 2015 gRPC authors.\n\
+    \\n\
+    \ Licensed under the Apache License, Version 2.0 (the \"License\");\n\
+    \ you may not use this file except in compliance with the License.\n\
+    \ You may obtain a copy of the License at\n\
+    \\n\
+    \     http://www.apache.org/licenses/LICENSE-2.0\n\
+    \\n\
+    \ Unless required by applicable law or agreed to in writing, software\n\
+    \ distributed under the License is distributed on an \"AS IS\" BASIS,\n\
+    \ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+    \ See the License for the specific language governing permissions and\n\
+    \ limitations under the License.\n\
+    \\n\
+    \\b\n\
+    \\SOH\STX\DC2\ETX\DC1\NUL\NAK\n\
+    \\173\STX\n\
+    \\STX\EOT\NUL\DC2\ETX\ESC\NUL\DLE\SUB\161\STX An empty message that you can re-use to avoid defining duplicated empty\n\
+    \ messages in your project. A typical example is to use it as argument or the\n\
+    \ return value of a service API. For instance:\n\
+    \\n\
+    \   service Foo {\n\
+    \     rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };\n\
+    \   };\n\
+    \\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX\ESC\b\rb\ACKproto3"
diff --git a/proto/Proto/Helloworld.hs b/proto/Proto/Helloworld.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Helloworld.hs
@@ -0,0 +1,398 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from helloworld.proto by the proto-lens-protoc program. -}
+{-# 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.Helloworld (
+        Greeter(..), HelloReply(), HelloRequest()
+    ) 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
+{- | Fields :
+     
+         * 'Proto.Helloworld_Fields.message' @:: Lens' HelloReply Data.Text.Text@ -}
+data HelloReply
+  = HelloReply'_constructor {_HelloReply'message :: !Data.Text.Text,
+                             _HelloReply'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show HelloReply where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField HelloReply "message" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _HelloReply'message (\ x__ y__ -> x__ {_HelloReply'message = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message HelloReply where
+  messageName _ = Data.Text.pack "helloworld.HelloReply"
+  packedMessageDescriptor _
+    = "\n\
+      \\n\
+      \HelloReply\DC2\CAN\n\
+      \\amessage\CAN\SOH \SOH(\tR\amessage"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        message__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "message"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"message")) ::
+              Data.ProtoLens.FieldDescriptor HelloReply
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, message__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _HelloReply'_unknownFields
+        (\ x__ y__ -> x__ {_HelloReply'_unknownFields = y__})
+  defMessage
+    = HelloReply'_constructor
+        {_HelloReply'message = Data.ProtoLens.fieldDefault,
+         _HelloReply'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          HelloReply -> Data.ProtoLens.Encoding.Bytes.Parser HelloReply
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "message"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"message") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "HelloReply"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"message") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData HelloReply where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_HelloReply'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_HelloReply'message x__) ())
+{- | Fields :
+     
+         * 'Proto.Helloworld_Fields.name' @:: Lens' HelloRequest Data.Text.Text@ -}
+data HelloRequest
+  = HelloRequest'_constructor {_HelloRequest'name :: !Data.Text.Text,
+                               _HelloRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show HelloRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField HelloRequest "name" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _HelloRequest'name (\ x__ y__ -> x__ {_HelloRequest'name = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message HelloRequest where
+  messageName _ = Data.Text.pack "helloworld.HelloRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\fHelloRequest\DC2\DC2\n\
+      \\EOTname\CAN\SOH \SOH(\tR\EOTname"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        name__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "name"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::
+              Data.ProtoLens.FieldDescriptor HelloRequest
+      in
+        Data.Map.fromList [(Data.ProtoLens.Tag 1, name__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _HelloRequest'_unknownFields
+        (\ x__ y__ -> x__ {_HelloRequest'_unknownFields = y__})
+  defMessage
+    = HelloRequest'_constructor
+        {_HelloRequest'name = Data.ProtoLens.fieldDefault,
+         _HelloRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          HelloRequest -> Data.ProtoLens.Encoding.Bytes.Parser HelloRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "name"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "HelloRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData HelloRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_HelloRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_HelloRequest'name x__) ())
+data Greeter = Greeter {}
+instance Data.ProtoLens.Service.Types.Service Greeter where
+  type ServiceName Greeter = "Greeter"
+  type ServicePackage Greeter = "helloworld"
+  type ServiceMethods Greeter = '["sayHello",
+                                  "sayHelloBidiStream",
+                                  "sayHelloStreamReply"]
+  packedServiceDescriptor _
+    = "\n\
+      \\aGreeter\DC2>\n\
+      \\bSayHello\DC2\CAN.helloworld.HelloRequest\SUB\SYN.helloworld.HelloReply\"\NUL\DC2K\n\
+      \\DC3SayHelloStreamReply\DC2\CAN.helloworld.HelloRequest\SUB\SYN.helloworld.HelloReply\"\NUL0\SOH\DC2L\n\
+      \\DC2SayHelloBidiStream\DC2\CAN.helloworld.HelloRequest\SUB\SYN.helloworld.HelloReply\"\NUL(\SOH0\SOH"
+instance Data.ProtoLens.Service.Types.HasMethodImpl Greeter "sayHello" where
+  type MethodName Greeter "sayHello" = "SayHello"
+  type MethodInput Greeter "sayHello" = HelloRequest
+  type MethodOutput Greeter "sayHello" = HelloReply
+  type MethodStreamingType Greeter "sayHello" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl Greeter "sayHelloStreamReply" where
+  type MethodName Greeter "sayHelloStreamReply" = "SayHelloStreamReply"
+  type MethodInput Greeter "sayHelloStreamReply" = HelloRequest
+  type MethodOutput Greeter "sayHelloStreamReply" = HelloReply
+  type MethodStreamingType Greeter "sayHelloStreamReply" = 'Data.ProtoLens.Service.Types.ServerStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl Greeter "sayHelloBidiStream" where
+  type MethodName Greeter "sayHelloBidiStream" = "SayHelloBidiStream"
+  type MethodInput Greeter "sayHelloBidiStream" = HelloRequest
+  type MethodOutput Greeter "sayHelloBidiStream" = HelloReply
+  type MethodStreamingType Greeter "sayHelloBidiStream" = 'Data.ProtoLens.Service.Types.BiDiStreaming
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\DLEhelloworld.proto\DC2\n\
+    \helloworld\"\"\n\
+    \\fHelloRequest\DC2\DC2\n\
+    \\EOTname\CAN\SOH \SOH(\tR\EOTname\"&\n\
+    \\n\
+    \HelloReply\DC2\CAN\n\
+    \\amessage\CAN\SOH \SOH(\tR\amessage2\228\SOH\n\
+    \\aGreeter\DC2>\n\
+    \\bSayHello\DC2\CAN.helloworld.HelloRequest\SUB\SYN.helloworld.HelloReply\"\NUL\DC2K\n\
+    \\DC3SayHelloStreamReply\DC2\CAN.helloworld.HelloRequest\SUB\SYN.helloworld.HelloReply\"\NUL0\SOH\DC2L\n\
+    \\DC2SayHelloBidiStream\DC2\CAN.helloworld.HelloRequest\SUB\SYN.helloworld.HelloReply\"\NUL(\SOH0\SOHB6\n\
+    \\ESCio.grpc.examples.helloworldB\SIHelloWorldProtoP\SOH\162\STX\ETXHLWJ\201\t\n\
+    \\ACK\DC2\EOT\SO\NUL)\SOH\n\
+    \\191\EOT\n\
+    \\SOH\f\DC2\ETX\SO\NUL\DC22\180\EOT Copyright 2015 gRPC authors.\n\
+    \\n\
+    \ Licensed under the Apache License, Version 2.0 (the \"License\");\n\
+    \ you may not use this file except in compliance with the License.\n\
+    \ You may obtain a copy of the License at\n\
+    \\n\
+    \     http://www.apache.org/licenses/LICENSE-2.0\n\
+    \\n\
+    \ Unless required by applicable law or agreed to in writing, software\n\
+    \ distributed under the License is distributed on an \"AS IS\" BASIS,\n\
+    \ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+    \ See the License for the specific language governing permissions and\n\
+    \ limitations under the License.\n\
+    \\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DLE\NUL\"\n\
+    \\t\n\
+    \\STX\b\n\
+    \\DC2\ETX\DLE\NUL\"\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC1\NUL4\n\
+    \\t\n\
+    \\STX\b\SOH\DC2\ETX\DC1\NUL4\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC2\NUL0\n\
+    \\t\n\
+    \\STX\b\b\DC2\ETX\DC2\NUL0\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC3\NUL!\n\
+    \\t\n\
+    \\STX\b$\DC2\ETX\DC3\NUL!\n\
+    \\b\n\
+    \\SOH\STX\DC2\ETX\NAK\NUL\DC3\n\
+    \.\n\
+    \\STX\ACK\NUL\DC2\EOT\CAN\NUL\US\SOH\SUB\" The greeting service definition.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\ACK\NUL\SOH\DC2\ETX\CAN\b\SI\n\
+    \\US\n\
+    \\EOT\ACK\NUL\STX\NUL\DC2\ETX\SUB\STX5\SUB\DC2 Sends a greeting\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX\SUB\ACK\SO\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX\SUB\DLE\FS\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX\SUB'1\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\SOH\DC2\ETX\FS\STXG\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\SOH\DC2\ETX\FS\ACK\EM\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\STX\DC2\ETX\FS\ESC'\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\ACK\DC2\ETX\FS28\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\ETX\DC2\ETX\FS9C\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\STX\DC2\ETX\RS\STXM\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\SOH\DC2\ETX\RS\ACK\CAN\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\ENQ\DC2\ETX\RS\SUB \n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\STX\DC2\ETX\RS!-\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\ACK\DC2\ETX\RS8>\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\ETX\DC2\ETX\RS?I\n\
+    \=\n\
+    \\STX\EOT\NUL\DC2\EOT\"\NUL$\SOH\SUB1 The request message containing the user's name.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX\"\b\DC4\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX#\STX\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX#\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX#\t\r\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX#\DLE\DC1\n\
+    \;\n\
+    \\STX\EOT\SOH\DC2\EOT'\NUL)\SOH\SUB/ The response message containing the greetings\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\SOH\SOH\DC2\ETX'\b\DC2\n\
+    \\v\n\
+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX(\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX(\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX(\t\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX(\DC3\DC4b\ACKproto3"
diff --git a/proto/Proto/Kvstore.hs b/proto/Proto/Kvstore.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Kvstore.hs
@@ -0,0 +1,1084 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from kvstore.proto by the proto-lens-protoc program. -}
+{-# 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.Kvstore (
+        KeyValueService(..), CreateRequest(), CreateResponse(),
+        DeleteRequest(), DeleteResponse(), RetrieveRequest(),
+        RetrieveResponse(), UpdateRequest(), UpdateResponse()
+    ) 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
+{- | Fields :
+     
+         * 'Proto.Kvstore_Fields.key' @:: Lens' CreateRequest Data.ByteString.ByteString@
+         * 'Proto.Kvstore_Fields.value' @:: Lens' CreateRequest Data.ByteString.ByteString@ -}
+data CreateRequest
+  = CreateRequest'_constructor {_CreateRequest'key :: !Data.ByteString.ByteString,
+                                _CreateRequest'value :: !Data.ByteString.ByteString,
+                                _CreateRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show CreateRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField CreateRequest "key" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _CreateRequest'key (\ x__ y__ -> x__ {_CreateRequest'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField CreateRequest "value" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _CreateRequest'value
+           (\ x__ y__ -> x__ {_CreateRequest'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message CreateRequest where
+  messageName _ = Data.Text.pack "io.grpc.CreateRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\rCreateRequest\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\fR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor CreateRequest
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor CreateRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _CreateRequest'_unknownFields
+        (\ x__ y__ -> x__ {_CreateRequest'_unknownFields = y__})
+  defMessage
+    = CreateRequest'_constructor
+        {_CreateRequest'key = Data.ProtoLens.fieldDefault,
+         _CreateRequest'value = Data.ProtoLens.fieldDefault,
+         _CreateRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          CreateRequest -> Data.ProtoLens.Encoding.Bytes.Parser CreateRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "CreateRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((\ bs
+                          -> (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData CreateRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_CreateRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_CreateRequest'key x__)
+                (Control.DeepSeq.deepseq (_CreateRequest'value x__) ()))
+{- | Fields :
+      -}
+data CreateResponse
+  = CreateResponse'_constructor {_CreateResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show CreateResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message CreateResponse where
+  messageName _ = Data.Text.pack "io.grpc.CreateResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOCreateResponse"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _CreateResponse'_unknownFields
+        (\ x__ y__ -> x__ {_CreateResponse'_unknownFields = y__})
+  defMessage
+    = CreateResponse'_constructor {_CreateResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          CreateResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser CreateResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "CreateResponse"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData CreateResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq (_CreateResponse'_unknownFields x__) ()
+{- | Fields :
+     
+         * 'Proto.Kvstore_Fields.key' @:: Lens' DeleteRequest Data.ByteString.ByteString@ -}
+data DeleteRequest
+  = DeleteRequest'_constructor {_DeleteRequest'key :: !Data.ByteString.ByteString,
+                                _DeleteRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show DeleteRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField DeleteRequest "key" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _DeleteRequest'key (\ x__ y__ -> x__ {_DeleteRequest'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message DeleteRequest where
+  messageName _ = Data.Text.pack "io.grpc.DeleteRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\rDeleteRequest\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\fR\ETXkey"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor DeleteRequest
+      in
+        Data.Map.fromList [(Data.ProtoLens.Tag 1, key__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _DeleteRequest'_unknownFields
+        (\ x__ y__ -> x__ {_DeleteRequest'_unknownFields = y__})
+  defMessage
+    = DeleteRequest'_constructor
+        {_DeleteRequest'key = Data.ProtoLens.fieldDefault,
+         _DeleteRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          DeleteRequest -> Data.ProtoLens.Encoding.Bytes.Parser DeleteRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "DeleteRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((\ bs
+                          -> (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData DeleteRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_DeleteRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_DeleteRequest'key x__) ())
+{- | Fields :
+      -}
+data DeleteResponse
+  = DeleteResponse'_constructor {_DeleteResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show DeleteResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message DeleteResponse where
+  messageName _ = Data.Text.pack "io.grpc.DeleteResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\SODeleteResponse"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _DeleteResponse'_unknownFields
+        (\ x__ y__ -> x__ {_DeleteResponse'_unknownFields = y__})
+  defMessage
+    = DeleteResponse'_constructor {_DeleteResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          DeleteResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "DeleteResponse"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData DeleteResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq (_DeleteResponse'_unknownFields x__) ()
+{- | Fields :
+     
+         * 'Proto.Kvstore_Fields.key' @:: Lens' RetrieveRequest Data.ByteString.ByteString@ -}
+data RetrieveRequest
+  = RetrieveRequest'_constructor {_RetrieveRequest'key :: !Data.ByteString.ByteString,
+                                  _RetrieveRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show RetrieveRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField RetrieveRequest "key" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RetrieveRequest'key
+           (\ x__ y__ -> x__ {_RetrieveRequest'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message RetrieveRequest where
+  messageName _ = Data.Text.pack "io.grpc.RetrieveRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\SIRetrieveRequest\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\fR\ETXkey"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor RetrieveRequest
+      in
+        Data.Map.fromList [(Data.ProtoLens.Tag 1, key__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _RetrieveRequest'_unknownFields
+        (\ x__ y__ -> x__ {_RetrieveRequest'_unknownFields = y__})
+  defMessage
+    = RetrieveRequest'_constructor
+        {_RetrieveRequest'key = Data.ProtoLens.fieldDefault,
+         _RetrieveRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          RetrieveRequest
+          -> Data.ProtoLens.Encoding.Bytes.Parser RetrieveRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RetrieveRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((\ bs
+                          -> (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData RetrieveRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_RetrieveRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_RetrieveRequest'key x__) ())
+{- | Fields :
+     
+         * 'Proto.Kvstore_Fields.value' @:: Lens' RetrieveResponse Data.ByteString.ByteString@ -}
+data RetrieveResponse
+  = RetrieveResponse'_constructor {_RetrieveResponse'value :: !Data.ByteString.ByteString,
+                                   _RetrieveResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show RetrieveResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField RetrieveResponse "value" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RetrieveResponse'value
+           (\ x__ y__ -> x__ {_RetrieveResponse'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message RetrieveResponse where
+  messageName _ = Data.Text.pack "io.grpc.RetrieveResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLERetrieveResponse\DC2\DC4\n\
+      \\ENQvalue\CAN\SOH \SOH(\fR\ENQvalue"
+  packedFileDescriptor _ = packedFileDescriptor
+  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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor RetrieveResponse
+      in
+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _RetrieveResponse'_unknownFields
+        (\ x__ y__ -> x__ {_RetrieveResponse'_unknownFields = y__})
+  defMessage
+    = RetrieveResponse'_constructor
+        {_RetrieveResponse'value = Data.ProtoLens.fieldDefault,
+         _RetrieveResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          RetrieveResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser RetrieveResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RetrieveResponse"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((\ bs
+                          -> (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData RetrieveResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_RetrieveResponse'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_RetrieveResponse'value x__) ())
+{- | Fields :
+     
+         * 'Proto.Kvstore_Fields.key' @:: Lens' UpdateRequest Data.ByteString.ByteString@
+         * 'Proto.Kvstore_Fields.value' @:: Lens' UpdateRequest Data.ByteString.ByteString@ -}
+data UpdateRequest
+  = UpdateRequest'_constructor {_UpdateRequest'key :: !Data.ByteString.ByteString,
+                                _UpdateRequest'value :: !Data.ByteString.ByteString,
+                                _UpdateRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show UpdateRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField UpdateRequest "key" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _UpdateRequest'key (\ x__ y__ -> x__ {_UpdateRequest'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField UpdateRequest "value" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _UpdateRequest'value
+           (\ x__ y__ -> x__ {_UpdateRequest'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message UpdateRequest where
+  messageName _ = Data.Text.pack "io.grpc.UpdateRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\rUpdateRequest\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\fR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor UpdateRequest
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor UpdateRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _UpdateRequest'_unknownFields
+        (\ x__ y__ -> x__ {_UpdateRequest'_unknownFields = y__})
+  defMessage
+    = UpdateRequest'_constructor
+        {_UpdateRequest'key = Data.ProtoLens.fieldDefault,
+         _UpdateRequest'value = Data.ProtoLens.fieldDefault,
+         _UpdateRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          UpdateRequest -> Data.ProtoLens.Encoding.Bytes.Parser UpdateRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "UpdateRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((\ bs
+                          -> (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData UpdateRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_UpdateRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_UpdateRequest'key x__)
+                (Control.DeepSeq.deepseq (_UpdateRequest'value x__) ()))
+{- | Fields :
+      -}
+data UpdateResponse
+  = UpdateResponse'_constructor {_UpdateResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show UpdateResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message UpdateResponse where
+  messageName _ = Data.Text.pack "io.grpc.UpdateResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOUpdateResponse"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _UpdateResponse'_unknownFields
+        (\ x__ y__ -> x__ {_UpdateResponse'_unknownFields = y__})
+  defMessage
+    = UpdateResponse'_constructor {_UpdateResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          UpdateResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser UpdateResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "UpdateResponse"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData UpdateResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq (_UpdateResponse'_unknownFields x__) ()
+data KeyValueService = KeyValueService {}
+instance Data.ProtoLens.Service.Types.Service KeyValueService where
+  type ServiceName KeyValueService = "KeyValueService"
+  type ServicePackage KeyValueService = "io.grpc"
+  type ServiceMethods KeyValueService = '["create",
+                                          "delete",
+                                          "retrieve",
+                                          "update"]
+  packedServiceDescriptor _
+    = "\n\
+      \\SIKeyValueService\DC29\n\
+      \\ACKCreate\DC2\SYN.io.grpc.CreateRequest\SUB\ETB.io.grpc.CreateResponse\DC2?\n\
+      \\bRetrieve\DC2\CAN.io.grpc.RetrieveRequest\SUB\EM.io.grpc.RetrieveResponse\DC29\n\
+      \\ACKUpdate\DC2\SYN.io.grpc.UpdateRequest\SUB\ETB.io.grpc.UpdateResponse\DC29\n\
+      \\ACKDelete\DC2\SYN.io.grpc.DeleteRequest\SUB\ETB.io.grpc.DeleteResponse"
+instance Data.ProtoLens.Service.Types.HasMethodImpl KeyValueService "create" where
+  type MethodName KeyValueService "create" = "Create"
+  type MethodInput KeyValueService "create" = CreateRequest
+  type MethodOutput KeyValueService "create" = CreateResponse
+  type MethodStreamingType KeyValueService "create" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl KeyValueService "retrieve" where
+  type MethodName KeyValueService "retrieve" = "Retrieve"
+  type MethodInput KeyValueService "retrieve" = RetrieveRequest
+  type MethodOutput KeyValueService "retrieve" = RetrieveResponse
+  type MethodStreamingType KeyValueService "retrieve" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl KeyValueService "update" where
+  type MethodName KeyValueService "update" = "Update"
+  type MethodInput KeyValueService "update" = UpdateRequest
+  type MethodOutput KeyValueService "update" = UpdateResponse
+  type MethodStreamingType KeyValueService "update" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl KeyValueService "delete" where
+  type MethodName KeyValueService "delete" = "Delete"
+  type MethodInput KeyValueService "delete" = DeleteRequest
+  type MethodOutput KeyValueService "delete" = DeleteResponse
+  type MethodStreamingType KeyValueService "delete" = 'Data.ProtoLens.Service.Types.NonStreaming
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\rkvstore.proto\DC2\aio.grpc\"7\n\
+    \\rCreateRequest\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\fR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue\"\DLE\n\
+    \\SOCreateResponse\"#\n\
+    \\SIRetrieveRequest\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\fR\ETXkey\"(\n\
+    \\DLERetrieveResponse\DC2\DC4\n\
+    \\ENQvalue\CAN\SOH \SOH(\fR\ENQvalue\"7\n\
+    \\rUpdateRequest\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\fR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue\"\DLE\n\
+    \\SOUpdateResponse\"!\n\
+    \\rDeleteRequest\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\fR\ETXkey\"\DLE\n\
+    \\SODeleteResponse2\131\STX\n\
+    \\SIKeyValueService\DC29\n\
+    \\ACKCreate\DC2\SYN.io.grpc.CreateRequest\SUB\ETB.io.grpc.CreateResponse\DC2?\n\
+    \\bRetrieve\DC2\CAN.io.grpc.RetrieveRequest\SUB\EM.io.grpc.RetrieveResponse\DC29\n\
+    \\ACKUpdate\DC2\SYN.io.grpc.UpdateRequest\SUB\ETB.io.grpc.UpdateResponse\DC29\n\
+    \\ACKDelete\DC2\SYN.io.grpc.DeleteRequest\SUB\ETB.io.grpc.DeleteResponseB%\n\
+    \\SYNio.grpc.examples.protoB\tKeyValuesP\SOHJ\144\a\n\
+    \\ACK\DC2\EOT\NUL\NUL+\SOH\n\
+    \\b\n\
+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
+    \\b\n\
+    \\SOH\STX\DC2\ETX\STX\NUL\DLE\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\ETX\NUL/\n\
+    \\t\n\
+    \\STX\b\SOH\DC2\ETX\ETX\NUL/\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\EOT\NUL\"\n\
+    \\t\n\
+    \\STX\b\n\
+    \\DC2\ETX\EOT\NUL\"\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\ENQ\NUL*\n\
+    \\t\n\
+    \\STX\b\b\DC2\ETX\ENQ\NUL*\n\
+    \\n\
+    \\n\
+    \\STX\EOT\NUL\DC2\EOT\a\NUL\n\
+    \\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX\a\b\NAK\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\b\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\b\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\b\b\v\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\b\SO\SI\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\t\STX\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\t\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\t\b\r\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\t\DLE\DC1\n\
+    \\n\
+    \\n\
+    \\STX\EOT\SOH\DC2\EOT\f\NUL\r\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\SOH\SOH\DC2\ETX\f\b\SYN\n\
+    \\n\
+    \\n\
+    \\STX\EOT\STX\DC2\EOT\SI\NUL\DC1\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\STX\SOH\DC2\ETX\SI\b\ETB\n\
+    \\v\n\
+    \\EOT\EOT\STX\STX\NUL\DC2\ETX\DLE\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX\DLE\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\DLE\b\v\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\DLE\SO\SI\n\
+    \\n\
+    \\n\
+    \\STX\EOT\ETX\DC2\EOT\DC3\NUL\NAK\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\ETX\SOH\DC2\ETX\DC3\b\CAN\n\
+    \\v\n\
+    \\EOT\EOT\ETX\STX\NUL\DC2\ETX\DC4\STX\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\ENQ\DC2\ETX\DC4\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETX\DC4\b\r\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETX\DC4\DLE\DC1\n\
+    \\n\
+    \\n\
+    \\STX\EOT\EOT\DC2\EOT\ETB\NUL\SUB\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\EOT\SOH\DC2\ETX\ETB\b\NAK\n\
+    \\v\n\
+    \\EOT\EOT\EOT\STX\NUL\DC2\ETX\CAN\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\ETX\CAN\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETX\CAN\b\v\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETX\CAN\SO\SI\n\
+    \\v\n\
+    \\EOT\EOT\EOT\STX\SOH\DC2\ETX\EM\STX\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\ENQ\DC2\ETX\EM\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\SOH\DC2\ETX\EM\b\r\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\ETX\DC2\ETX\EM\DLE\DC1\n\
+    \\n\
+    \\n\
+    \\STX\EOT\ENQ\DC2\EOT\FS\NUL\GS\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\ENQ\SOH\DC2\ETX\FS\b\SYN\n\
+    \\n\
+    \\n\
+    \\STX\EOT\ACK\DC2\EOT\US\NUL!\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\ACK\SOH\DC2\ETX\US\b\NAK\n\
+    \\v\n\
+    \\EOT\EOT\ACK\STX\NUL\DC2\ETX \STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\ACK\STX\NUL\ENQ\DC2\ETX \STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\ACK\STX\NUL\SOH\DC2\ETX \b\v\n\
+    \\f\n\
+    \\ENQ\EOT\ACK\STX\NUL\ETX\DC2\ETX \SO\SI\n\
+    \\n\
+    \\n\
+    \\STX\EOT\a\DC2\EOT#\NUL$\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\a\SOH\DC2\ETX#\b\SYN\n\
+    \\n\
+    \\n\
+    \\STX\ACK\NUL\DC2\EOT&\NUL+\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\ACK\NUL\SOH\DC2\ETX&\b\ETB\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\NUL\DC2\ETX'\STX5\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX'\ACK\f\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX'\r\SUB\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX'%3\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\SOH\DC2\ETX(\STX;\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\SOH\DC2\ETX(\ACK\SO\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\STX\DC2\ETX(\SI\RS\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\ETX\DC2\ETX()9\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\STX\DC2\ETX)\STX5\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\SOH\DC2\ETX)\ACK\f\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\STX\DC2\ETX)\r\SUB\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\ETX\DC2\ETX)%3\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\ETX\DC2\ETX*\STX5\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\SOH\DC2\ETX*\ACK\f\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\STX\DC2\ETX*\r\SUB\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\ETX\DC2\ETX*%3b\ACKproto3"
diff --git a/proto/Proto/Messages.hs b/proto/Proto/Messages.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Messages.hs
@@ -0,0 +1,9347 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from messages.proto by the proto-lens-protoc program. -}
+{-# 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.Messages (
+        BoolValue(), ClientConfigureRequest(),
+        ClientConfigureRequest'Metadata(),
+        ClientConfigureRequest'RpcType(..),
+        ClientConfigureRequest'RpcType(),
+        ClientConfigureRequest'RpcType'UnrecognizedValue,
+        ClientConfigureResponse(), EchoStatus(), GrpclbRouteType(..),
+        GrpclbRouteType(), GrpclbRouteType'UnrecognizedValue,
+        HookRequest(), HookRequest'HookRequestCommand(..),
+        HookRequest'HookRequestCommand(),
+        HookRequest'HookRequestCommand'UnrecognizedValue, HookResponse(),
+        LoadBalancerAccumulatedStatsRequest(),
+        LoadBalancerAccumulatedStatsResponse(),
+        LoadBalancerAccumulatedStatsResponse'MethodStats(),
+        LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry(),
+        LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry(),
+        LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry(),
+        LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry(),
+        LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry(),
+        LoadBalancerStatsRequest(), LoadBalancerStatsResponse(),
+        LoadBalancerStatsResponse'MetadataByPeer(),
+        LoadBalancerStatsResponse'MetadataEntry(),
+        LoadBalancerStatsResponse'MetadataType(..),
+        LoadBalancerStatsResponse'MetadataType(),
+        LoadBalancerStatsResponse'MetadataType'UnrecognizedValue,
+        LoadBalancerStatsResponse'MetadatasByPeerEntry(),
+        LoadBalancerStatsResponse'RpcMetadata(),
+        LoadBalancerStatsResponse'RpcsByMethodEntry(),
+        LoadBalancerStatsResponse'RpcsByPeer(),
+        LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry(),
+        LoadBalancerStatsResponse'RpcsByPeerEntry(), MemorySize(),
+        Payload(), PayloadType(..), PayloadType(),
+        PayloadType'UnrecognizedValue, ReconnectInfo(), ReconnectParams(),
+        ResponseParameters(), SetReturnStatusRequest(), SimpleRequest(),
+        SimpleResponse(), StreamingInputCallRequest(),
+        StreamingInputCallResponse(), StreamingOutputCallRequest(),
+        StreamingOutputCallResponse(), TestOrcaReport(),
+        TestOrcaReport'RequestCostEntry(),
+        TestOrcaReport'UtilizationEntry()
+    ) 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
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.value' @:: Lens' BoolValue Prelude.Bool@ -}
+data BoolValue
+  = BoolValue'_constructor {_BoolValue'value :: !Prelude.Bool,
+                            _BoolValue'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show BoolValue where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField BoolValue "value" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _BoolValue'value (\ x__ y__ -> x__ {_BoolValue'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message BoolValue where
+  messageName _ = Data.Text.pack "grpc.testing.BoolValue"
+  packedMessageDescriptor _
+    = "\n\
+      \\tBoolValue\DC2\DC4\n\
+      \\ENQvalue\CAN\SOH \SOH(\bR\ENQvalue"
+  packedFileDescriptor _ = packedFileDescriptor
+  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 (Data.ProtoLens.Field.field @"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__})
+  defMessage
+    = BoolValue'_constructor
+        {_BoolValue'value = Data.ProtoLens.fieldDefault,
+         _BoolValue'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: BoolValue -> Data.ProtoLens.Encoding.Bytes.Parser BoolValue
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "BoolValue"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
+                         _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData BoolValue where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_BoolValue'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_BoolValue'value x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.types' @:: Lens' ClientConfigureRequest [ClientConfigureRequest'RpcType]@
+         * 'Proto.Messages_Fields.vec'types' @:: Lens' ClientConfigureRequest (Data.Vector.Vector ClientConfigureRequest'RpcType)@
+         * 'Proto.Messages_Fields.metadata' @:: Lens' ClientConfigureRequest [ClientConfigureRequest'Metadata]@
+         * 'Proto.Messages_Fields.vec'metadata' @:: Lens' ClientConfigureRequest (Data.Vector.Vector ClientConfigureRequest'Metadata)@
+         * 'Proto.Messages_Fields.timeoutSec' @:: Lens' ClientConfigureRequest Data.Int.Int32@ -}
+data ClientConfigureRequest
+  = ClientConfigureRequest'_constructor {_ClientConfigureRequest'types :: !(Data.Vector.Vector ClientConfigureRequest'RpcType),
+                                         _ClientConfigureRequest'metadata :: !(Data.Vector.Vector ClientConfigureRequest'Metadata),
+                                         _ClientConfigureRequest'timeoutSec :: !Data.Int.Int32,
+                                         _ClientConfigureRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ClientConfigureRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest "types" [ClientConfigureRequest'RpcType] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'types
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'types = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest "vec'types" (Data.Vector.Vector ClientConfigureRequest'RpcType) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'types
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'types = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest "metadata" [ClientConfigureRequest'Metadata] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'metadata
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'metadata = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest "vec'metadata" (Data.Vector.Vector ClientConfigureRequest'Metadata) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'metadata
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'metadata = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest "timeoutSec" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'timeoutSec
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'timeoutSec = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ClientConfigureRequest where
+  messageName _
+    = Data.Text.pack "grpc.testing.ClientConfigureRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\SYNClientConfigureRequest\DC2B\n\
+      \\ENQtypes\CAN\SOH \ETX(\SO2,.grpc.testing.ClientConfigureRequest.RpcTypeR\ENQtypes\DC2I\n\
+      \\bmetadata\CAN\STX \ETX(\v2-.grpc.testing.ClientConfigureRequest.MetadataR\bmetadata\DC2\US\n\
+      \\vtimeout_sec\CAN\ETX \SOH(\ENQR\n\
+      \timeoutSec\SUBt\n\
+      \\bMetadata\DC2@\n\
+      \\EOTtype\CAN\SOH \SOH(\SO2,.grpc.testing.ClientConfigureRequest.RpcTypeR\EOTtype\DC2\DLE\n\
+      \\ETXkey\CAN\STX \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\ETX \SOH(\tR\ENQvalue\")\n\
+      \\aRpcType\DC2\SO\n\
+      \\n\
+      \EMPTY_CALL\DLE\NUL\DC2\SO\n\
+      \\n\
+      \UNARY_CALL\DLE\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        types__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "types"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ClientConfigureRequest'RpcType)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed (Data.ProtoLens.Field.field @"types")) ::
+              Data.ProtoLens.FieldDescriptor ClientConfigureRequest
+        metadata__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "metadata"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ClientConfigureRequest'Metadata)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"metadata")) ::
+              Data.ProtoLens.FieldDescriptor ClientConfigureRequest
+        timeoutSec__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "timeout_sec"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"timeoutSec")) ::
+              Data.ProtoLens.FieldDescriptor ClientConfigureRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, types__field_descriptor),
+           (Data.ProtoLens.Tag 2, metadata__field_descriptor),
+           (Data.ProtoLens.Tag 3, timeoutSec__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ClientConfigureRequest'_unknownFields
+        (\ x__ y__ -> x__ {_ClientConfigureRequest'_unknownFields = y__})
+  defMessage
+    = ClientConfigureRequest'_constructor
+        {_ClientConfigureRequest'types = Data.Vector.Generic.empty,
+         _ClientConfigureRequest'metadata = Data.Vector.Generic.empty,
+         _ClientConfigureRequest'timeoutSec = Data.ProtoLens.fieldDefault,
+         _ClientConfigureRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ClientConfigureRequest
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ClientConfigureRequest'Metadata
+             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ClientConfigureRequest'RpcType
+                -> Data.ProtoLens.Encoding.Bytes.Parser ClientConfigureRequest
+        loop x mutable'metadata mutable'types
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'metadata <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                           (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                              mutable'metadata)
+                      frozen'types <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                        (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'types)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'metadata") frozen'metadata
+                              (Lens.Family2.set
+                                 (Data.ProtoLens.Field.field @"vec'types") frozen'types x)))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.toEnum
+                                           (Prelude.fmap
+                                              Prelude.fromIntegral
+                                              Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                        "types"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append mutable'types y)
+                                loop x mutable'metadata v
+                        10
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.toEnum
+                                                                       (Prelude.fmap
+                                                                          Prelude.fromIntegral
+                                                                          Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                                                    "types"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'types)
+                                loop x mutable'metadata y
+                        18
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "metadata"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append mutable'metadata y)
+                                loop x v mutable'types
+                        24
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "timeout_sec"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"timeoutSec") y x)
+                                  mutable'metadata mutable'types
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'metadata mutable'types
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'metadata <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                    Data.ProtoLens.Encoding.Growing.new
+              mutable'types <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                 Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'metadata mutable'types)
+          "ClientConfigureRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                p = Lens.Family2.view (Data.ProtoLens.Field.field @"vec'types") _x
+              in
+                if Data.Vector.Generic.null p then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((\ bs
+                          -> (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         (Data.ProtoLens.Encoding.Bytes.runBuilder
+                            (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                               ((Prelude..)
+                                  ((Prelude..)
+                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                                  Prelude.fromEnum)
+                               p))))
+             ((Data.Monoid.<>)
+                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                   (\ _v
+                      -> (Data.Monoid.<>)
+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                           ((Prelude..)
+                              (\ bs
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                              Data.ProtoLens.encodeMessage _v))
+                   (Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"vec'metadata") _x))
+                ((Data.Monoid.<>)
+                   (let
+                      _v
+                        = Lens.Family2.view (Data.ProtoLens.Field.field @"timeoutSec") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
+                            ((Prelude..)
+                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
+instance Control.DeepSeq.NFData ClientConfigureRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ClientConfigureRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ClientConfigureRequest'types x__)
+                (Control.DeepSeq.deepseq
+                   (_ClientConfigureRequest'metadata x__)
+                   (Control.DeepSeq.deepseq
+                      (_ClientConfigureRequest'timeoutSec x__) ())))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.type'' @:: Lens' ClientConfigureRequest'Metadata ClientConfigureRequest'RpcType@
+         * 'Proto.Messages_Fields.key' @:: Lens' ClientConfigureRequest'Metadata Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' ClientConfigureRequest'Metadata Data.Text.Text@ -}
+data ClientConfigureRequest'Metadata
+  = ClientConfigureRequest'Metadata'_constructor {_ClientConfigureRequest'Metadata'type' :: !ClientConfigureRequest'RpcType,
+                                                  _ClientConfigureRequest'Metadata'key :: !Data.Text.Text,
+                                                  _ClientConfigureRequest'Metadata'value :: !Data.Text.Text,
+                                                  _ClientConfigureRequest'Metadata'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ClientConfigureRequest'Metadata where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest'Metadata "type'" ClientConfigureRequest'RpcType where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'Metadata'type'
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'Metadata'type' = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest'Metadata "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'Metadata'key
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'Metadata'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ClientConfigureRequest'Metadata "value" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ClientConfigureRequest'Metadata'value
+           (\ x__ y__ -> x__ {_ClientConfigureRequest'Metadata'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ClientConfigureRequest'Metadata where
+  messageName _
+    = Data.Text.pack "grpc.testing.ClientConfigureRequest.Metadata"
+  packedMessageDescriptor _
+    = "\n\
+      \\bMetadata\DC2@\n\
+      \\EOTtype\CAN\SOH \SOH(\SO2,.grpc.testing.ClientConfigureRequest.RpcTypeR\EOTtype\DC2\DLE\n\
+      \\ETXkey\CAN\STX \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\ETX \SOH(\tR\ENQvalue"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        type'__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ClientConfigureRequest'RpcType)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"type'")) ::
+              Data.ProtoLens.FieldDescriptor ClientConfigureRequest'Metadata
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ClientConfigureRequest'Metadata
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ClientConfigureRequest'Metadata
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, type'__field_descriptor),
+           (Data.ProtoLens.Tag 2, key__field_descriptor),
+           (Data.ProtoLens.Tag 3, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ClientConfigureRequest'Metadata'_unknownFields
+        (\ x__ y__
+           -> x__ {_ClientConfigureRequest'Metadata'_unknownFields = y__})
+  defMessage
+    = ClientConfigureRequest'Metadata'_constructor
+        {_ClientConfigureRequest'Metadata'type' = Data.ProtoLens.fieldDefault,
+         _ClientConfigureRequest'Metadata'key = Data.ProtoLens.fieldDefault,
+         _ClientConfigureRequest'Metadata'value = Data.ProtoLens.fieldDefault,
+         _ClientConfigureRequest'Metadata'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ClientConfigureRequest'Metadata
+          -> Data.ProtoLens.Encoding.Bytes.Parser ClientConfigureRequest'Metadata
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "type"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"type'") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        26
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Metadata"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"type'") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                         Prelude.fromEnum _v))
+             ((Data.Monoid.<>)
+                (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                ((Data.Monoid.<>)
+                   (let
+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                            ((Prelude..)
+                               (\ bs
+                                  -> (Data.Monoid.<>)
+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                               Data.Text.Encoding.encodeUtf8 _v))
+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
+instance Control.DeepSeq.NFData ClientConfigureRequest'Metadata where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ClientConfigureRequest'Metadata'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ClientConfigureRequest'Metadata'type' x__)
+                (Control.DeepSeq.deepseq
+                   (_ClientConfigureRequest'Metadata'key x__)
+                   (Control.DeepSeq.deepseq
+                      (_ClientConfigureRequest'Metadata'value x__) ())))
+newtype ClientConfigureRequest'RpcType'UnrecognizedValue
+  = ClientConfigureRequest'RpcType'UnrecognizedValue Data.Int.Int32
+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)
+data ClientConfigureRequest'RpcType
+  = ClientConfigureRequest'EMPTY_CALL |
+    ClientConfigureRequest'UNARY_CALL |
+    ClientConfigureRequest'RpcType'Unrecognized !ClientConfigureRequest'RpcType'UnrecognizedValue
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.MessageEnum ClientConfigureRequest'RpcType where
+  maybeToEnum 0 = Prelude.Just ClientConfigureRequest'EMPTY_CALL
+  maybeToEnum 1 = Prelude.Just ClientConfigureRequest'UNARY_CALL
+  maybeToEnum k
+    = Prelude.Just
+        (ClientConfigureRequest'RpcType'Unrecognized
+           (ClientConfigureRequest'RpcType'UnrecognizedValue
+              (Prelude.fromIntegral k)))
+  showEnum ClientConfigureRequest'EMPTY_CALL = "EMPTY_CALL"
+  showEnum ClientConfigureRequest'UNARY_CALL = "UNARY_CALL"
+  showEnum
+    (ClientConfigureRequest'RpcType'Unrecognized (ClientConfigureRequest'RpcType'UnrecognizedValue k))
+    = Prelude.show k
+  readEnum k
+    | (Prelude.==) k "EMPTY_CALL"
+    = Prelude.Just ClientConfigureRequest'EMPTY_CALL
+    | (Prelude.==) k "UNARY_CALL"
+    = Prelude.Just ClientConfigureRequest'UNARY_CALL
+    | Prelude.otherwise
+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
+instance Prelude.Bounded ClientConfigureRequest'RpcType where
+  minBound = ClientConfigureRequest'EMPTY_CALL
+  maxBound = ClientConfigureRequest'UNARY_CALL
+instance Prelude.Enum ClientConfigureRequest'RpcType where
+  toEnum k__
+    = Prelude.maybe
+        (Prelude.error
+           ((Prelude.++)
+              "toEnum: unknown value for enum RpcType: " (Prelude.show k__)))
+        Prelude.id (Data.ProtoLens.maybeToEnum k__)
+  fromEnum ClientConfigureRequest'EMPTY_CALL = 0
+  fromEnum ClientConfigureRequest'UNARY_CALL = 1
+  fromEnum
+    (ClientConfigureRequest'RpcType'Unrecognized (ClientConfigureRequest'RpcType'UnrecognizedValue k))
+    = Prelude.fromIntegral k
+  succ ClientConfigureRequest'UNARY_CALL
+    = Prelude.error
+        "ClientConfigureRequest'RpcType.succ: bad argument ClientConfigureRequest'UNARY_CALL. This value would be out of bounds."
+  succ ClientConfigureRequest'EMPTY_CALL
+    = ClientConfigureRequest'UNARY_CALL
+  succ (ClientConfigureRequest'RpcType'Unrecognized _)
+    = Prelude.error
+        "ClientConfigureRequest'RpcType.succ: bad argument: unrecognized value"
+  pred ClientConfigureRequest'EMPTY_CALL
+    = Prelude.error
+        "ClientConfigureRequest'RpcType.pred: bad argument ClientConfigureRequest'EMPTY_CALL. This value would be out of bounds."
+  pred ClientConfigureRequest'UNARY_CALL
+    = ClientConfigureRequest'EMPTY_CALL
+  pred (ClientConfigureRequest'RpcType'Unrecognized _)
+    = Prelude.error
+        "ClientConfigureRequest'RpcType.pred: bad argument: unrecognized value"
+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
+instance Data.ProtoLens.FieldDefault ClientConfigureRequest'RpcType where
+  fieldDefault = ClientConfigureRequest'EMPTY_CALL
+instance Control.DeepSeq.NFData ClientConfigureRequest'RpcType where
+  rnf x__ = Prelude.seq x__ ()
+{- | Fields :
+      -}
+data ClientConfigureResponse
+  = ClientConfigureResponse'_constructor {_ClientConfigureResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ClientConfigureResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message ClientConfigureResponse where
+  messageName _
+    = Data.Text.pack "grpc.testing.ClientConfigureResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\ETBClientConfigureResponse"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ClientConfigureResponse'_unknownFields
+        (\ x__ y__ -> x__ {_ClientConfigureResponse'_unknownFields = y__})
+  defMessage
+    = ClientConfigureResponse'_constructor
+        {_ClientConfigureResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ClientConfigureResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser ClientConfigureResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "ClientConfigureResponse"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData ClientConfigureResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ClientConfigureResponse'_unknownFields x__) ()
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.code' @:: Lens' EchoStatus Data.Int.Int32@
+         * 'Proto.Messages_Fields.message' @:: Lens' EchoStatus Data.Text.Text@ -}
+data EchoStatus
+  = EchoStatus'_constructor {_EchoStatus'code :: !Data.Int.Int32,
+                             _EchoStatus'message :: !Data.Text.Text,
+                             _EchoStatus'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show EchoStatus where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField EchoStatus "code" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _EchoStatus'code (\ x__ y__ -> x__ {_EchoStatus'code = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField EchoStatus "message" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _EchoStatus'message (\ x__ y__ -> x__ {_EchoStatus'message = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message EchoStatus where
+  messageName _ = Data.Text.pack "grpc.testing.EchoStatus"
+  packedMessageDescriptor _
+    = "\n\
+      \\n\
+      \EchoStatus\DC2\DC2\n\
+      \\EOTcode\CAN\SOH \SOH(\ENQR\EOTcode\DC2\CAN\n\
+      \\amessage\CAN\STX \SOH(\tR\amessage"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        code__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "code"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"code")) ::
+              Data.ProtoLens.FieldDescriptor EchoStatus
+        message__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "message"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"message")) ::
+              Data.ProtoLens.FieldDescriptor EchoStatus
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, code__field_descriptor),
+           (Data.ProtoLens.Tag 2, message__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _EchoStatus'_unknownFields
+        (\ x__ y__ -> x__ {_EchoStatus'_unknownFields = y__})
+  defMessage
+    = EchoStatus'_constructor
+        {_EchoStatus'code = Data.ProtoLens.fieldDefault,
+         _EchoStatus'message = Data.ProtoLens.fieldDefault,
+         _EchoStatus'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          EchoStatus -> Data.ProtoLens.Encoding.Bytes.Parser EchoStatus
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "code"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"code") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "message"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"message") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "EchoStatus"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"code") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"message") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData EchoStatus where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_EchoStatus'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_EchoStatus'code x__)
+                (Control.DeepSeq.deepseq (_EchoStatus'message x__) ()))
+newtype GrpclbRouteType'UnrecognizedValue
+  = GrpclbRouteType'UnrecognizedValue Data.Int.Int32
+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)
+data GrpclbRouteType
+  = GRPCLB_ROUTE_TYPE_UNKNOWN |
+    GRPCLB_ROUTE_TYPE_FALLBACK |
+    GRPCLB_ROUTE_TYPE_BACKEND |
+    GrpclbRouteType'Unrecognized !GrpclbRouteType'UnrecognizedValue
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.MessageEnum GrpclbRouteType where
+  maybeToEnum 0 = Prelude.Just GRPCLB_ROUTE_TYPE_UNKNOWN
+  maybeToEnum 1 = Prelude.Just GRPCLB_ROUTE_TYPE_FALLBACK
+  maybeToEnum 2 = Prelude.Just GRPCLB_ROUTE_TYPE_BACKEND
+  maybeToEnum k
+    = Prelude.Just
+        (GrpclbRouteType'Unrecognized
+           (GrpclbRouteType'UnrecognizedValue (Prelude.fromIntegral k)))
+  showEnum GRPCLB_ROUTE_TYPE_UNKNOWN = "GRPCLB_ROUTE_TYPE_UNKNOWN"
+  showEnum GRPCLB_ROUTE_TYPE_FALLBACK = "GRPCLB_ROUTE_TYPE_FALLBACK"
+  showEnum GRPCLB_ROUTE_TYPE_BACKEND = "GRPCLB_ROUTE_TYPE_BACKEND"
+  showEnum
+    (GrpclbRouteType'Unrecognized (GrpclbRouteType'UnrecognizedValue k))
+    = Prelude.show k
+  readEnum k
+    | (Prelude.==) k "GRPCLB_ROUTE_TYPE_UNKNOWN"
+    = Prelude.Just GRPCLB_ROUTE_TYPE_UNKNOWN
+    | (Prelude.==) k "GRPCLB_ROUTE_TYPE_FALLBACK"
+    = Prelude.Just GRPCLB_ROUTE_TYPE_FALLBACK
+    | (Prelude.==) k "GRPCLB_ROUTE_TYPE_BACKEND"
+    = Prelude.Just GRPCLB_ROUTE_TYPE_BACKEND
+    | Prelude.otherwise
+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
+instance Prelude.Bounded GrpclbRouteType where
+  minBound = GRPCLB_ROUTE_TYPE_UNKNOWN
+  maxBound = GRPCLB_ROUTE_TYPE_BACKEND
+instance Prelude.Enum GrpclbRouteType where
+  toEnum k__
+    = Prelude.maybe
+        (Prelude.error
+           ((Prelude.++)
+              "toEnum: unknown value for enum GrpclbRouteType: "
+              (Prelude.show k__)))
+        Prelude.id (Data.ProtoLens.maybeToEnum k__)
+  fromEnum GRPCLB_ROUTE_TYPE_UNKNOWN = 0
+  fromEnum GRPCLB_ROUTE_TYPE_FALLBACK = 1
+  fromEnum GRPCLB_ROUTE_TYPE_BACKEND = 2
+  fromEnum
+    (GrpclbRouteType'Unrecognized (GrpclbRouteType'UnrecognizedValue k))
+    = Prelude.fromIntegral k
+  succ GRPCLB_ROUTE_TYPE_BACKEND
+    = Prelude.error
+        "GrpclbRouteType.succ: bad argument GRPCLB_ROUTE_TYPE_BACKEND. This value would be out of bounds."
+  succ GRPCLB_ROUTE_TYPE_UNKNOWN = GRPCLB_ROUTE_TYPE_FALLBACK
+  succ GRPCLB_ROUTE_TYPE_FALLBACK = GRPCLB_ROUTE_TYPE_BACKEND
+  succ (GrpclbRouteType'Unrecognized _)
+    = Prelude.error
+        "GrpclbRouteType.succ: bad argument: unrecognized value"
+  pred GRPCLB_ROUTE_TYPE_UNKNOWN
+    = Prelude.error
+        "GrpclbRouteType.pred: bad argument GRPCLB_ROUTE_TYPE_UNKNOWN. This value would be out of bounds."
+  pred GRPCLB_ROUTE_TYPE_FALLBACK = GRPCLB_ROUTE_TYPE_UNKNOWN
+  pred GRPCLB_ROUTE_TYPE_BACKEND = GRPCLB_ROUTE_TYPE_FALLBACK
+  pred (GrpclbRouteType'Unrecognized _)
+    = Prelude.error
+        "GrpclbRouteType.pred: bad argument: unrecognized value"
+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
+instance Data.ProtoLens.FieldDefault GrpclbRouteType where
+  fieldDefault = GRPCLB_ROUTE_TYPE_UNKNOWN
+instance Control.DeepSeq.NFData GrpclbRouteType where
+  rnf x__ = Prelude.seq x__ ()
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.command' @:: Lens' HookRequest HookRequest'HookRequestCommand@
+         * 'Proto.Messages_Fields.grpcCodeToReturn' @:: Lens' HookRequest Data.Int.Int32@
+         * 'Proto.Messages_Fields.grpcStatusDescription' @:: Lens' HookRequest Data.Text.Text@
+         * 'Proto.Messages_Fields.serverPort' @:: Lens' HookRequest Data.Int.Int32@ -}
+data HookRequest
+  = HookRequest'_constructor {_HookRequest'command :: !HookRequest'HookRequestCommand,
+                              _HookRequest'grpcCodeToReturn :: !Data.Int.Int32,
+                              _HookRequest'grpcStatusDescription :: !Data.Text.Text,
+                              _HookRequest'serverPort :: !Data.Int.Int32,
+                              _HookRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show HookRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField HookRequest "command" HookRequest'HookRequestCommand where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _HookRequest'command
+           (\ x__ y__ -> x__ {_HookRequest'command = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField HookRequest "grpcCodeToReturn" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _HookRequest'grpcCodeToReturn
+           (\ x__ y__ -> x__ {_HookRequest'grpcCodeToReturn = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField HookRequest "grpcStatusDescription" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _HookRequest'grpcStatusDescription
+           (\ x__ y__ -> x__ {_HookRequest'grpcStatusDescription = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField HookRequest "serverPort" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _HookRequest'serverPort
+           (\ x__ y__ -> x__ {_HookRequest'serverPort = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message HookRequest where
+  messageName _ = Data.Text.pack "grpc.testing.HookRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\vHookRequest\DC2F\n\
+      \\acommand\CAN\SOH \SOH(\SO2,.grpc.testing.HookRequest.HookRequestCommandR\acommand\DC2-\n\
+      \\DC3grpc_code_to_return\CAN\STX \SOH(\ENQR\DLEgrpcCodeToReturn\DC26\n\
+      \\ETBgrpc_status_description\CAN\ETX \SOH(\tR\NAKgrpcStatusDescription\DC2\US\n\
+      \\vserver_port\CAN\EOT \SOH(\ENQR\n\
+      \serverPort\"F\n\
+      \\DC2HookRequestCommand\DC2\SI\n\
+      \\vUNSPECIFIED\DLE\NUL\DC2\t\n\
+      \\ENQSTART\DLE\SOH\DC2\b\n\
+      \\EOTSTOP\DLE\STX\DC2\n\
+      \\n\
+      \\ACKRETURN\DLE\ETX"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        command__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "command"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor HookRequest'HookRequestCommand)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"command")) ::
+              Data.ProtoLens.FieldDescriptor HookRequest
+        grpcCodeToReturn__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "grpc_code_to_return"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"grpcCodeToReturn")) ::
+              Data.ProtoLens.FieldDescriptor HookRequest
+        grpcStatusDescription__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "grpc_status_description"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"grpcStatusDescription")) ::
+              Data.ProtoLens.FieldDescriptor HookRequest
+        serverPort__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "server_port"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"serverPort")) ::
+              Data.ProtoLens.FieldDescriptor HookRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, command__field_descriptor),
+           (Data.ProtoLens.Tag 2, grpcCodeToReturn__field_descriptor),
+           (Data.ProtoLens.Tag 3, grpcStatusDescription__field_descriptor),
+           (Data.ProtoLens.Tag 4, serverPort__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _HookRequest'_unknownFields
+        (\ x__ y__ -> x__ {_HookRequest'_unknownFields = y__})
+  defMessage
+    = HookRequest'_constructor
+        {_HookRequest'command = Data.ProtoLens.fieldDefault,
+         _HookRequest'grpcCodeToReturn = Data.ProtoLens.fieldDefault,
+         _HookRequest'grpcStatusDescription = Data.ProtoLens.fieldDefault,
+         _HookRequest'serverPort = Data.ProtoLens.fieldDefault,
+         _HookRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          HookRequest -> Data.ProtoLens.Encoding.Bytes.Parser HookRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "command"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"command") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "grpc_code_to_return"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"grpcCodeToReturn") y x)
+                        26
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "grpc_status_description"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"grpcStatusDescription") y x)
+                        32
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "server_port"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"serverPort") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "HookRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"command") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                         Prelude.fromEnum _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"grpcCodeToReturn") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                ((Data.Monoid.<>)
+                   (let
+                      _v
+                        = Lens.Family2.view
+                            (Data.ProtoLens.Field.field @"grpcStatusDescription") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                            ((Prelude..)
+                               (\ bs
+                                  -> (Data.Monoid.<>)
+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                               Data.Text.Encoding.encodeUtf8 _v))
+                   ((Data.Monoid.<>)
+                      (let
+                         _v
+                           = Lens.Family2.view (Data.ProtoLens.Field.field @"serverPort") _x
+                       in
+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                             Data.Monoid.mempty
+                         else
+                             (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
+                               ((Prelude..)
+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
+instance Control.DeepSeq.NFData HookRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_HookRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_HookRequest'command x__)
+                (Control.DeepSeq.deepseq
+                   (_HookRequest'grpcCodeToReturn x__)
+                   (Control.DeepSeq.deepseq
+                      (_HookRequest'grpcStatusDescription x__)
+                      (Control.DeepSeq.deepseq (_HookRequest'serverPort x__) ()))))
+newtype HookRequest'HookRequestCommand'UnrecognizedValue
+  = HookRequest'HookRequestCommand'UnrecognizedValue Data.Int.Int32
+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)
+data HookRequest'HookRequestCommand
+  = HookRequest'UNSPECIFIED |
+    HookRequest'START |
+    HookRequest'STOP |
+    HookRequest'RETURN |
+    HookRequest'HookRequestCommand'Unrecognized !HookRequest'HookRequestCommand'UnrecognizedValue
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.MessageEnum HookRequest'HookRequestCommand where
+  maybeToEnum 0 = Prelude.Just HookRequest'UNSPECIFIED
+  maybeToEnum 1 = Prelude.Just HookRequest'START
+  maybeToEnum 2 = Prelude.Just HookRequest'STOP
+  maybeToEnum 3 = Prelude.Just HookRequest'RETURN
+  maybeToEnum k
+    = Prelude.Just
+        (HookRequest'HookRequestCommand'Unrecognized
+           (HookRequest'HookRequestCommand'UnrecognizedValue
+              (Prelude.fromIntegral k)))
+  showEnum HookRequest'UNSPECIFIED = "UNSPECIFIED"
+  showEnum HookRequest'START = "START"
+  showEnum HookRequest'STOP = "STOP"
+  showEnum HookRequest'RETURN = "RETURN"
+  showEnum
+    (HookRequest'HookRequestCommand'Unrecognized (HookRequest'HookRequestCommand'UnrecognizedValue k))
+    = Prelude.show k
+  readEnum k
+    | (Prelude.==) k "UNSPECIFIED"
+    = Prelude.Just HookRequest'UNSPECIFIED
+    | (Prelude.==) k "START" = Prelude.Just HookRequest'START
+    | (Prelude.==) k "STOP" = Prelude.Just HookRequest'STOP
+    | (Prelude.==) k "RETURN" = Prelude.Just HookRequest'RETURN
+    | Prelude.otherwise
+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
+instance Prelude.Bounded HookRequest'HookRequestCommand where
+  minBound = HookRequest'UNSPECIFIED
+  maxBound = HookRequest'RETURN
+instance Prelude.Enum HookRequest'HookRequestCommand where
+  toEnum k__
+    = Prelude.maybe
+        (Prelude.error
+           ((Prelude.++)
+              "toEnum: unknown value for enum HookRequestCommand: "
+              (Prelude.show k__)))
+        Prelude.id (Data.ProtoLens.maybeToEnum k__)
+  fromEnum HookRequest'UNSPECIFIED = 0
+  fromEnum HookRequest'START = 1
+  fromEnum HookRequest'STOP = 2
+  fromEnum HookRequest'RETURN = 3
+  fromEnum
+    (HookRequest'HookRequestCommand'Unrecognized (HookRequest'HookRequestCommand'UnrecognizedValue k))
+    = Prelude.fromIntegral k
+  succ HookRequest'RETURN
+    = Prelude.error
+        "HookRequest'HookRequestCommand.succ: bad argument HookRequest'RETURN. This value would be out of bounds."
+  succ HookRequest'UNSPECIFIED = HookRequest'START
+  succ HookRequest'START = HookRequest'STOP
+  succ HookRequest'STOP = HookRequest'RETURN
+  succ (HookRequest'HookRequestCommand'Unrecognized _)
+    = Prelude.error
+        "HookRequest'HookRequestCommand.succ: bad argument: unrecognized value"
+  pred HookRequest'UNSPECIFIED
+    = Prelude.error
+        "HookRequest'HookRequestCommand.pred: bad argument HookRequest'UNSPECIFIED. This value would be out of bounds."
+  pred HookRequest'START = HookRequest'UNSPECIFIED
+  pred HookRequest'STOP = HookRequest'START
+  pred HookRequest'RETURN = HookRequest'STOP
+  pred (HookRequest'HookRequestCommand'Unrecognized _)
+    = Prelude.error
+        "HookRequest'HookRequestCommand.pred: bad argument: unrecognized value"
+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
+instance Data.ProtoLens.FieldDefault HookRequest'HookRequestCommand where
+  fieldDefault = HookRequest'UNSPECIFIED
+instance Control.DeepSeq.NFData HookRequest'HookRequestCommand where
+  rnf x__ = Prelude.seq x__ ()
+{- | Fields :
+      -}
+data HookResponse
+  = HookResponse'_constructor {_HookResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show HookResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message HookResponse where
+  messageName _ = Data.Text.pack "grpc.testing.HookResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\fHookResponse"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _HookResponse'_unknownFields
+        (\ x__ y__ -> x__ {_HookResponse'_unknownFields = y__})
+  defMessage
+    = HookResponse'_constructor {_HookResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          HookResponse -> Data.ProtoLens.Encoding.Bytes.Parser HookResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "HookResponse"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData HookResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq (_HookResponse'_unknownFields x__) ()
+{- | Fields :
+      -}
+data LoadBalancerAccumulatedStatsRequest
+  = LoadBalancerAccumulatedStatsRequest'_constructor {_LoadBalancerAccumulatedStatsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsRequest where
+  messageName _
+    = Data.Text.pack "grpc.testing.LoadBalancerAccumulatedStatsRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \#LoadBalancerAccumulatedStatsRequest"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsRequest'_unknownFields
+        (\ x__ y__
+           -> x__ {_LoadBalancerAccumulatedStatsRequest'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsRequest'_constructor
+        {_LoadBalancerAccumulatedStatsRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsRequest
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage)
+          "LoadBalancerAccumulatedStatsRequest"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsRequest'_unknownFields x__) ()
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.numRpcsStartedByMethod' @:: Lens' LoadBalancerAccumulatedStatsResponse (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Messages_Fields.numRpcsSucceededByMethod' @:: Lens' LoadBalancerAccumulatedStatsResponse (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Messages_Fields.numRpcsFailedByMethod' @:: Lens' LoadBalancerAccumulatedStatsResponse (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Messages_Fields.statsPerMethod' @:: Lens' LoadBalancerAccumulatedStatsResponse (Data.Map.Map Data.Text.Text LoadBalancerAccumulatedStatsResponse'MethodStats)@ -}
+data LoadBalancerAccumulatedStatsResponse
+  = LoadBalancerAccumulatedStatsResponse'_constructor {_LoadBalancerAccumulatedStatsResponse'numRpcsStartedByMethod :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                                       _LoadBalancerAccumulatedStatsResponse'numRpcsSucceededByMethod :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                                       _LoadBalancerAccumulatedStatsResponse'numRpcsFailedByMethod :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                                       _LoadBalancerAccumulatedStatsResponse'statsPerMethod :: !(Data.Map.Map Data.Text.Text LoadBalancerAccumulatedStatsResponse'MethodStats),
+                                                       _LoadBalancerAccumulatedStatsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse "numRpcsStartedByMethod" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'numRpcsStartedByMethod
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'numRpcsStartedByMethod = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse "numRpcsSucceededByMethod" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'numRpcsSucceededByMethod
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'numRpcsSucceededByMethod = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse "numRpcsFailedByMethod" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'numRpcsFailedByMethod
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'numRpcsFailedByMethod = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse "statsPerMethod" (Data.Map.Map Data.Text.Text LoadBalancerAccumulatedStatsResponse'MethodStats) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'statsPerMethod
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'statsPerMethod = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \$LoadBalancerAccumulatedStatsResponse\DC2\142\SOH\n\
+      \\SUBnum_rpcs_started_by_method\CAN\SOH \ETX(\v2N.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsStartedByMethodEntryR\SYNnumRpcsStartedByMethodB\STX\CAN\SOH\DC2\148\SOH\n\
+      \\FSnum_rpcs_succeeded_by_method\CAN\STX \ETX(\v2P.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsSucceededByMethodEntryR\CANnumRpcsSucceededByMethodB\STX\CAN\SOH\DC2\139\SOH\n\
+      \\EMnum_rpcs_failed_by_method\CAN\ETX \ETX(\v2M.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsFailedByMethodEntryR\NAKnumRpcsFailedByMethodB\STX\CAN\SOH\DC2p\n\
+      \\DLEstats_per_method\CAN\EOT \ETX(\v2F.grpc.testing.LoadBalancerAccumulatedStatsResponse.StatsPerMethodEntryR\SOstatsPerMethod\SUBI\n\
+      \\ESCNumRpcsStartedByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUBK\n\
+      \\GSNumRpcsSucceededByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUBH\n\
+      \\SUBNumRpcsFailedByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB\207\SOH\n\
+      \\vMethodStats\DC2!\n\
+      \\frpcs_started\CAN\SOH \SOH(\ENQR\vrpcsStarted\DC2b\n\
+      \\ACKresult\CAN\STX \ETX(\v2J.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats.ResultEntryR\ACKresult\SUB9\n\
+      \\vResultEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\ENQR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB\129\SOH\n\
+      \\DC3StatsPerMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2T\n\
+      \\ENQvalue\CAN\STX \SOH(\v2>.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStatsR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        numRpcsStartedByMethod__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "num_rpcs_started_by_method"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"numRpcsStartedByMethod")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse
+        numRpcsSucceededByMethod__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "num_rpcs_succeeded_by_method"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"numRpcsSucceededByMethod")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse
+        numRpcsFailedByMethod__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "num_rpcs_failed_by_method"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"numRpcsFailedByMethod")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse
+        statsPerMethod__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "stats_per_method"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"statsPerMethod")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, numRpcsStartedByMethod__field_descriptor),
+           (Data.ProtoLens.Tag 2, numRpcsSucceededByMethod__field_descriptor),
+           (Data.ProtoLens.Tag 3, numRpcsFailedByMethod__field_descriptor),
+           (Data.ProtoLens.Tag 4, statsPerMethod__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'numRpcsStartedByMethod = Data.Map.empty,
+         _LoadBalancerAccumulatedStatsResponse'numRpcsSucceededByMethod = Data.Map.empty,
+         _LoadBalancerAccumulatedStatsResponse'numRpcsFailedByMethod = Data.Map.empty,
+         _LoadBalancerAccumulatedStatsResponse'statsPerMethod = Data.Map.empty,
+         _LoadBalancerAccumulatedStatsResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do !(entry :: LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                                  (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                                      Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                                        (Prelude.fromIntegral
+                                                                                                                           len)
+                                                                                                                        Data.ProtoLens.parseMessage)
+                                                                                                                  "num_rpcs_started_by_method"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"numRpcsStartedByMethod")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        18
+                          -> do !(entry :: LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                                    (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                                          (Prelude.fromIntegral
+                                                                                                                             len)
+                                                                                                                          Data.ProtoLens.parseMessage)
+                                                                                                                    "num_rpcs_succeeded_by_method"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"numRpcsSucceededByMethod")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        26
+                          -> do !(entry :: LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                                       (Prelude.fromIntegral
+                                                                                                                          len)
+                                                                                                                       Data.ProtoLens.parseMessage)
+                                                                                                                 "num_rpcs_failed_by_method"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"numRpcsFailedByMethod")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        34
+                          -> do !(entry :: LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                          (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                              Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                                (Prelude.fromIntegral
+                                                                                                                   len)
+                                                                                                                Data.ProtoLens.parseMessage)
+                                                                                                          "stats_per_method"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"statsPerMethod")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage)
+          "LoadBalancerAccumulatedStatsResponse"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (Data.Monoid.mconcat
+                (Prelude.map
+                   (\ _v
+                      -> (Data.Monoid.<>)
+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                           ((Prelude..)
+                              (\ bs
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                              Data.ProtoLens.encodeMessage
+                              (Lens.Family2.set
+                                 (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                 (Lens.Family2.set
+                                    (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                    (Data.ProtoLens.defMessage ::
+                                       LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry)))))
+                   (Data.Map.toList
+                      (Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"numRpcsStartedByMethod") _x))))
+             ((Data.Monoid.<>)
+                (Data.Monoid.mconcat
+                   (Prelude.map
+                      (\ _v
+                         -> (Data.Monoid.<>)
+                              (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                              ((Prelude..)
+                                 (\ bs
+                                    -> (Data.Monoid.<>)
+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                            (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                 Data.ProtoLens.encodeMessage
+                                 (Lens.Family2.set
+                                    (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                    (Lens.Family2.set
+                                       (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                       (Data.ProtoLens.defMessage ::
+                                          LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry)))))
+                      (Data.Map.toList
+                         (Lens.Family2.view
+                            (Data.ProtoLens.Field.field @"numRpcsSucceededByMethod") _x))))
+                ((Data.Monoid.<>)
+                   (Data.Monoid.mconcat
+                      (Prelude.map
+                         (\ _v
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                                 ((Prelude..)
+                                    (\ bs
+                                       -> (Data.Monoid.<>)
+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                    Data.ProtoLens.encodeMessage
+                                    (Lens.Family2.set
+                                       (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                          (Data.ProtoLens.defMessage ::
+                                             LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry)))))
+                         (Data.Map.toList
+                            (Lens.Family2.view
+                               (Data.ProtoLens.Field.field @"numRpcsFailedByMethod") _x))))
+                   ((Data.Monoid.<>)
+                      (Data.Monoid.mconcat
+                         (Prelude.map
+                            (\ _v
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
+                                    ((Prelude..)
+                                       (\ bs
+                                          -> (Data.Monoid.<>)
+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                  (Prelude.fromIntegral
+                                                     (Data.ByteString.length bs)))
+                                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                       Data.ProtoLens.encodeMessage
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                          (Lens.Family2.set
+                                             (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                             (Data.ProtoLens.defMessage ::
+                                                LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry)))))
+                            (Data.Map.toList
+                               (Lens.Family2.view
+                                  (Data.ProtoLens.Field.field @"statsPerMethod") _x))))
+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'numRpcsStartedByMethod x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'numRpcsSucceededByMethod
+                      x__)
+                   (Control.DeepSeq.deepseq
+                      (_LoadBalancerAccumulatedStatsResponse'numRpcsFailedByMethod x__)
+                      (Control.DeepSeq.deepseq
+                         (_LoadBalancerAccumulatedStatsResponse'statsPerMethod x__) ()))))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.rpcsStarted' @:: Lens' LoadBalancerAccumulatedStatsResponse'MethodStats Data.Int.Int32@
+         * 'Proto.Messages_Fields.result' @:: Lens' LoadBalancerAccumulatedStatsResponse'MethodStats (Data.Map.Map Data.Int.Int32 Data.Int.Int32)@ -}
+data LoadBalancerAccumulatedStatsResponse'MethodStats
+  = LoadBalancerAccumulatedStatsResponse'MethodStats'_constructor {_LoadBalancerAccumulatedStatsResponse'MethodStats'rpcsStarted :: !Data.Int.Int32,
+                                                                   _LoadBalancerAccumulatedStatsResponse'MethodStats'result :: !(Data.Map.Map Data.Int.Int32 Data.Int.Int32),
+                                                                   _LoadBalancerAccumulatedStatsResponse'MethodStats'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse'MethodStats where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'MethodStats "rpcsStarted" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'MethodStats'rpcsStarted
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'MethodStats'rpcsStarted = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'MethodStats "result" (Data.Map.Map Data.Int.Int32 Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'MethodStats'result
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'MethodStats'result = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse'MethodStats where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats"
+  packedMessageDescriptor _
+    = "\n\
+      \\vMethodStats\DC2!\n\
+      \\frpcs_started\CAN\SOH \SOH(\ENQR\vrpcsStarted\DC2b\n\
+      \\ACKresult\CAN\STX \ETX(\v2J.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats.ResultEntryR\ACKresult\SUB9\n\
+      \\vResultEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\ENQR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        rpcsStarted__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "rpcs_started"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"rpcsStarted")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'MethodStats
+        result__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "result"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"result")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'MethodStats
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, rpcsStarted__field_descriptor),
+           (Data.ProtoLens.Tag 2, result__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'MethodStats'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'MethodStats'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'MethodStats'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'MethodStats'rpcsStarted = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'MethodStats'result = Data.Map.empty,
+         _LoadBalancerAccumulatedStatsResponse'MethodStats'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse'MethodStats
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse'MethodStats
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "rpcs_started"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rpcsStarted") y x)
+                        18
+                          -> do !(entry :: LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                              (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                                  Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                                    (Prelude.fromIntegral
+                                                                                                                       len)
+                                                                                                                    Data.ProtoLens.parseMessage)
+                                                                                                              "result"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"result")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MethodStats"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view (Data.ProtoLens.Field.field @"rpcsStarted") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (Data.Monoid.mconcat
+                   (Prelude.map
+                      (\ _v
+                         -> (Data.Monoid.<>)
+                              (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                              ((Prelude..)
+                                 (\ bs
+                                    -> (Data.Monoid.<>)
+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                            (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                 Data.ProtoLens.encodeMessage
+                                 (Lens.Family2.set
+                                    (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                    (Lens.Family2.set
+                                       (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                       (Data.ProtoLens.defMessage ::
+                                          LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry)))))
+                      (Data.Map.toList
+                         (Lens.Family2.view (Data.ProtoLens.Field.field @"result") _x))))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse'MethodStats where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'MethodStats'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'MethodStats'rpcsStarted x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'MethodStats'result x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry Data.Int.Int32@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry Data.Int.Int32@ -}
+data LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry
+  = LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_constructor {_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'key :: !Data.Int.Int32,
+                                                                               _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'value :: !Data.Int.Int32,
+                                                                               _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry "key" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats.ResultEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\vResultEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\ENQR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "ResultEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'key
+                   x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'MethodStats'ResultEntry'value
+                      x__)
+                   ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry Data.Int.Int32@ -}
+data LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry
+  = LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_constructor {_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'key :: !Data.Text.Text,
+                                                                                  _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'value :: !Data.Int.Int32,
+                                                                                  _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsFailedByMethodEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\SUBNumRpcsFailedByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "NumRpcsFailedByMethodEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'key
+                   x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'NumRpcsFailedByMethodEntry'value
+                      x__)
+                   ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry Data.Int.Int32@ -}
+data LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry
+  = LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_constructor {_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'key :: !Data.Text.Text,
+                                                                                   _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'value :: !Data.Int.Int32,
+                                                                                   _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsStartedByMethodEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\ESCNumRpcsStartedByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "NumRpcsStartedByMethodEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'key
+                   x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'NumRpcsStartedByMethodEntry'value
+                      x__)
+                   ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry Data.Int.Int32@ -}
+data LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry
+  = LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_constructor {_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'key :: !Data.Text.Text,
+                                                                                     _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'value :: !Data.Int.Int32,
+                                                                                     _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsSucceededByMethodEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\GSNumRpcsSucceededByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "NumRpcsSucceededByMethodEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'key
+                   x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'NumRpcsSucceededByMethodEntry'value
+                      x__)
+                   ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry LoadBalancerAccumulatedStatsResponse'MethodStats@
+         * 'Proto.Messages_Fields.maybe'value' @:: Lens' LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry (Prelude.Maybe LoadBalancerAccumulatedStatsResponse'MethodStats)@ -}
+data LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry
+  = LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_constructor {_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'key :: !Data.Text.Text,
+                                                                           _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value :: !(Prelude.Maybe LoadBalancerAccumulatedStatsResponse'MethodStats),
+                                                                           _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry "value" LoadBalancerAccumulatedStatsResponse'MethodStats where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry "maybe'value" (Prelude.Maybe LoadBalancerAccumulatedStatsResponse'MethodStats) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerAccumulatedStatsResponse.StatsPerMethodEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DC3StatsPerMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2T\n\
+      \\ENQvalue\CAN\STX \SOH(\v2>.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStatsR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerAccumulatedStatsResponse'MethodStats)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_constructor
+        {_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value = Prelude.Nothing,
+         _LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "StatsPerMethodEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerAccumulatedStatsResponse'StatsPerMethodEntry'value
+                      x__)
+                   ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.numRpcs' @:: Lens' LoadBalancerStatsRequest Data.Int.Int32@
+         * 'Proto.Messages_Fields.timeoutSec' @:: Lens' LoadBalancerStatsRequest Data.Int.Int32@
+         * 'Proto.Messages_Fields.metadataKeys' @:: Lens' LoadBalancerStatsRequest [Data.Text.Text]@
+         * 'Proto.Messages_Fields.vec'metadataKeys' @:: Lens' LoadBalancerStatsRequest (Data.Vector.Vector Data.Text.Text)@ -}
+data LoadBalancerStatsRequest
+  = LoadBalancerStatsRequest'_constructor {_LoadBalancerStatsRequest'numRpcs :: !Data.Int.Int32,
+                                           _LoadBalancerStatsRequest'timeoutSec :: !Data.Int.Int32,
+                                           _LoadBalancerStatsRequest'metadataKeys :: !(Data.Vector.Vector Data.Text.Text),
+                                           _LoadBalancerStatsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsRequest "numRpcs" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsRequest'numRpcs
+           (\ x__ y__ -> x__ {_LoadBalancerStatsRequest'numRpcs = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsRequest "timeoutSec" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsRequest'timeoutSec
+           (\ x__ y__ -> x__ {_LoadBalancerStatsRequest'timeoutSec = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsRequest "metadataKeys" [Data.Text.Text] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsRequest'metadataKeys
+           (\ x__ y__ -> x__ {_LoadBalancerStatsRequest'metadataKeys = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsRequest "vec'metadataKeys" (Data.Vector.Vector Data.Text.Text) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsRequest'metadataKeys
+           (\ x__ y__ -> x__ {_LoadBalancerStatsRequest'metadataKeys = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsRequest where
+  messageName _
+    = Data.Text.pack "grpc.testing.LoadBalancerStatsRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\CANLoadBalancerStatsRequest\DC2\EM\n\
+      \\bnum_rpcs\CAN\SOH \SOH(\ENQR\anumRpcs\DC2\US\n\
+      \\vtimeout_sec\CAN\STX \SOH(\ENQR\n\
+      \timeoutSec\DC2#\n\
+      \\rmetadata_keys\CAN\ETX \ETX(\tR\fmetadataKeys"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        numRpcs__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "num_rpcs"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"numRpcs")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsRequest
+        timeoutSec__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "timeout_sec"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"timeoutSec")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsRequest
+        metadataKeys__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "metadata_keys"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"metadataKeys")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, numRpcs__field_descriptor),
+           (Data.ProtoLens.Tag 2, timeoutSec__field_descriptor),
+           (Data.ProtoLens.Tag 3, metadataKeys__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsRequest'_unknownFields
+        (\ x__ y__ -> x__ {_LoadBalancerStatsRequest'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsRequest'_constructor
+        {_LoadBalancerStatsRequest'numRpcs = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsRequest'timeoutSec = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsRequest'metadataKeys = Data.Vector.Generic.empty,
+         _LoadBalancerStatsRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsRequest
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text
+             -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsRequest
+        loop x mutable'metadataKeys
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'metadataKeys <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                               (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                  mutable'metadataKeys)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'metadataKeys")
+                              frozen'metadataKeys x))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "num_rpcs"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"numRpcs") y x)
+                                  mutable'metadataKeys
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "timeout_sec"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"timeoutSec") y x)
+                                  mutable'metadataKeys
+                        26
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.getText
+                                              (Prelude.fromIntegral len))
+                                        "metadata_keys"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'metadataKeys y)
+                                loop x v
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'metadataKeys
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'metadataKeys <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                        Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'metadataKeys)
+          "LoadBalancerStatsRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"numRpcs") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view (Data.ProtoLens.Field.field @"timeoutSec") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                ((Data.Monoid.<>)
+                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                      (\ _v
+                         -> (Data.Monoid.<>)
+                              (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                              ((Prelude..)
+                                 (\ bs
+                                    -> (Data.Monoid.<>)
+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                            (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                 Data.Text.Encoding.encodeUtf8 _v))
+                      (Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"vec'metadataKeys") _x))
+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
+instance Control.DeepSeq.NFData LoadBalancerStatsRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsRequest'numRpcs x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsRequest'timeoutSec x__)
+                   (Control.DeepSeq.deepseq
+                      (_LoadBalancerStatsRequest'metadataKeys x__) ())))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.rpcsByPeer' @:: Lens' LoadBalancerStatsResponse (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Messages_Fields.numFailures' @:: Lens' LoadBalancerStatsResponse Data.Int.Int32@
+         * 'Proto.Messages_Fields.rpcsByMethod' @:: Lens' LoadBalancerStatsResponse (Data.Map.Map Data.Text.Text LoadBalancerStatsResponse'RpcsByPeer)@
+         * 'Proto.Messages_Fields.metadatasByPeer' @:: Lens' LoadBalancerStatsResponse (Data.Map.Map Data.Text.Text LoadBalancerStatsResponse'MetadataByPeer)@ -}
+data LoadBalancerStatsResponse
+  = LoadBalancerStatsResponse'_constructor {_LoadBalancerStatsResponse'rpcsByPeer :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                            _LoadBalancerStatsResponse'numFailures :: !Data.Int.Int32,
+                                            _LoadBalancerStatsResponse'rpcsByMethod :: !(Data.Map.Map Data.Text.Text LoadBalancerStatsResponse'RpcsByPeer),
+                                            _LoadBalancerStatsResponse'metadatasByPeer :: !(Data.Map.Map Data.Text.Text LoadBalancerStatsResponse'MetadataByPeer),
+                                            _LoadBalancerStatsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse "rpcsByPeer" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'rpcsByPeer
+           (\ x__ y__ -> x__ {_LoadBalancerStatsResponse'rpcsByPeer = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse "numFailures" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'numFailures
+           (\ x__ y__ -> x__ {_LoadBalancerStatsResponse'numFailures = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse "rpcsByMethod" (Data.Map.Map Data.Text.Text LoadBalancerStatsResponse'RpcsByPeer) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'rpcsByMethod
+           (\ x__ y__ -> x__ {_LoadBalancerStatsResponse'rpcsByMethod = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse "metadatasByPeer" (Data.Map.Map Data.Text.Text LoadBalancerStatsResponse'MetadataByPeer) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'metadatasByPeer
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'metadatasByPeer = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse where
+  messageName _
+    = Data.Text.pack "grpc.testing.LoadBalancerStatsResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\EMLoadBalancerStatsResponse\DC2Y\n\
+      \\frpcs_by_peer\CAN\SOH \ETX(\v27.grpc.testing.LoadBalancerStatsResponse.RpcsByPeerEntryR\n\
+      \rpcsByPeer\DC2!\n\
+      \\fnum_failures\CAN\STX \SOH(\ENQR\vnumFailures\DC2_\n\
+      \\SOrpcs_by_method\CAN\ETX \ETX(\v29.grpc.testing.LoadBalancerStatsResponse.RpcsByMethodEntryR\frpcsByMethod\DC2h\n\
+      \\DC1metadatas_by_peer\CAN\EOT \ETX(\v2<.grpc.testing.LoadBalancerStatsResponse.MetadatasByPeerEntryR\SImetadatasByPeer\SUB\129\SOH\n\
+      \\rMetadataEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\tR\ENQvalue\DC2H\n\
+      \\EOTtype\CAN\ETX \SOH(\SO24.grpc.testing.LoadBalancerStatsResponse.MetadataTypeR\EOTtype\SUB`\n\
+      \\vRpcMetadata\DC2Q\n\
+      \\bmetadata\CAN\SOH \ETX(\v25.grpc.testing.LoadBalancerStatsResponse.MetadataEntryR\bmetadata\SUBh\n\
+      \\SOMetadataByPeer\DC2V\n\
+      \\frpc_metadata\CAN\SOH \ETX(\v23.grpc.testing.LoadBalancerStatsResponse.RpcMetadataR\vrpcMetadata\SUB\177\SOH\n\
+      \\n\
+      \RpcsByPeer\DC2d\n\
+      \\frpcs_by_peer\CAN\SOH \ETX(\v2B.grpc.testing.LoadBalancerStatsResponse.RpcsByPeer.RpcsByPeerEntryR\n\
+      \rpcsByPeer\SUB=\n\
+      \\SIRpcsByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB=\n\
+      \\SIRpcsByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUBs\n\
+      \\DC1RpcsByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2H\n\
+      \\ENQvalue\CAN\STX \SOH(\v22.grpc.testing.LoadBalancerStatsResponse.RpcsByPeerR\ENQvalue:\STX8\SOH\SUBz\n\
+      \\DC4MetadatasByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2L\n\
+      \\ENQvalue\CAN\STX \SOH(\v26.grpc.testing.LoadBalancerStatsResponse.MetadataByPeerR\ENQvalue:\STX8\SOH\"6\n\
+      \\fMetadataType\DC2\v\n\
+      \\aUNKNOWN\DLE\NUL\DC2\v\n\
+      \\aINITIAL\DLE\SOH\DC2\f\n\
+      \\bTRAILING\DLE\STX"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        rpcsByPeer__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "rpcs_by_peer"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'RpcsByPeerEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"rpcsByPeer")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse
+        numFailures__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "num_failures"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"numFailures")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse
+        rpcsByMethod__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "rpcs_by_method"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'RpcsByMethodEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"rpcsByMethod")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse
+        metadatasByPeer__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "metadatas_by_peer"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'MetadatasByPeerEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"metadatasByPeer")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, rpcsByPeer__field_descriptor),
+           (Data.ProtoLens.Tag 2, numFailures__field_descriptor),
+           (Data.ProtoLens.Tag 3, rpcsByMethod__field_descriptor),
+           (Data.ProtoLens.Tag 4, metadatasByPeer__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'_unknownFields
+        (\ x__ y__
+           -> x__ {_LoadBalancerStatsResponse'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'_constructor
+        {_LoadBalancerStatsResponse'rpcsByPeer = Data.Map.empty,
+         _LoadBalancerStatsResponse'numFailures = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'rpcsByMethod = Data.Map.empty,
+         _LoadBalancerStatsResponse'metadatasByPeer = Data.Map.empty,
+         _LoadBalancerStatsResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do !(entry :: LoadBalancerStatsResponse'RpcsByPeerEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                           (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                               Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                 (Prelude.fromIntegral
+                                                                                                    len)
+                                                                                                 Data.ProtoLens.parseMessage)
+                                                                                           "rpcs_by_peer"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"rpcsByPeer")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "num_failures"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"numFailures") y x)
+                        26
+                          -> do !(entry :: LoadBalancerStatsResponse'RpcsByMethodEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                             (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                 Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                   (Prelude.fromIntegral
+                                                                                                      len)
+                                                                                                   Data.ProtoLens.parseMessage)
+                                                                                             "rpcs_by_method"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"rpcsByMethod")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        34
+                          -> do !(entry :: LoadBalancerStatsResponse'MetadatasByPeerEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                    Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                      (Prelude.fromIntegral
+                                                                                                         len)
+                                                                                                      Data.ProtoLens.parseMessage)
+                                                                                                "metadatas_by_peer"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"metadatasByPeer")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "LoadBalancerStatsResponse"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (Data.Monoid.mconcat
+                (Prelude.map
+                   (\ _v
+                      -> (Data.Monoid.<>)
+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                           ((Prelude..)
+                              (\ bs
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                              Data.ProtoLens.encodeMessage
+                              (Lens.Family2.set
+                                 (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                 (Lens.Family2.set
+                                    (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                    (Data.ProtoLens.defMessage ::
+                                       LoadBalancerStatsResponse'RpcsByPeerEntry)))))
+                   (Data.Map.toList
+                      (Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"rpcsByPeer") _x))))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view (Data.ProtoLens.Field.field @"numFailures") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                ((Data.Monoid.<>)
+                   (Data.Monoid.mconcat
+                      (Prelude.map
+                         (\ _v
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                                 ((Prelude..)
+                                    (\ bs
+                                       -> (Data.Monoid.<>)
+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                    Data.ProtoLens.encodeMessage
+                                    (Lens.Family2.set
+                                       (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                          (Data.ProtoLens.defMessage ::
+                                             LoadBalancerStatsResponse'RpcsByMethodEntry)))))
+                         (Data.Map.toList
+                            (Lens.Family2.view
+                               (Data.ProtoLens.Field.field @"rpcsByMethod") _x))))
+                   ((Data.Monoid.<>)
+                      (Data.Monoid.mconcat
+                         (Prelude.map
+                            (\ _v
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
+                                    ((Prelude..)
+                                       (\ bs
+                                          -> (Data.Monoid.<>)
+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                  (Prelude.fromIntegral
+                                                     (Data.ByteString.length bs)))
+                                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                       Data.ProtoLens.encodeMessage
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                          (Lens.Family2.set
+                                             (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                             (Data.ProtoLens.defMessage ::
+                                                LoadBalancerStatsResponse'MetadatasByPeerEntry)))))
+                            (Data.Map.toList
+                               (Lens.Family2.view
+                                  (Data.ProtoLens.Field.field @"metadatasByPeer") _x))))
+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'rpcsByPeer x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsResponse'numFailures x__)
+                   (Control.DeepSeq.deepseq
+                      (_LoadBalancerStatsResponse'rpcsByMethod x__)
+                      (Control.DeepSeq.deepseq
+                         (_LoadBalancerStatsResponse'metadatasByPeer x__) ()))))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.rpcMetadata' @:: Lens' LoadBalancerStatsResponse'MetadataByPeer [LoadBalancerStatsResponse'RpcMetadata]@
+         * 'Proto.Messages_Fields.vec'rpcMetadata' @:: Lens' LoadBalancerStatsResponse'MetadataByPeer (Data.Vector.Vector LoadBalancerStatsResponse'RpcMetadata)@ -}
+data LoadBalancerStatsResponse'MetadataByPeer
+  = LoadBalancerStatsResponse'MetadataByPeer'_constructor {_LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata :: !(Data.Vector.Vector LoadBalancerStatsResponse'RpcMetadata),
+                                                           _LoadBalancerStatsResponse'MetadataByPeer'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'MetadataByPeer where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadataByPeer "rpcMetadata" [LoadBalancerStatsResponse'RpcMetadata] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadataByPeer "vec'rpcMetadata" (Data.Vector.Vector LoadBalancerStatsResponse'RpcMetadata) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'MetadataByPeer where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.MetadataByPeer"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOMetadataByPeer\DC2V\n\
+      \\frpc_metadata\CAN\SOH \ETX(\v23.grpc.testing.LoadBalancerStatsResponse.RpcMetadataR\vrpcMetadata"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        rpcMetadata__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "rpc_metadata"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'RpcMetadata)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"rpcMetadata")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'MetadataByPeer
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, rpcMetadata__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'MetadataByPeer'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'MetadataByPeer'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'MetadataByPeer'_constructor
+        {_LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata = Data.Vector.Generic.empty,
+         _LoadBalancerStatsResponse'MetadataByPeer'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'MetadataByPeer
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld LoadBalancerStatsResponse'RpcMetadata
+             -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'MetadataByPeer
+        loop x mutable'rpcMetadata
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'rpcMetadata <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                              (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                 mutable'rpcMetadata)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'rpcMetadata") frozen'rpcMetadata
+                              x))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "rpc_metadata"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'rpcMetadata y)
+                                loop x v
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'rpcMetadata
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'rpcMetadata <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'rpcMetadata)
+          "MetadataByPeer"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                (\ _v
+                   -> (Data.Monoid.<>)
+                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                        ((Prelude..)
+                           (\ bs
+                              -> (Data.Monoid.<>)
+                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                           Data.ProtoLens.encodeMessage _v))
+                (Lens.Family2.view
+                   (Data.ProtoLens.Field.field @"vec'rpcMetadata") _x))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'MetadataByPeer where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'MetadataByPeer'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'MetadataByPeer'rpcMetadata x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerStatsResponse'MetadataEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerStatsResponse'MetadataEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.type'' @:: Lens' LoadBalancerStatsResponse'MetadataEntry LoadBalancerStatsResponse'MetadataType@ -}
+data LoadBalancerStatsResponse'MetadataEntry
+  = LoadBalancerStatsResponse'MetadataEntry'_constructor {_LoadBalancerStatsResponse'MetadataEntry'key :: !Data.Text.Text,
+                                                          _LoadBalancerStatsResponse'MetadataEntry'value :: !Data.Text.Text,
+                                                          _LoadBalancerStatsResponse'MetadataEntry'type' :: !LoadBalancerStatsResponse'MetadataType,
+                                                          _LoadBalancerStatsResponse'MetadataEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'MetadataEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadataEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadataEntry'key
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'MetadataEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadataEntry "value" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadataEntry'value
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'MetadataEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadataEntry "type'" LoadBalancerStatsResponse'MetadataType where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadataEntry'type'
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'MetadataEntry'type' = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'MetadataEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.MetadataEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\rMetadataEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\tR\ENQvalue\DC2H\n\
+      \\EOTtype\CAN\ETX \SOH(\SO24.grpc.testing.LoadBalancerStatsResponse.MetadataTypeR\EOTtype"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'MetadataEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'MetadataEntry
+        type'__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'MetadataType)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"type'")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'MetadataEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor),
+           (Data.ProtoLens.Tag 3, type'__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'MetadataEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'MetadataEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'MetadataEntry'_constructor
+        {_LoadBalancerStatsResponse'MetadataEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'MetadataEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'MetadataEntry'type' = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'MetadataEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'MetadataEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'MetadataEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        24
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "type"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"type'") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MetadataEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                ((Data.Monoid.<>)
+                   (let
+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"type'") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
+                            ((Prelude..)
+                               ((Prelude..)
+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                               Prelude.fromEnum _v))
+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'MetadataEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'MetadataEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'MetadataEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsResponse'MetadataEntry'value x__)
+                   (Control.DeepSeq.deepseq
+                      (_LoadBalancerStatsResponse'MetadataEntry'type' x__) ())))
+newtype LoadBalancerStatsResponse'MetadataType'UnrecognizedValue
+  = LoadBalancerStatsResponse'MetadataType'UnrecognizedValue Data.Int.Int32
+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)
+data LoadBalancerStatsResponse'MetadataType
+  = LoadBalancerStatsResponse'UNKNOWN |
+    LoadBalancerStatsResponse'INITIAL |
+    LoadBalancerStatsResponse'TRAILING |
+    LoadBalancerStatsResponse'MetadataType'Unrecognized !LoadBalancerStatsResponse'MetadataType'UnrecognizedValue
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.MessageEnum LoadBalancerStatsResponse'MetadataType where
+  maybeToEnum 0 = Prelude.Just LoadBalancerStatsResponse'UNKNOWN
+  maybeToEnum 1 = Prelude.Just LoadBalancerStatsResponse'INITIAL
+  maybeToEnum 2 = Prelude.Just LoadBalancerStatsResponse'TRAILING
+  maybeToEnum k
+    = Prelude.Just
+        (LoadBalancerStatsResponse'MetadataType'Unrecognized
+           (LoadBalancerStatsResponse'MetadataType'UnrecognizedValue
+              (Prelude.fromIntegral k)))
+  showEnum LoadBalancerStatsResponse'UNKNOWN = "UNKNOWN"
+  showEnum LoadBalancerStatsResponse'INITIAL = "INITIAL"
+  showEnum LoadBalancerStatsResponse'TRAILING = "TRAILING"
+  showEnum
+    (LoadBalancerStatsResponse'MetadataType'Unrecognized (LoadBalancerStatsResponse'MetadataType'UnrecognizedValue k))
+    = Prelude.show k
+  readEnum k
+    | (Prelude.==) k "UNKNOWN"
+    = Prelude.Just LoadBalancerStatsResponse'UNKNOWN
+    | (Prelude.==) k "INITIAL"
+    = Prelude.Just LoadBalancerStatsResponse'INITIAL
+    | (Prelude.==) k "TRAILING"
+    = Prelude.Just LoadBalancerStatsResponse'TRAILING
+    | Prelude.otherwise
+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
+instance Prelude.Bounded LoadBalancerStatsResponse'MetadataType where
+  minBound = LoadBalancerStatsResponse'UNKNOWN
+  maxBound = LoadBalancerStatsResponse'TRAILING
+instance Prelude.Enum LoadBalancerStatsResponse'MetadataType where
+  toEnum k__
+    = Prelude.maybe
+        (Prelude.error
+           ((Prelude.++)
+              "toEnum: unknown value for enum MetadataType: "
+              (Prelude.show k__)))
+        Prelude.id (Data.ProtoLens.maybeToEnum k__)
+  fromEnum LoadBalancerStatsResponse'UNKNOWN = 0
+  fromEnum LoadBalancerStatsResponse'INITIAL = 1
+  fromEnum LoadBalancerStatsResponse'TRAILING = 2
+  fromEnum
+    (LoadBalancerStatsResponse'MetadataType'Unrecognized (LoadBalancerStatsResponse'MetadataType'UnrecognizedValue k))
+    = Prelude.fromIntegral k
+  succ LoadBalancerStatsResponse'TRAILING
+    = Prelude.error
+        "LoadBalancerStatsResponse'MetadataType.succ: bad argument LoadBalancerStatsResponse'TRAILING. This value would be out of bounds."
+  succ LoadBalancerStatsResponse'UNKNOWN
+    = LoadBalancerStatsResponse'INITIAL
+  succ LoadBalancerStatsResponse'INITIAL
+    = LoadBalancerStatsResponse'TRAILING
+  succ (LoadBalancerStatsResponse'MetadataType'Unrecognized _)
+    = Prelude.error
+        "LoadBalancerStatsResponse'MetadataType.succ: bad argument: unrecognized value"
+  pred LoadBalancerStatsResponse'UNKNOWN
+    = Prelude.error
+        "LoadBalancerStatsResponse'MetadataType.pred: bad argument LoadBalancerStatsResponse'UNKNOWN. This value would be out of bounds."
+  pred LoadBalancerStatsResponse'INITIAL
+    = LoadBalancerStatsResponse'UNKNOWN
+  pred LoadBalancerStatsResponse'TRAILING
+    = LoadBalancerStatsResponse'INITIAL
+  pred (LoadBalancerStatsResponse'MetadataType'Unrecognized _)
+    = Prelude.error
+        "LoadBalancerStatsResponse'MetadataType.pred: bad argument: unrecognized value"
+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
+instance Data.ProtoLens.FieldDefault LoadBalancerStatsResponse'MetadataType where
+  fieldDefault = LoadBalancerStatsResponse'UNKNOWN
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'MetadataType where
+  rnf x__ = Prelude.seq x__ ()
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerStatsResponse'MetadatasByPeerEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerStatsResponse'MetadatasByPeerEntry LoadBalancerStatsResponse'MetadataByPeer@
+         * 'Proto.Messages_Fields.maybe'value' @:: Lens' LoadBalancerStatsResponse'MetadatasByPeerEntry (Prelude.Maybe LoadBalancerStatsResponse'MetadataByPeer)@ -}
+data LoadBalancerStatsResponse'MetadatasByPeerEntry
+  = LoadBalancerStatsResponse'MetadatasByPeerEntry'_constructor {_LoadBalancerStatsResponse'MetadatasByPeerEntry'key :: !Data.Text.Text,
+                                                                 _LoadBalancerStatsResponse'MetadatasByPeerEntry'value :: !(Prelude.Maybe LoadBalancerStatsResponse'MetadataByPeer),
+                                                                 _LoadBalancerStatsResponse'MetadatasByPeerEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'MetadatasByPeerEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadatasByPeerEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadatasByPeerEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'MetadatasByPeerEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadatasByPeerEntry "value" LoadBalancerStatsResponse'MetadataByPeer where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadatasByPeerEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'MetadatasByPeerEntry'value = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'MetadatasByPeerEntry "maybe'value" (Prelude.Maybe LoadBalancerStatsResponse'MetadataByPeer) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'MetadatasByPeerEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'MetadatasByPeerEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'MetadatasByPeerEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.MetadatasByPeerEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DC4MetadatasByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2L\n\
+      \\ENQvalue\CAN\STX \SOH(\v26.grpc.testing.LoadBalancerStatsResponse.MetadataByPeerR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'MetadatasByPeerEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'MetadataByPeer)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'MetadatasByPeerEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'MetadatasByPeerEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'MetadatasByPeerEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'MetadatasByPeerEntry'_constructor
+        {_LoadBalancerStatsResponse'MetadatasByPeerEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'MetadatasByPeerEntry'value = Prelude.Nothing,
+         _LoadBalancerStatsResponse'MetadatasByPeerEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'MetadatasByPeerEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'MetadatasByPeerEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MetadatasByPeerEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'MetadatasByPeerEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'MetadatasByPeerEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'MetadatasByPeerEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsResponse'MetadatasByPeerEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.metadata' @:: Lens' LoadBalancerStatsResponse'RpcMetadata [LoadBalancerStatsResponse'MetadataEntry]@
+         * 'Proto.Messages_Fields.vec'metadata' @:: Lens' LoadBalancerStatsResponse'RpcMetadata (Data.Vector.Vector LoadBalancerStatsResponse'MetadataEntry)@ -}
+data LoadBalancerStatsResponse'RpcMetadata
+  = LoadBalancerStatsResponse'RpcMetadata'_constructor {_LoadBalancerStatsResponse'RpcMetadata'metadata :: !(Data.Vector.Vector LoadBalancerStatsResponse'MetadataEntry),
+                                                        _LoadBalancerStatsResponse'RpcMetadata'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'RpcMetadata where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcMetadata "metadata" [LoadBalancerStatsResponse'MetadataEntry] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcMetadata'metadata
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcMetadata'metadata = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcMetadata "vec'metadata" (Data.Vector.Vector LoadBalancerStatsResponse'MetadataEntry) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcMetadata'metadata
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcMetadata'metadata = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'RpcMetadata where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.RpcMetadata"
+  packedMessageDescriptor _
+    = "\n\
+      \\vRpcMetadata\DC2Q\n\
+      \\bmetadata\CAN\SOH \ETX(\v25.grpc.testing.LoadBalancerStatsResponse.MetadataEntryR\bmetadata"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        metadata__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "metadata"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'MetadataEntry)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"metadata")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcMetadata
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, metadata__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'RpcMetadata'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'RpcMetadata'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'RpcMetadata'_constructor
+        {_LoadBalancerStatsResponse'RpcMetadata'metadata = Data.Vector.Generic.empty,
+         _LoadBalancerStatsResponse'RpcMetadata'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'RpcMetadata
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld LoadBalancerStatsResponse'MetadataEntry
+             -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'RpcMetadata
+        loop x mutable'metadata
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'metadata <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                           (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                              mutable'metadata)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'metadata") frozen'metadata x))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "metadata"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append mutable'metadata y)
+                                loop x v
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'metadata
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'metadata <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                    Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'metadata)
+          "RpcMetadata"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                (\ _v
+                   -> (Data.Monoid.<>)
+                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                        ((Prelude..)
+                           (\ bs
+                              -> (Data.Monoid.<>)
+                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                           Data.ProtoLens.encodeMessage _v))
+                (Lens.Family2.view
+                   (Data.ProtoLens.Field.field @"vec'metadata") _x))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'RpcMetadata where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'RpcMetadata'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'RpcMetadata'metadata x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerStatsResponse'RpcsByMethodEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerStatsResponse'RpcsByMethodEntry LoadBalancerStatsResponse'RpcsByPeer@
+         * 'Proto.Messages_Fields.maybe'value' @:: Lens' LoadBalancerStatsResponse'RpcsByMethodEntry (Prelude.Maybe LoadBalancerStatsResponse'RpcsByPeer)@ -}
+data LoadBalancerStatsResponse'RpcsByMethodEntry
+  = LoadBalancerStatsResponse'RpcsByMethodEntry'_constructor {_LoadBalancerStatsResponse'RpcsByMethodEntry'key :: !Data.Text.Text,
+                                                              _LoadBalancerStatsResponse'RpcsByMethodEntry'value :: !(Prelude.Maybe LoadBalancerStatsResponse'RpcsByPeer),
+                                                              _LoadBalancerStatsResponse'RpcsByMethodEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'RpcsByMethodEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByMethodEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByMethodEntry'key
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcsByMethodEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByMethodEntry "value" LoadBalancerStatsResponse'RpcsByPeer where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByMethodEntry'value
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcsByMethodEntry'value = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByMethodEntry "maybe'value" (Prelude.Maybe LoadBalancerStatsResponse'RpcsByPeer) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByMethodEntry'value
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcsByMethodEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'RpcsByMethodEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.RpcsByMethodEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DC1RpcsByMethodEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2H\n\
+      \\ENQvalue\CAN\STX \SOH(\v22.grpc.testing.LoadBalancerStatsResponse.RpcsByPeerR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByMethodEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'RpcsByPeer)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByMethodEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'RpcsByMethodEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'RpcsByMethodEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'RpcsByMethodEntry'_constructor
+        {_LoadBalancerStatsResponse'RpcsByMethodEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'RpcsByMethodEntry'value = Prelude.Nothing,
+         _LoadBalancerStatsResponse'RpcsByMethodEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'RpcsByMethodEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'RpcsByMethodEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RpcsByMethodEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'RpcsByMethodEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'RpcsByMethodEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'RpcsByMethodEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsResponse'RpcsByMethodEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.rpcsByPeer' @:: Lens' LoadBalancerStatsResponse'RpcsByPeer (Data.Map.Map Data.Text.Text Data.Int.Int32)@ -}
+data LoadBalancerStatsResponse'RpcsByPeer
+  = LoadBalancerStatsResponse'RpcsByPeer'_constructor {_LoadBalancerStatsResponse'RpcsByPeer'rpcsByPeer :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                                       _LoadBalancerStatsResponse'RpcsByPeer'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'RpcsByPeer where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByPeer "rpcsByPeer" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByPeer'rpcsByPeer
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcsByPeer'rpcsByPeer = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'RpcsByPeer where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.RpcsByPeer"
+  packedMessageDescriptor _
+    = "\n\
+      \\n\
+      \RpcsByPeer\DC2d\n\
+      \\frpcs_by_peer\CAN\SOH \ETX(\v2B.grpc.testing.LoadBalancerStatsResponse.RpcsByPeer.RpcsByPeerEntryR\n\
+      \rpcsByPeer\SUB=\n\
+      \\SIRpcsByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        rpcsByPeer__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "rpcs_by_peer"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"rpcsByPeer")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByPeer
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, rpcsByPeer__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'RpcsByPeer'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'RpcsByPeer'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'RpcsByPeer'_constructor
+        {_LoadBalancerStatsResponse'RpcsByPeer'rpcsByPeer = Data.Map.empty,
+         _LoadBalancerStatsResponse'RpcsByPeer'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'RpcsByPeer
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'RpcsByPeer
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do !(entry :: LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                                      (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                                          Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                                            (Prelude.fromIntegral
+                                                                                                               len)
+                                                                                                            Data.ProtoLens.parseMessage)
+                                                                                                      "rpcs_by_peer"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"rpcsByPeer")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RpcsByPeer"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (Data.Monoid.mconcat
+                (Prelude.map
+                   (\ _v
+                      -> (Data.Monoid.<>)
+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                           ((Prelude..)
+                              (\ bs
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                              Data.ProtoLens.encodeMessage
+                              (Lens.Family2.set
+                                 (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                 (Lens.Family2.set
+                                    (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                    (Data.ProtoLens.defMessage ::
+                                       LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry)))))
+                   (Data.Map.toList
+                      (Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"rpcsByPeer") _x))))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'RpcsByPeer where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'RpcsByPeer'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'RpcsByPeer'rpcsByPeer x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry Data.Int.Int32@ -}
+data LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry
+  = LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_constructor {_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'key :: !Data.Text.Text,
+                                                                       _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'value :: !Data.Int.Int32,
+                                                                       _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'key
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'value
+           (\ x__ y__
+              -> x__
+                   {_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.RpcsByPeer.RpcsByPeerEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\SIRpcsByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_constructor
+        {_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RpcsByPeerEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'_unknownFields
+                x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsResponse'RpcsByPeer'RpcsByPeerEntry'value x__)
+                   ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' LoadBalancerStatsResponse'RpcsByPeerEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' LoadBalancerStatsResponse'RpcsByPeerEntry Data.Int.Int32@ -}
+data LoadBalancerStatsResponse'RpcsByPeerEntry
+  = LoadBalancerStatsResponse'RpcsByPeerEntry'_constructor {_LoadBalancerStatsResponse'RpcsByPeerEntry'key :: !Data.Text.Text,
+                                                            _LoadBalancerStatsResponse'RpcsByPeerEntry'value :: !Data.Int.Int32,
+                                                            _LoadBalancerStatsResponse'RpcsByPeerEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show LoadBalancerStatsResponse'RpcsByPeerEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByPeerEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByPeerEntry'key
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcsByPeerEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField LoadBalancerStatsResponse'RpcsByPeerEntry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _LoadBalancerStatsResponse'RpcsByPeerEntry'value
+           (\ x__ y__
+              -> x__ {_LoadBalancerStatsResponse'RpcsByPeerEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message LoadBalancerStatsResponse'RpcsByPeerEntry where
+  messageName _
+    = Data.Text.pack
+        "grpc.testing.LoadBalancerStatsResponse.RpcsByPeerEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\SIRpcsByPeerEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByPeerEntry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor LoadBalancerStatsResponse'RpcsByPeerEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _LoadBalancerStatsResponse'RpcsByPeerEntry'_unknownFields
+        (\ x__ y__
+           -> x__
+                {_LoadBalancerStatsResponse'RpcsByPeerEntry'_unknownFields = y__})
+  defMessage
+    = LoadBalancerStatsResponse'RpcsByPeerEntry'_constructor
+        {_LoadBalancerStatsResponse'RpcsByPeerEntry'key = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'RpcsByPeerEntry'value = Data.ProtoLens.fieldDefault,
+         _LoadBalancerStatsResponse'RpcsByPeerEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          LoadBalancerStatsResponse'RpcsByPeerEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser LoadBalancerStatsResponse'RpcsByPeerEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RpcsByPeerEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData LoadBalancerStatsResponse'RpcsByPeerEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_LoadBalancerStatsResponse'RpcsByPeerEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_LoadBalancerStatsResponse'RpcsByPeerEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_LoadBalancerStatsResponse'RpcsByPeerEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.rss' @:: Lens' MemorySize Data.Int.Int64@ -}
+data MemorySize
+  = MemorySize'_constructor {_MemorySize'rss :: !Data.Int.Int64,
+                             _MemorySize'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show MemorySize where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField MemorySize "rss" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _MemorySize'rss (\ x__ y__ -> x__ {_MemorySize'rss = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message MemorySize where
+  messageName _ = Data.Text.pack "grpc.testing.MemorySize"
+  packedMessageDescriptor _
+    = "\n\
+      \\n\
+      \MemorySize\DC2\DLE\n\
+      \\ETXrss\CAN\SOH \SOH(\ETXR\ETXrss"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        rss__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "rss"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"rss")) ::
+              Data.ProtoLens.FieldDescriptor MemorySize
+      in
+        Data.Map.fromList [(Data.ProtoLens.Tag 1, rss__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _MemorySize'_unknownFields
+        (\ x__ y__ -> x__ {_MemorySize'_unknownFields = y__})
+  defMessage
+    = MemorySize'_constructor
+        {_MemorySize'rss = Data.ProtoLens.fieldDefault,
+         _MemorySize'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          MemorySize -> Data.ProtoLens.Encoding.Bytes.Parser MemorySize
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "rss"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"rss") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MemorySize"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rss") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData MemorySize where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_MemorySize'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_MemorySize'rss x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.type'' @:: Lens' Payload PayloadType@
+         * 'Proto.Messages_Fields.body' @:: Lens' Payload Data.ByteString.ByteString@ -}
+data Payload
+  = Payload'_constructor {_Payload'type' :: !PayloadType,
+                          _Payload'body :: !Data.ByteString.ByteString,
+                          _Payload'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show Payload where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField Payload "type'" PayloadType where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Payload'type' (\ x__ y__ -> x__ {_Payload'type' = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField Payload "body" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Payload'body (\ x__ y__ -> x__ {_Payload'body = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message Payload where
+  messageName _ = Data.Text.pack "grpc.testing.Payload"
+  packedMessageDescriptor _
+    = "\n\
+      \\aPayload\DC2-\n\
+      \\EOTtype\CAN\SOH \SOH(\SO2\EM.grpc.testing.PayloadTypeR\EOTtype\DC2\DC2\n\
+      \\EOTbody\CAN\STX \SOH(\fR\EOTbody"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        type'__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor PayloadType)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"type'")) ::
+              Data.ProtoLens.FieldDescriptor Payload
+        body__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "body"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"body")) ::
+              Data.ProtoLens.FieldDescriptor Payload
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, type'__field_descriptor),
+           (Data.ProtoLens.Tag 2, body__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _Payload'_unknownFields
+        (\ x__ y__ -> x__ {_Payload'_unknownFields = y__})
+  defMessage
+    = Payload'_constructor
+        {_Payload'type' = Data.ProtoLens.fieldDefault,
+         _Payload'body = Data.ProtoLens.fieldDefault,
+         _Payload'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: Payload -> Data.ProtoLens.Encoding.Bytes.Parser Payload
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "type"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"type'") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "body"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"body") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Payload"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"type'") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                         Prelude.fromEnum _v))
+             ((Data.Monoid.<>)
+                (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"body") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData Payload where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_Payload'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_Payload'type' x__)
+                (Control.DeepSeq.deepseq (_Payload'body x__) ()))
+newtype PayloadType'UnrecognizedValue
+  = PayloadType'UnrecognizedValue Data.Int.Int32
+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)
+data PayloadType
+  = COMPRESSABLE |
+    PayloadType'Unrecognized !PayloadType'UnrecognizedValue
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.MessageEnum PayloadType where
+  maybeToEnum 0 = Prelude.Just COMPRESSABLE
+  maybeToEnum k
+    = Prelude.Just
+        (PayloadType'Unrecognized
+           (PayloadType'UnrecognizedValue (Prelude.fromIntegral k)))
+  showEnum COMPRESSABLE = "COMPRESSABLE"
+  showEnum
+    (PayloadType'Unrecognized (PayloadType'UnrecognizedValue k))
+    = Prelude.show k
+  readEnum k
+    | (Prelude.==) k "COMPRESSABLE" = Prelude.Just COMPRESSABLE
+    | Prelude.otherwise
+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
+instance Prelude.Bounded PayloadType where
+  minBound = COMPRESSABLE
+  maxBound = COMPRESSABLE
+instance Prelude.Enum PayloadType where
+  toEnum k__
+    = Prelude.maybe
+        (Prelude.error
+           ((Prelude.++)
+              "toEnum: unknown value for enum PayloadType: " (Prelude.show k__)))
+        Prelude.id (Data.ProtoLens.maybeToEnum k__)
+  fromEnum COMPRESSABLE = 0
+  fromEnum
+    (PayloadType'Unrecognized (PayloadType'UnrecognizedValue k))
+    = Prelude.fromIntegral k
+  succ COMPRESSABLE
+    = Prelude.error
+        "PayloadType.succ: bad argument COMPRESSABLE. This value would be out of bounds."
+  succ (PayloadType'Unrecognized _)
+    = Prelude.error
+        "PayloadType.succ: bad argument: unrecognized value"
+  pred COMPRESSABLE
+    = Prelude.error
+        "PayloadType.pred: bad argument COMPRESSABLE. This value would be out of bounds."
+  pred (PayloadType'Unrecognized _)
+    = Prelude.error
+        "PayloadType.pred: bad argument: unrecognized value"
+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
+instance Data.ProtoLens.FieldDefault PayloadType where
+  fieldDefault = COMPRESSABLE
+instance Control.DeepSeq.NFData PayloadType where
+  rnf x__ = Prelude.seq x__ ()
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.passed' @:: Lens' ReconnectInfo Prelude.Bool@
+         * 'Proto.Messages_Fields.backoffMs' @:: Lens' ReconnectInfo [Data.Int.Int32]@
+         * 'Proto.Messages_Fields.vec'backoffMs' @:: Lens' ReconnectInfo (Data.Vector.Unboxed.Vector Data.Int.Int32)@ -}
+data ReconnectInfo
+  = ReconnectInfo'_constructor {_ReconnectInfo'passed :: !Prelude.Bool,
+                                _ReconnectInfo'backoffMs :: !(Data.Vector.Unboxed.Vector Data.Int.Int32),
+                                _ReconnectInfo'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ReconnectInfo where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ReconnectInfo "passed" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ReconnectInfo'passed
+           (\ x__ y__ -> x__ {_ReconnectInfo'passed = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ReconnectInfo "backoffMs" [Data.Int.Int32] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ReconnectInfo'backoffMs
+           (\ x__ y__ -> x__ {_ReconnectInfo'backoffMs = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ReconnectInfo "vec'backoffMs" (Data.Vector.Unboxed.Vector Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ReconnectInfo'backoffMs
+           (\ x__ y__ -> x__ {_ReconnectInfo'backoffMs = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ReconnectInfo where
+  messageName _ = Data.Text.pack "grpc.testing.ReconnectInfo"
+  packedMessageDescriptor _
+    = "\n\
+      \\rReconnectInfo\DC2\SYN\n\
+      \\ACKpassed\CAN\SOH \SOH(\bR\ACKpassed\DC2\GS\n\
+      \\n\
+      \backoff_ms\CAN\STX \ETX(\ENQR\tbackoffMs"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        passed__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "passed"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"passed")) ::
+              Data.ProtoLens.FieldDescriptor ReconnectInfo
+        backoffMs__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "backoff_ms"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed (Data.ProtoLens.Field.field @"backoffMs")) ::
+              Data.ProtoLens.FieldDescriptor ReconnectInfo
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, passed__field_descriptor),
+           (Data.ProtoLens.Tag 2, backoffMs__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ReconnectInfo'_unknownFields
+        (\ x__ y__ -> x__ {_ReconnectInfo'_unknownFields = y__})
+  defMessage
+    = ReconnectInfo'_constructor
+        {_ReconnectInfo'passed = Data.ProtoLens.fieldDefault,
+         _ReconnectInfo'backoffMs = Data.Vector.Generic.empty,
+         _ReconnectInfo'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ReconnectInfo
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int32
+             -> Data.ProtoLens.Encoding.Bytes.Parser ReconnectInfo
+        loop x mutable'backoffMs
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'backoffMs <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                               mutable'backoffMs)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'backoffMs") frozen'backoffMs x))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "passed"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"passed") y x)
+                                  mutable'backoffMs
+                        16
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.fromIntegral
+                                           Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                        "backoff_ms"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append mutable'backoffMs y)
+                                loop x v
+                        18
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.fromIntegral
+                                                                       Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                                                    "backoff_ms"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'backoffMs)
+                                loop x y
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'backoffMs
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'backoffMs <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                     Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'backoffMs)
+          "ReconnectInfo"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"passed") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
+                         _v))
+             ((Data.Monoid.<>)
+                (let
+                   p = Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"vec'backoffMs") _x
+                 in
+                   if Data.Vector.Generic.null p then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            (Data.ProtoLens.Encoding.Bytes.runBuilder
+                               (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                  ((Prelude..)
+                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                                  p))))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ReconnectInfo where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ReconnectInfo'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ReconnectInfo'passed x__)
+                (Control.DeepSeq.deepseq (_ReconnectInfo'backoffMs x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.maxReconnectBackoffMs' @:: Lens' ReconnectParams Data.Int.Int32@ -}
+data ReconnectParams
+  = ReconnectParams'_constructor {_ReconnectParams'maxReconnectBackoffMs :: !Data.Int.Int32,
+                                  _ReconnectParams'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ReconnectParams where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ReconnectParams "maxReconnectBackoffMs" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ReconnectParams'maxReconnectBackoffMs
+           (\ x__ y__ -> x__ {_ReconnectParams'maxReconnectBackoffMs = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ReconnectParams where
+  messageName _ = Data.Text.pack "grpc.testing.ReconnectParams"
+  packedMessageDescriptor _
+    = "\n\
+      \\SIReconnectParams\DC27\n\
+      \\CANmax_reconnect_backoff_ms\CAN\SOH \SOH(\ENQR\NAKmaxReconnectBackoffMs"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        maxReconnectBackoffMs__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "max_reconnect_backoff_ms"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"maxReconnectBackoffMs")) ::
+              Data.ProtoLens.FieldDescriptor ReconnectParams
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, maxReconnectBackoffMs__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ReconnectParams'_unknownFields
+        (\ x__ y__ -> x__ {_ReconnectParams'_unknownFields = y__})
+  defMessage
+    = ReconnectParams'_constructor
+        {_ReconnectParams'maxReconnectBackoffMs = Data.ProtoLens.fieldDefault,
+         _ReconnectParams'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ReconnectParams
+          -> Data.ProtoLens.Encoding.Bytes.Parser ReconnectParams
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "max_reconnect_backoff_ms"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"maxReconnectBackoffMs") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "ReconnectParams"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"maxReconnectBackoffMs") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData ReconnectParams where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ReconnectParams'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ReconnectParams'maxReconnectBackoffMs x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.size' @:: Lens' ResponseParameters Data.Int.Int32@
+         * 'Proto.Messages_Fields.intervalUs' @:: Lens' ResponseParameters Data.Int.Int32@
+         * 'Proto.Messages_Fields.compressed' @:: Lens' ResponseParameters BoolValue@
+         * 'Proto.Messages_Fields.maybe'compressed' @:: Lens' ResponseParameters (Prelude.Maybe BoolValue)@ -}
+data ResponseParameters
+  = ResponseParameters'_constructor {_ResponseParameters'size :: !Data.Int.Int32,
+                                     _ResponseParameters'intervalUs :: !Data.Int.Int32,
+                                     _ResponseParameters'compressed :: !(Prelude.Maybe BoolValue),
+                                     _ResponseParameters'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ResponseParameters where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ResponseParameters "size" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ResponseParameters'size
+           (\ x__ y__ -> x__ {_ResponseParameters'size = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ResponseParameters "intervalUs" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ResponseParameters'intervalUs
+           (\ x__ y__ -> x__ {_ResponseParameters'intervalUs = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ResponseParameters "compressed" BoolValue where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ResponseParameters'compressed
+           (\ x__ y__ -> x__ {_ResponseParameters'compressed = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ResponseParameters "maybe'compressed" (Prelude.Maybe BoolValue) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ResponseParameters'compressed
+           (\ x__ y__ -> x__ {_ResponseParameters'compressed = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ResponseParameters where
+  messageName _ = Data.Text.pack "grpc.testing.ResponseParameters"
+  packedMessageDescriptor _
+    = "\n\
+      \\DC2ResponseParameters\DC2\DC2\n\
+      \\EOTsize\CAN\SOH \SOH(\ENQR\EOTsize\DC2\US\n\
+      \\vinterval_us\CAN\STX \SOH(\ENQR\n\
+      \intervalUs\DC27\n\
+      \\n\
+      \compressed\CAN\ETX \SOH(\v2\ETB.grpc.testing.BoolValueR\n\
+      \compressed"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        size__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "size"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"size")) ::
+              Data.ProtoLens.FieldDescriptor ResponseParameters
+        intervalUs__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "interval_us"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"intervalUs")) ::
+              Data.ProtoLens.FieldDescriptor ResponseParameters
+        compressed__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "compressed"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor BoolValue)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'compressed")) ::
+              Data.ProtoLens.FieldDescriptor ResponseParameters
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, size__field_descriptor),
+           (Data.ProtoLens.Tag 2, intervalUs__field_descriptor),
+           (Data.ProtoLens.Tag 3, compressed__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ResponseParameters'_unknownFields
+        (\ x__ y__ -> x__ {_ResponseParameters'_unknownFields = y__})
+  defMessage
+    = ResponseParameters'_constructor
+        {_ResponseParameters'size = Data.ProtoLens.fieldDefault,
+         _ResponseParameters'intervalUs = Data.ProtoLens.fieldDefault,
+         _ResponseParameters'compressed = Prelude.Nothing,
+         _ResponseParameters'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ResponseParameters
+          -> Data.ProtoLens.Encoding.Bytes.Parser ResponseParameters
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "size"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"size") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "interval_us"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"intervalUs") y x)
+                        26
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "compressed"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"compressed") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "ResponseParameters"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"size") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view (Data.ProtoLens.Field.field @"intervalUs") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                ((Data.Monoid.<>)
+                   (case
+                        Lens.Family2.view
+                          (Data.ProtoLens.Field.field @"maybe'compressed") _x
+                    of
+                      Prelude.Nothing -> Data.Monoid.mempty
+                      (Prelude.Just _v)
+                        -> (Data.Monoid.<>)
+                             (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                             ((Prelude..)
+                                (\ bs
+                                   -> (Data.Monoid.<>)
+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                Data.ProtoLens.encodeMessage _v))
+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
+instance Control.DeepSeq.NFData ResponseParameters where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ResponseParameters'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ResponseParameters'size x__)
+                (Control.DeepSeq.deepseq
+                   (_ResponseParameters'intervalUs x__)
+                   (Control.DeepSeq.deepseq (_ResponseParameters'compressed x__) ())))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.grpcCodeToReturn' @:: Lens' SetReturnStatusRequest Data.Int.Int32@
+         * 'Proto.Messages_Fields.grpcStatusDescription' @:: Lens' SetReturnStatusRequest Data.Text.Text@ -}
+data SetReturnStatusRequest
+  = SetReturnStatusRequest'_constructor {_SetReturnStatusRequest'grpcCodeToReturn :: !Data.Int.Int32,
+                                         _SetReturnStatusRequest'grpcStatusDescription :: !Data.Text.Text,
+                                         _SetReturnStatusRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show SetReturnStatusRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField SetReturnStatusRequest "grpcCodeToReturn" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SetReturnStatusRequest'grpcCodeToReturn
+           (\ x__ y__
+              -> x__ {_SetReturnStatusRequest'grpcCodeToReturn = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SetReturnStatusRequest "grpcStatusDescription" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SetReturnStatusRequest'grpcStatusDescription
+           (\ x__ y__
+              -> x__ {_SetReturnStatusRequest'grpcStatusDescription = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message SetReturnStatusRequest where
+  messageName _
+    = Data.Text.pack "grpc.testing.SetReturnStatusRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\SYNSetReturnStatusRequest\DC2-\n\
+      \\DC3grpc_code_to_return\CAN\SOH \SOH(\ENQR\DLEgrpcCodeToReturn\DC26\n\
+      \\ETBgrpc_status_description\CAN\STX \SOH(\tR\NAKgrpcStatusDescription"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        grpcCodeToReturn__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "grpc_code_to_return"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"grpcCodeToReturn")) ::
+              Data.ProtoLens.FieldDescriptor SetReturnStatusRequest
+        grpcStatusDescription__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "grpc_status_description"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"grpcStatusDescription")) ::
+              Data.ProtoLens.FieldDescriptor SetReturnStatusRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, grpcCodeToReturn__field_descriptor),
+           (Data.ProtoLens.Tag 2, grpcStatusDescription__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _SetReturnStatusRequest'_unknownFields
+        (\ x__ y__ -> x__ {_SetReturnStatusRequest'_unknownFields = y__})
+  defMessage
+    = SetReturnStatusRequest'_constructor
+        {_SetReturnStatusRequest'grpcCodeToReturn = Data.ProtoLens.fieldDefault,
+         _SetReturnStatusRequest'grpcStatusDescription = Data.ProtoLens.fieldDefault,
+         _SetReturnStatusRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          SetReturnStatusRequest
+          -> Data.ProtoLens.Encoding.Bytes.Parser SetReturnStatusRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "grpc_code_to_return"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"grpcCodeToReturn") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "grpc_status_description"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"grpcStatusDescription") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "SetReturnStatusRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"grpcCodeToReturn") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"grpcStatusDescription") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData SetReturnStatusRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_SetReturnStatusRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_SetReturnStatusRequest'grpcCodeToReturn x__)
+                (Control.DeepSeq.deepseq
+                   (_SetReturnStatusRequest'grpcStatusDescription x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.responseType' @:: Lens' SimpleRequest PayloadType@
+         * 'Proto.Messages_Fields.responseSize' @:: Lens' SimpleRequest Data.Int.Int32@
+         * 'Proto.Messages_Fields.payload' @:: Lens' SimpleRequest Payload@
+         * 'Proto.Messages_Fields.maybe'payload' @:: Lens' SimpleRequest (Prelude.Maybe Payload)@
+         * 'Proto.Messages_Fields.fillUsername' @:: Lens' SimpleRequest Prelude.Bool@
+         * 'Proto.Messages_Fields.fillOauthScope' @:: Lens' SimpleRequest Prelude.Bool@
+         * 'Proto.Messages_Fields.responseCompressed' @:: Lens' SimpleRequest BoolValue@
+         * 'Proto.Messages_Fields.maybe'responseCompressed' @:: Lens' SimpleRequest (Prelude.Maybe BoolValue)@
+         * 'Proto.Messages_Fields.responseStatus' @:: Lens' SimpleRequest EchoStatus@
+         * 'Proto.Messages_Fields.maybe'responseStatus' @:: Lens' SimpleRequest (Prelude.Maybe EchoStatus)@
+         * 'Proto.Messages_Fields.expectCompressed' @:: Lens' SimpleRequest BoolValue@
+         * 'Proto.Messages_Fields.maybe'expectCompressed' @:: Lens' SimpleRequest (Prelude.Maybe BoolValue)@
+         * 'Proto.Messages_Fields.fillServerId' @:: Lens' SimpleRequest Prelude.Bool@
+         * 'Proto.Messages_Fields.fillGrpclbRouteType' @:: Lens' SimpleRequest Prelude.Bool@
+         * 'Proto.Messages_Fields.orcaPerQueryReport' @:: Lens' SimpleRequest TestOrcaReport@
+         * 'Proto.Messages_Fields.maybe'orcaPerQueryReport' @:: Lens' SimpleRequest (Prelude.Maybe TestOrcaReport)@ -}
+data SimpleRequest
+  = SimpleRequest'_constructor {_SimpleRequest'responseType :: !PayloadType,
+                                _SimpleRequest'responseSize :: !Data.Int.Int32,
+                                _SimpleRequest'payload :: !(Prelude.Maybe Payload),
+                                _SimpleRequest'fillUsername :: !Prelude.Bool,
+                                _SimpleRequest'fillOauthScope :: !Prelude.Bool,
+                                _SimpleRequest'responseCompressed :: !(Prelude.Maybe BoolValue),
+                                _SimpleRequest'responseStatus :: !(Prelude.Maybe EchoStatus),
+                                _SimpleRequest'expectCompressed :: !(Prelude.Maybe BoolValue),
+                                _SimpleRequest'fillServerId :: !Prelude.Bool,
+                                _SimpleRequest'fillGrpclbRouteType :: !Prelude.Bool,
+                                _SimpleRequest'orcaPerQueryReport :: !(Prelude.Maybe TestOrcaReport),
+                                _SimpleRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show SimpleRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField SimpleRequest "responseType" PayloadType where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'responseType
+           (\ x__ y__ -> x__ {_SimpleRequest'responseType = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "responseSize" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'responseSize
+           (\ x__ y__ -> x__ {_SimpleRequest'responseSize = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "payload" Payload where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'payload
+           (\ x__ y__ -> x__ {_SimpleRequest'payload = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField SimpleRequest "maybe'payload" (Prelude.Maybe Payload) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'payload
+           (\ x__ y__ -> x__ {_SimpleRequest'payload = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "fillUsername" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'fillUsername
+           (\ x__ y__ -> x__ {_SimpleRequest'fillUsername = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "fillOauthScope" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'fillOauthScope
+           (\ x__ y__ -> x__ {_SimpleRequest'fillOauthScope = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "responseCompressed" BoolValue where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'responseCompressed
+           (\ x__ y__ -> x__ {_SimpleRequest'responseCompressed = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField SimpleRequest "maybe'responseCompressed" (Prelude.Maybe BoolValue) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'responseCompressed
+           (\ x__ y__ -> x__ {_SimpleRequest'responseCompressed = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "responseStatus" EchoStatus where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'responseStatus
+           (\ x__ y__ -> x__ {_SimpleRequest'responseStatus = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField SimpleRequest "maybe'responseStatus" (Prelude.Maybe EchoStatus) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'responseStatus
+           (\ x__ y__ -> x__ {_SimpleRequest'responseStatus = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "expectCompressed" BoolValue where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'expectCompressed
+           (\ x__ y__ -> x__ {_SimpleRequest'expectCompressed = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField SimpleRequest "maybe'expectCompressed" (Prelude.Maybe BoolValue) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'expectCompressed
+           (\ x__ y__ -> x__ {_SimpleRequest'expectCompressed = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "fillServerId" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'fillServerId
+           (\ x__ y__ -> x__ {_SimpleRequest'fillServerId = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "fillGrpclbRouteType" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'fillGrpclbRouteType
+           (\ x__ y__ -> x__ {_SimpleRequest'fillGrpclbRouteType = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleRequest "orcaPerQueryReport" TestOrcaReport where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'orcaPerQueryReport
+           (\ x__ y__ -> x__ {_SimpleRequest'orcaPerQueryReport = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField SimpleRequest "maybe'orcaPerQueryReport" (Prelude.Maybe TestOrcaReport) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleRequest'orcaPerQueryReport
+           (\ x__ y__ -> x__ {_SimpleRequest'orcaPerQueryReport = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message SimpleRequest where
+  messageName _ = Data.Text.pack "grpc.testing.SimpleRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\rSimpleRequest\DC2>\n\
+      \\rresponse_type\CAN\SOH \SOH(\SO2\EM.grpc.testing.PayloadTypeR\fresponseType\DC2#\n\
+      \\rresponse_size\CAN\STX \SOH(\ENQR\fresponseSize\DC2/\n\
+      \\apayload\CAN\ETX \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2#\n\
+      \\rfill_username\CAN\EOT \SOH(\bR\ffillUsername\DC2(\n\
+      \\DLEfill_oauth_scope\CAN\ENQ \SOH(\bR\SOfillOauthScope\DC2H\n\
+      \\DC3response_compressed\CAN\ACK \SOH(\v2\ETB.grpc.testing.BoolValueR\DC2responseCompressed\DC2A\n\
+      \\SIresponse_status\CAN\a \SOH(\v2\CAN.grpc.testing.EchoStatusR\SOresponseStatus\DC2D\n\
+      \\DC1expect_compressed\CAN\b \SOH(\v2\ETB.grpc.testing.BoolValueR\DLEexpectCompressed\DC2$\n\
+      \\SOfill_server_id\CAN\t \SOH(\bR\ffillServerId\DC23\n\
+      \\SYNfill_grpclb_route_type\CAN\n\
+      \ \SOH(\bR\DC3fillGrpclbRouteType\DC2O\n\
+      \\NAKorca_per_query_report\CAN\v \SOH(\v2\FS.grpc.testing.TestOrcaReportR\DC2orcaPerQueryReport"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        responseType__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor PayloadType)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"responseType")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        responseSize__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_size"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"responseSize")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        payload__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "payload"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Payload)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'payload")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        fillUsername__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "fill_username"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"fillUsername")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        fillOauthScope__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "fill_oauth_scope"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"fillOauthScope")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        responseCompressed__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_compressed"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor BoolValue)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'responseCompressed")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        responseStatus__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_status"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor EchoStatus)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'responseStatus")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        expectCompressed__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "expect_compressed"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor BoolValue)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'expectCompressed")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        fillServerId__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "fill_server_id"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"fillServerId")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        fillGrpclbRouteType__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "fill_grpclb_route_type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"fillGrpclbRouteType")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+        orcaPerQueryReport__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "orca_per_query_report"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor TestOrcaReport)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'orcaPerQueryReport")) ::
+              Data.ProtoLens.FieldDescriptor SimpleRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, responseType__field_descriptor),
+           (Data.ProtoLens.Tag 2, responseSize__field_descriptor),
+           (Data.ProtoLens.Tag 3, payload__field_descriptor),
+           (Data.ProtoLens.Tag 4, fillUsername__field_descriptor),
+           (Data.ProtoLens.Tag 5, fillOauthScope__field_descriptor),
+           (Data.ProtoLens.Tag 6, responseCompressed__field_descriptor),
+           (Data.ProtoLens.Tag 7, responseStatus__field_descriptor),
+           (Data.ProtoLens.Tag 8, expectCompressed__field_descriptor),
+           (Data.ProtoLens.Tag 9, fillServerId__field_descriptor),
+           (Data.ProtoLens.Tag 10, fillGrpclbRouteType__field_descriptor),
+           (Data.ProtoLens.Tag 11, orcaPerQueryReport__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _SimpleRequest'_unknownFields
+        (\ x__ y__ -> x__ {_SimpleRequest'_unknownFields = y__})
+  defMessage
+    = SimpleRequest'_constructor
+        {_SimpleRequest'responseType = Data.ProtoLens.fieldDefault,
+         _SimpleRequest'responseSize = Data.ProtoLens.fieldDefault,
+         _SimpleRequest'payload = Prelude.Nothing,
+         _SimpleRequest'fillUsername = Data.ProtoLens.fieldDefault,
+         _SimpleRequest'fillOauthScope = Data.ProtoLens.fieldDefault,
+         _SimpleRequest'responseCompressed = Prelude.Nothing,
+         _SimpleRequest'responseStatus = Prelude.Nothing,
+         _SimpleRequest'expectCompressed = Prelude.Nothing,
+         _SimpleRequest'fillServerId = Data.ProtoLens.fieldDefault,
+         _SimpleRequest'fillGrpclbRouteType = Data.ProtoLens.fieldDefault,
+         _SimpleRequest'orcaPerQueryReport = Prelude.Nothing,
+         _SimpleRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          SimpleRequest -> Data.ProtoLens.Encoding.Bytes.Parser SimpleRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "response_type"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"responseType") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "response_size"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"responseSize") y x)
+                        26
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "payload"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"payload") y x)
+                        32
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "fill_username"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"fillUsername") y x)
+                        40
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "fill_oauth_scope"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"fillOauthScope") y x)
+                        50
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "response_compressed"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"responseCompressed") y x)
+                        58
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "response_status"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"responseStatus") y x)
+                        66
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "expect_compressed"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"expectCompressed") y x)
+                        72
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "fill_server_id"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"fillServerId") y x)
+                        80
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "fill_grpclb_route_type"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"fillGrpclbRouteType") y x)
+                        90
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "orca_per_query_report"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"orcaPerQueryReport") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "SimpleRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view (Data.ProtoLens.Field.field @"responseType") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                         Prelude.fromEnum _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view (Data.ProtoLens.Field.field @"responseSize") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                ((Data.Monoid.<>)
+                   (case
+                        Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'payload") _x
+                    of
+                      Prelude.Nothing -> Data.Monoid.mempty
+                      (Prelude.Just _v)
+                        -> (Data.Monoid.<>)
+                             (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                             ((Prelude..)
+                                (\ bs
+                                   -> (Data.Monoid.<>)
+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                Data.ProtoLens.encodeMessage _v))
+                   ((Data.Monoid.<>)
+                      (let
+                         _v
+                           = Lens.Family2.view (Data.ProtoLens.Field.field @"fillUsername") _x
+                       in
+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                             Data.Monoid.mempty
+                         else
+                             (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
+                               ((Prelude..)
+                                  Data.ProtoLens.Encoding.Bytes.putVarInt
+                                  (\ b -> if b then 1 else 0) _v))
+                      ((Data.Monoid.<>)
+                         (let
+                            _v
+                              = Lens.Family2.view
+                                  (Data.ProtoLens.Field.field @"fillOauthScope") _x
+                          in
+                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                Data.Monoid.mempty
+                            else
+                                (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
+                                  ((Prelude..)
+                                     Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (\ b -> if b then 1 else 0) _v))
+                         ((Data.Monoid.<>)
+                            (case
+                                 Lens.Family2.view
+                                   (Data.ProtoLens.Field.field @"maybe'responseCompressed") _x
+                             of
+                               Prelude.Nothing -> Data.Monoid.mempty
+                               (Prelude.Just _v)
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt 50)
+                                      ((Prelude..)
+                                         (\ bs
+                                            -> (Data.Monoid.<>)
+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                    (Prelude.fromIntegral
+                                                       (Data.ByteString.length bs)))
+                                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                         Data.ProtoLens.encodeMessage _v))
+                            ((Data.Monoid.<>)
+                               (case
+                                    Lens.Family2.view
+                                      (Data.ProtoLens.Field.field @"maybe'responseStatus") _x
+                                of
+                                  Prelude.Nothing -> Data.Monoid.mempty
+                                  (Prelude.Just _v)
+                                    -> (Data.Monoid.<>)
+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt 58)
+                                         ((Prelude..)
+                                            (\ bs
+                                               -> (Data.Monoid.<>)
+                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                       (Prelude.fromIntegral
+                                                          (Data.ByteString.length bs)))
+                                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                            Data.ProtoLens.encodeMessage _v))
+                               ((Data.Monoid.<>)
+                                  (case
+                                       Lens.Family2.view
+                                         (Data.ProtoLens.Field.field @"maybe'expectCompressed") _x
+                                   of
+                                     Prelude.Nothing -> Data.Monoid.mempty
+                                     (Prelude.Just _v)
+                                       -> (Data.Monoid.<>)
+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt 66)
+                                            ((Prelude..)
+                                               (\ bs
+                                                  -> (Data.Monoid.<>)
+                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                          (Prelude.fromIntegral
+                                                             (Data.ByteString.length bs)))
+                                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                               Data.ProtoLens.encodeMessage _v))
+                                  ((Data.Monoid.<>)
+                                     (let
+                                        _v
+                                          = Lens.Family2.view
+                                              (Data.ProtoLens.Field.field @"fillServerId") _x
+                                      in
+                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                            Data.Monoid.mempty
+                                        else
+                                            (Data.Monoid.<>)
+                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 72)
+                                              ((Prelude..)
+                                                 Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                 (\ b -> if b then 1 else 0) _v))
+                                     ((Data.Monoid.<>)
+                                        (let
+                                           _v
+                                             = Lens.Family2.view
+                                                 (Data.ProtoLens.Field.field @"fillGrpclbRouteType")
+                                                 _x
+                                         in
+                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                               Data.Monoid.mempty
+                                           else
+                                               (Data.Monoid.<>)
+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 80)
+                                                 ((Prelude..)
+                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                    (\ b -> if b then 1 else 0) _v))
+                                        ((Data.Monoid.<>)
+                                           (case
+                                                Lens.Family2.view
+                                                  (Data.ProtoLens.Field.field
+                                                     @"maybe'orcaPerQueryReport")
+                                                  _x
+                                            of
+                                              Prelude.Nothing -> Data.Monoid.mempty
+                                              (Prelude.Just _v)
+                                                -> (Data.Monoid.<>)
+                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 90)
+                                                     ((Prelude..)
+                                                        (\ bs
+                                                           -> (Data.Monoid.<>)
+                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                   (Prelude.fromIntegral
+                                                                      (Data.ByteString.length bs)))
+                                                                (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                   bs))
+                                                        Data.ProtoLens.encodeMessage _v))
+                                           (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                                              (Lens.Family2.view
+                                                 Data.ProtoLens.unknownFields _x))))))))))))
+instance Control.DeepSeq.NFData SimpleRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_SimpleRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_SimpleRequest'responseType x__)
+                (Control.DeepSeq.deepseq
+                   (_SimpleRequest'responseSize x__)
+                   (Control.DeepSeq.deepseq
+                      (_SimpleRequest'payload x__)
+                      (Control.DeepSeq.deepseq
+                         (_SimpleRequest'fillUsername x__)
+                         (Control.DeepSeq.deepseq
+                            (_SimpleRequest'fillOauthScope x__)
+                            (Control.DeepSeq.deepseq
+                               (_SimpleRequest'responseCompressed x__)
+                               (Control.DeepSeq.deepseq
+                                  (_SimpleRequest'responseStatus x__)
+                                  (Control.DeepSeq.deepseq
+                                     (_SimpleRequest'expectCompressed x__)
+                                     (Control.DeepSeq.deepseq
+                                        (_SimpleRequest'fillServerId x__)
+                                        (Control.DeepSeq.deepseq
+                                           (_SimpleRequest'fillGrpclbRouteType x__)
+                                           (Control.DeepSeq.deepseq
+                                              (_SimpleRequest'orcaPerQueryReport x__) ())))))))))))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.payload' @:: Lens' SimpleResponse Payload@
+         * 'Proto.Messages_Fields.maybe'payload' @:: Lens' SimpleResponse (Prelude.Maybe Payload)@
+         * 'Proto.Messages_Fields.username' @:: Lens' SimpleResponse Data.Text.Text@
+         * 'Proto.Messages_Fields.oauthScope' @:: Lens' SimpleResponse Data.Text.Text@
+         * 'Proto.Messages_Fields.serverId' @:: Lens' SimpleResponse Data.Text.Text@
+         * 'Proto.Messages_Fields.grpclbRouteType' @:: Lens' SimpleResponse GrpclbRouteType@
+         * 'Proto.Messages_Fields.hostname' @:: Lens' SimpleResponse Data.Text.Text@ -}
+data SimpleResponse
+  = SimpleResponse'_constructor {_SimpleResponse'payload :: !(Prelude.Maybe Payload),
+                                 _SimpleResponse'username :: !Data.Text.Text,
+                                 _SimpleResponse'oauthScope :: !Data.Text.Text,
+                                 _SimpleResponse'serverId :: !Data.Text.Text,
+                                 _SimpleResponse'grpclbRouteType :: !GrpclbRouteType,
+                                 _SimpleResponse'hostname :: !Data.Text.Text,
+                                 _SimpleResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show SimpleResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField SimpleResponse "payload" Payload where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'payload
+           (\ x__ y__ -> x__ {_SimpleResponse'payload = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField SimpleResponse "maybe'payload" (Prelude.Maybe Payload) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'payload
+           (\ x__ y__ -> x__ {_SimpleResponse'payload = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleResponse "username" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'username
+           (\ x__ y__ -> x__ {_SimpleResponse'username = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleResponse "oauthScope" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'oauthScope
+           (\ x__ y__ -> x__ {_SimpleResponse'oauthScope = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleResponse "serverId" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'serverId
+           (\ x__ y__ -> x__ {_SimpleResponse'serverId = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleResponse "grpclbRouteType" GrpclbRouteType where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'grpclbRouteType
+           (\ x__ y__ -> x__ {_SimpleResponse'grpclbRouteType = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField SimpleResponse "hostname" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _SimpleResponse'hostname
+           (\ x__ y__ -> x__ {_SimpleResponse'hostname = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message SimpleResponse where
+  messageName _ = Data.Text.pack "grpc.testing.SimpleResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOSimpleResponse\DC2/\n\
+      \\apayload\CAN\SOH \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2\SUB\n\
+      \\busername\CAN\STX \SOH(\tR\busername\DC2\US\n\
+      \\voauth_scope\CAN\ETX \SOH(\tR\n\
+      \oauthScope\DC2\ESC\n\
+      \\tserver_id\CAN\EOT \SOH(\tR\bserverId\DC2I\n\
+      \\DC1grpclb_route_type\CAN\ENQ \SOH(\SO2\GS.grpc.testing.GrpclbRouteTypeR\SIgrpclbRouteType\DC2\SUB\n\
+      \\bhostname\CAN\ACK \SOH(\tR\bhostname"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        payload__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "payload"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Payload)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'payload")) ::
+              Data.ProtoLens.FieldDescriptor SimpleResponse
+        username__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "username"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"username")) ::
+              Data.ProtoLens.FieldDescriptor SimpleResponse
+        oauthScope__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oauth_scope"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"oauthScope")) ::
+              Data.ProtoLens.FieldDescriptor SimpleResponse
+        serverId__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "server_id"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"serverId")) ::
+              Data.ProtoLens.FieldDescriptor SimpleResponse
+        grpclbRouteType__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "grpclb_route_type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor GrpclbRouteType)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"grpclbRouteType")) ::
+              Data.ProtoLens.FieldDescriptor SimpleResponse
+        hostname__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "hostname"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"hostname")) ::
+              Data.ProtoLens.FieldDescriptor SimpleResponse
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, payload__field_descriptor),
+           (Data.ProtoLens.Tag 2, username__field_descriptor),
+           (Data.ProtoLens.Tag 3, oauthScope__field_descriptor),
+           (Data.ProtoLens.Tag 4, serverId__field_descriptor),
+           (Data.ProtoLens.Tag 5, grpclbRouteType__field_descriptor),
+           (Data.ProtoLens.Tag 6, hostname__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _SimpleResponse'_unknownFields
+        (\ x__ y__ -> x__ {_SimpleResponse'_unknownFields = y__})
+  defMessage
+    = SimpleResponse'_constructor
+        {_SimpleResponse'payload = Prelude.Nothing,
+         _SimpleResponse'username = Data.ProtoLens.fieldDefault,
+         _SimpleResponse'oauthScope = Data.ProtoLens.fieldDefault,
+         _SimpleResponse'serverId = Data.ProtoLens.fieldDefault,
+         _SimpleResponse'grpclbRouteType = Data.ProtoLens.fieldDefault,
+         _SimpleResponse'hostname = Data.ProtoLens.fieldDefault,
+         _SimpleResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          SimpleResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser SimpleResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "payload"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"payload") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "username"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"username") y x)
+                        26
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "oauth_scope"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"oauthScope") y x)
+                        34
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "server_id"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"serverId") y x)
+                        40
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "grpclb_route_type"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"grpclbRouteType") y x)
+                        50
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "hostname"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"hostname") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "SimpleResponse"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (case
+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'payload") _x
+              of
+                Prelude.Nothing -> Data.Monoid.mempty
+                (Prelude.Just _v)
+                  -> (Data.Monoid.<>)
+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                       ((Prelude..)
+                          (\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                          Data.ProtoLens.encodeMessage _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"username") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                ((Data.Monoid.<>)
+                   (let
+                      _v
+                        = Lens.Family2.view (Data.ProtoLens.Field.field @"oauthScope") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                            ((Prelude..)
+                               (\ bs
+                                  -> (Data.Monoid.<>)
+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                               Data.Text.Encoding.encodeUtf8 _v))
+                   ((Data.Monoid.<>)
+                      (let
+                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"serverId") _x
+                       in
+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                             Data.Monoid.mempty
+                         else
+                             (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
+                               ((Prelude..)
+                                  (\ bs
+                                     -> (Data.Monoid.<>)
+                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                             (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                          (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                  Data.Text.Encoding.encodeUtf8 _v))
+                      ((Data.Monoid.<>)
+                         (let
+                            _v
+                              = Lens.Family2.view
+                                  (Data.ProtoLens.Field.field @"grpclbRouteType") _x
+                          in
+                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                Data.Monoid.mempty
+                            else
+                                (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
+                                  ((Prelude..)
+                                     ((Prelude..)
+                                        Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        Prelude.fromIntegral)
+                                     Prelude.fromEnum _v))
+                         ((Data.Monoid.<>)
+                            (let
+                               _v = Lens.Family2.view (Data.ProtoLens.Field.field @"hostname") _x
+                             in
+                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                   Data.Monoid.mempty
+                               else
+                                   (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 50)
+                                     ((Prelude..)
+                                        (\ bs
+                                           -> (Data.Monoid.<>)
+                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                   (Prelude.fromIntegral
+                                                      (Data.ByteString.length bs)))
+                                                (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                        Data.Text.Encoding.encodeUtf8 _v))
+                            (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                               (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))))
+instance Control.DeepSeq.NFData SimpleResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_SimpleResponse'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_SimpleResponse'payload x__)
+                (Control.DeepSeq.deepseq
+                   (_SimpleResponse'username x__)
+                   (Control.DeepSeq.deepseq
+                      (_SimpleResponse'oauthScope x__)
+                      (Control.DeepSeq.deepseq
+                         (_SimpleResponse'serverId x__)
+                         (Control.DeepSeq.deepseq
+                            (_SimpleResponse'grpclbRouteType x__)
+                            (Control.DeepSeq.deepseq (_SimpleResponse'hostname x__) ()))))))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.payload' @:: Lens' StreamingInputCallRequest Payload@
+         * 'Proto.Messages_Fields.maybe'payload' @:: Lens' StreamingInputCallRequest (Prelude.Maybe Payload)@
+         * 'Proto.Messages_Fields.expectCompressed' @:: Lens' StreamingInputCallRequest BoolValue@
+         * 'Proto.Messages_Fields.maybe'expectCompressed' @:: Lens' StreamingInputCallRequest (Prelude.Maybe BoolValue)@ -}
+data StreamingInputCallRequest
+  = StreamingInputCallRequest'_constructor {_StreamingInputCallRequest'payload :: !(Prelude.Maybe Payload),
+                                            _StreamingInputCallRequest'expectCompressed :: !(Prelude.Maybe BoolValue),
+                                            _StreamingInputCallRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show StreamingInputCallRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField StreamingInputCallRequest "payload" Payload where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingInputCallRequest'payload
+           (\ x__ y__ -> x__ {_StreamingInputCallRequest'payload = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField StreamingInputCallRequest "maybe'payload" (Prelude.Maybe Payload) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingInputCallRequest'payload
+           (\ x__ y__ -> x__ {_StreamingInputCallRequest'payload = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField StreamingInputCallRequest "expectCompressed" BoolValue where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingInputCallRequest'expectCompressed
+           (\ x__ y__
+              -> x__ {_StreamingInputCallRequest'expectCompressed = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField StreamingInputCallRequest "maybe'expectCompressed" (Prelude.Maybe BoolValue) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingInputCallRequest'expectCompressed
+           (\ x__ y__
+              -> x__ {_StreamingInputCallRequest'expectCompressed = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message StreamingInputCallRequest where
+  messageName _
+    = Data.Text.pack "grpc.testing.StreamingInputCallRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\EMStreamingInputCallRequest\DC2/\n\
+      \\apayload\CAN\SOH \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2D\n\
+      \\DC1expect_compressed\CAN\STX \SOH(\v2\ETB.grpc.testing.BoolValueR\DLEexpectCompressed"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        payload__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "payload"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Payload)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'payload")) ::
+              Data.ProtoLens.FieldDescriptor StreamingInputCallRequest
+        expectCompressed__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "expect_compressed"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor BoolValue)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'expectCompressed")) ::
+              Data.ProtoLens.FieldDescriptor StreamingInputCallRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, payload__field_descriptor),
+           (Data.ProtoLens.Tag 2, expectCompressed__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _StreamingInputCallRequest'_unknownFields
+        (\ x__ y__
+           -> x__ {_StreamingInputCallRequest'_unknownFields = y__})
+  defMessage
+    = StreamingInputCallRequest'_constructor
+        {_StreamingInputCallRequest'payload = Prelude.Nothing,
+         _StreamingInputCallRequest'expectCompressed = Prelude.Nothing,
+         _StreamingInputCallRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          StreamingInputCallRequest
+          -> Data.ProtoLens.Encoding.Bytes.Parser StreamingInputCallRequest
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "payload"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"payload") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "expect_compressed"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"expectCompressed") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "StreamingInputCallRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (case
+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'payload") _x
+              of
+                Prelude.Nothing -> Data.Monoid.mempty
+                (Prelude.Just _v)
+                  -> (Data.Monoid.<>)
+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                       ((Prelude..)
+                          (\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                          Data.ProtoLens.encodeMessage _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view
+                       (Data.ProtoLens.Field.field @"maybe'expectCompressed") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData StreamingInputCallRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_StreamingInputCallRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_StreamingInputCallRequest'payload x__)
+                (Control.DeepSeq.deepseq
+                   (_StreamingInputCallRequest'expectCompressed x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.aggregatedPayloadSize' @:: Lens' StreamingInputCallResponse Data.Int.Int32@ -}
+data StreamingInputCallResponse
+  = StreamingInputCallResponse'_constructor {_StreamingInputCallResponse'aggregatedPayloadSize :: !Data.Int.Int32,
+                                             _StreamingInputCallResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show StreamingInputCallResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField StreamingInputCallResponse "aggregatedPayloadSize" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingInputCallResponse'aggregatedPayloadSize
+           (\ x__ y__
+              -> x__ {_StreamingInputCallResponse'aggregatedPayloadSize = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message StreamingInputCallResponse where
+  messageName _
+    = Data.Text.pack "grpc.testing.StreamingInputCallResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\SUBStreamingInputCallResponse\DC26\n\
+      \\ETBaggregated_payload_size\CAN\SOH \SOH(\ENQR\NAKaggregatedPayloadSize"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        aggregatedPayloadSize__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "aggregated_payload_size"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"aggregatedPayloadSize")) ::
+              Data.ProtoLens.FieldDescriptor StreamingInputCallResponse
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, aggregatedPayloadSize__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _StreamingInputCallResponse'_unknownFields
+        (\ x__ y__
+           -> x__ {_StreamingInputCallResponse'_unknownFields = y__})
+  defMessage
+    = StreamingInputCallResponse'_constructor
+        {_StreamingInputCallResponse'aggregatedPayloadSize = Data.ProtoLens.fieldDefault,
+         _StreamingInputCallResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          StreamingInputCallResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser StreamingInputCallResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "aggregated_payload_size"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"aggregatedPayloadSize") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "StreamingInputCallResponse"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"aggregatedPayloadSize") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData StreamingInputCallResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_StreamingInputCallResponse'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_StreamingInputCallResponse'aggregatedPayloadSize x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.responseType' @:: Lens' StreamingOutputCallRequest PayloadType@
+         * 'Proto.Messages_Fields.responseParameters' @:: Lens' StreamingOutputCallRequest [ResponseParameters]@
+         * 'Proto.Messages_Fields.vec'responseParameters' @:: Lens' StreamingOutputCallRequest (Data.Vector.Vector ResponseParameters)@
+         * 'Proto.Messages_Fields.payload' @:: Lens' StreamingOutputCallRequest Payload@
+         * 'Proto.Messages_Fields.maybe'payload' @:: Lens' StreamingOutputCallRequest (Prelude.Maybe Payload)@
+         * 'Proto.Messages_Fields.responseStatus' @:: Lens' StreamingOutputCallRequest EchoStatus@
+         * 'Proto.Messages_Fields.maybe'responseStatus' @:: Lens' StreamingOutputCallRequest (Prelude.Maybe EchoStatus)@
+         * 'Proto.Messages_Fields.orcaOobReport' @:: Lens' StreamingOutputCallRequest TestOrcaReport@
+         * 'Proto.Messages_Fields.maybe'orcaOobReport' @:: Lens' StreamingOutputCallRequest (Prelude.Maybe TestOrcaReport)@ -}
+data StreamingOutputCallRequest
+  = StreamingOutputCallRequest'_constructor {_StreamingOutputCallRequest'responseType :: !PayloadType,
+                                             _StreamingOutputCallRequest'responseParameters :: !(Data.Vector.Vector ResponseParameters),
+                                             _StreamingOutputCallRequest'payload :: !(Prelude.Maybe Payload),
+                                             _StreamingOutputCallRequest'responseStatus :: !(Prelude.Maybe EchoStatus),
+                                             _StreamingOutputCallRequest'orcaOobReport :: !(Prelude.Maybe TestOrcaReport),
+                                             _StreamingOutputCallRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show StreamingOutputCallRequest where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "responseType" PayloadType where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'responseType
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'responseType = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "responseParameters" [ResponseParameters] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'responseParameters
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'responseParameters = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "vec'responseParameters" (Data.Vector.Vector ResponseParameters) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'responseParameters
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'responseParameters = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "payload" Payload where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'payload
+           (\ x__ y__ -> x__ {_StreamingOutputCallRequest'payload = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "maybe'payload" (Prelude.Maybe Payload) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'payload
+           (\ x__ y__ -> x__ {_StreamingOutputCallRequest'payload = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "responseStatus" EchoStatus where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'responseStatus
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'responseStatus = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "maybe'responseStatus" (Prelude.Maybe EchoStatus) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'responseStatus
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'responseStatus = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "orcaOobReport" TestOrcaReport where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'orcaOobReport
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'orcaOobReport = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField StreamingOutputCallRequest "maybe'orcaOobReport" (Prelude.Maybe TestOrcaReport) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallRequest'orcaOobReport
+           (\ x__ y__
+              -> x__ {_StreamingOutputCallRequest'orcaOobReport = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message StreamingOutputCallRequest where
+  messageName _
+    = Data.Text.pack "grpc.testing.StreamingOutputCallRequest"
+  packedMessageDescriptor _
+    = "\n\
+      \\SUBStreamingOutputCallRequest\DC2>\n\
+      \\rresponse_type\CAN\SOH \SOH(\SO2\EM.grpc.testing.PayloadTypeR\fresponseType\DC2Q\n\
+      \\DC3response_parameters\CAN\STX \ETX(\v2 .grpc.testing.ResponseParametersR\DC2responseParameters\DC2/\n\
+      \\apayload\CAN\ETX \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2A\n\
+      \\SIresponse_status\CAN\a \SOH(\v2\CAN.grpc.testing.EchoStatusR\SOresponseStatus\DC2D\n\
+      \\SIorca_oob_report\CAN\b \SOH(\v2\FS.grpc.testing.TestOrcaReportR\rorcaOobReport"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        responseType__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_type"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor PayloadType)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"responseType")) ::
+              Data.ProtoLens.FieldDescriptor StreamingOutputCallRequest
+        responseParameters__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_parameters"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ResponseParameters)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"responseParameters")) ::
+              Data.ProtoLens.FieldDescriptor StreamingOutputCallRequest
+        payload__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "payload"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Payload)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'payload")) ::
+              Data.ProtoLens.FieldDescriptor StreamingOutputCallRequest
+        responseStatus__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "response_status"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor EchoStatus)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'responseStatus")) ::
+              Data.ProtoLens.FieldDescriptor StreamingOutputCallRequest
+        orcaOobReport__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "orca_oob_report"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor TestOrcaReport)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'orcaOobReport")) ::
+              Data.ProtoLens.FieldDescriptor StreamingOutputCallRequest
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, responseType__field_descriptor),
+           (Data.ProtoLens.Tag 2, responseParameters__field_descriptor),
+           (Data.ProtoLens.Tag 3, payload__field_descriptor),
+           (Data.ProtoLens.Tag 7, responseStatus__field_descriptor),
+           (Data.ProtoLens.Tag 8, orcaOobReport__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _StreamingOutputCallRequest'_unknownFields
+        (\ x__ y__
+           -> x__ {_StreamingOutputCallRequest'_unknownFields = y__})
+  defMessage
+    = StreamingOutputCallRequest'_constructor
+        {_StreamingOutputCallRequest'responseType = Data.ProtoLens.fieldDefault,
+         _StreamingOutputCallRequest'responseParameters = Data.Vector.Generic.empty,
+         _StreamingOutputCallRequest'payload = Prelude.Nothing,
+         _StreamingOutputCallRequest'responseStatus = Prelude.Nothing,
+         _StreamingOutputCallRequest'orcaOobReport = Prelude.Nothing,
+         _StreamingOutputCallRequest'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          StreamingOutputCallRequest
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ResponseParameters
+             -> Data.ProtoLens.Encoding.Bytes.Parser StreamingOutputCallRequest
+        loop x mutable'responseParameters
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'responseParameters <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                     (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                        mutable'responseParameters)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'responseParameters")
+                              frozen'responseParameters x))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "response_type"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"responseType") y x)
+                                  mutable'responseParameters
+                        18
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "response_parameters"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'responseParameters y)
+                                loop x v
+                        26
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "payload"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"payload") y x)
+                                  mutable'responseParameters
+                        58
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "response_status"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"responseStatus") y x)
+                                  mutable'responseParameters
+                        66
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "orca_oob_report"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"orcaOobReport") y x)
+                                  mutable'responseParameters
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'responseParameters
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'responseParameters <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                              Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'responseParameters)
+          "StreamingOutputCallRequest"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view (Data.ProtoLens.Field.field @"responseType") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                         Prelude.fromEnum _v))
+             ((Data.Monoid.<>)
+                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                   (\ _v
+                      -> (Data.Monoid.<>)
+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                           ((Prelude..)
+                              (\ bs
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                              Data.ProtoLens.encodeMessage _v))
+                   (Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"vec'responseParameters") _x))
+                ((Data.Monoid.<>)
+                   (case
+                        Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'payload") _x
+                    of
+                      Prelude.Nothing -> Data.Monoid.mempty
+                      (Prelude.Just _v)
+                        -> (Data.Monoid.<>)
+                             (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                             ((Prelude..)
+                                (\ bs
+                                   -> (Data.Monoid.<>)
+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                Data.ProtoLens.encodeMessage _v))
+                   ((Data.Monoid.<>)
+                      (case
+                           Lens.Family2.view
+                             (Data.ProtoLens.Field.field @"maybe'responseStatus") _x
+                       of
+                         Prelude.Nothing -> Data.Monoid.mempty
+                         (Prelude.Just _v)
+                           -> (Data.Monoid.<>)
+                                (Data.ProtoLens.Encoding.Bytes.putVarInt 58)
+                                ((Prelude..)
+                                   (\ bs
+                                      -> (Data.Monoid.<>)
+                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                              (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                           (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                   Data.ProtoLens.encodeMessage _v))
+                      ((Data.Monoid.<>)
+                         (case
+                              Lens.Family2.view
+                                (Data.ProtoLens.Field.field @"maybe'orcaOobReport") _x
+                          of
+                            Prelude.Nothing -> Data.Monoid.mempty
+                            (Prelude.Just _v)
+                              -> (Data.Monoid.<>)
+                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 66)
+                                   ((Prelude..)
+                                      (\ bs
+                                         -> (Data.Monoid.<>)
+                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                      Data.ProtoLens.encodeMessage _v))
+                         (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                            (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))
+instance Control.DeepSeq.NFData StreamingOutputCallRequest where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_StreamingOutputCallRequest'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_StreamingOutputCallRequest'responseType x__)
+                (Control.DeepSeq.deepseq
+                   (_StreamingOutputCallRequest'responseParameters x__)
+                   (Control.DeepSeq.deepseq
+                      (_StreamingOutputCallRequest'payload x__)
+                      (Control.DeepSeq.deepseq
+                         (_StreamingOutputCallRequest'responseStatus x__)
+                         (Control.DeepSeq.deepseq
+                            (_StreamingOutputCallRequest'orcaOobReport x__) ())))))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.payload' @:: Lens' StreamingOutputCallResponse Payload@
+         * 'Proto.Messages_Fields.maybe'payload' @:: Lens' StreamingOutputCallResponse (Prelude.Maybe Payload)@ -}
+data StreamingOutputCallResponse
+  = StreamingOutputCallResponse'_constructor {_StreamingOutputCallResponse'payload :: !(Prelude.Maybe Payload),
+                                              _StreamingOutputCallResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show StreamingOutputCallResponse where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField StreamingOutputCallResponse "payload" Payload where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallResponse'payload
+           (\ x__ y__ -> x__ {_StreamingOutputCallResponse'payload = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField StreamingOutputCallResponse "maybe'payload" (Prelude.Maybe Payload) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _StreamingOutputCallResponse'payload
+           (\ x__ y__ -> x__ {_StreamingOutputCallResponse'payload = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message StreamingOutputCallResponse where
+  messageName _
+    = Data.Text.pack "grpc.testing.StreamingOutputCallResponse"
+  packedMessageDescriptor _
+    = "\n\
+      \\ESCStreamingOutputCallResponse\DC2/\n\
+      \\apayload\CAN\SOH \SOH(\v2\NAK.grpc.testing.PayloadR\apayload"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        payload__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "payload"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Payload)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'payload")) ::
+              Data.ProtoLens.FieldDescriptor StreamingOutputCallResponse
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, payload__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _StreamingOutputCallResponse'_unknownFields
+        (\ x__ y__
+           -> x__ {_StreamingOutputCallResponse'_unknownFields = y__})
+  defMessage
+    = StreamingOutputCallResponse'_constructor
+        {_StreamingOutputCallResponse'payload = Prelude.Nothing,
+         _StreamingOutputCallResponse'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          StreamingOutputCallResponse
+          -> Data.ProtoLens.Encoding.Bytes.Parser StreamingOutputCallResponse
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "payload"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"payload") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "StreamingOutputCallResponse"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (case
+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'payload") _x
+              of
+                Prelude.Nothing -> Data.Monoid.mempty
+                (Prelude.Just _v)
+                  -> (Data.Monoid.<>)
+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                       ((Prelude..)
+                          (\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                          Data.ProtoLens.encodeMessage _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData StreamingOutputCallResponse where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_StreamingOutputCallResponse'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_StreamingOutputCallResponse'payload x__) ())
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.cpuUtilization' @:: Lens' TestOrcaReport Prelude.Double@
+         * 'Proto.Messages_Fields.memoryUtilization' @:: Lens' TestOrcaReport Prelude.Double@
+         * 'Proto.Messages_Fields.requestCost' @:: Lens' TestOrcaReport (Data.Map.Map Data.Text.Text Prelude.Double)@
+         * 'Proto.Messages_Fields.utilization' @:: Lens' TestOrcaReport (Data.Map.Map Data.Text.Text Prelude.Double)@ -}
+data TestOrcaReport
+  = TestOrcaReport'_constructor {_TestOrcaReport'cpuUtilization :: !Prelude.Double,
+                                 _TestOrcaReport'memoryUtilization :: !Prelude.Double,
+                                 _TestOrcaReport'requestCost :: !(Data.Map.Map Data.Text.Text Prelude.Double),
+                                 _TestOrcaReport'utilization :: !(Data.Map.Map Data.Text.Text Prelude.Double),
+                                 _TestOrcaReport'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show TestOrcaReport where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField TestOrcaReport "cpuUtilization" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'cpuUtilization
+           (\ x__ y__ -> x__ {_TestOrcaReport'cpuUtilization = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField TestOrcaReport "memoryUtilization" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'memoryUtilization
+           (\ x__ y__ -> x__ {_TestOrcaReport'memoryUtilization = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField TestOrcaReport "requestCost" (Data.Map.Map Data.Text.Text Prelude.Double) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'requestCost
+           (\ x__ y__ -> x__ {_TestOrcaReport'requestCost = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField TestOrcaReport "utilization" (Data.Map.Map Data.Text.Text Prelude.Double) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'utilization
+           (\ x__ y__ -> x__ {_TestOrcaReport'utilization = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message TestOrcaReport where
+  messageName _ = Data.Text.pack "grpc.testing.TestOrcaReport"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOTestOrcaReport\DC2'\n\
+      \\SIcpu_utilization\CAN\SOH \SOH(\SOHR\SOcpuUtilization\DC2-\n\
+      \\DC2memory_utilization\CAN\STX \SOH(\SOHR\DC1memoryUtilization\DC2P\n\
+      \\frequest_cost\CAN\ETX \ETX(\v2-.grpc.testing.TestOrcaReport.RequestCostEntryR\vrequestCost\DC2O\n\
+      \\vutilization\CAN\EOT \ETX(\v2-.grpc.testing.TestOrcaReport.UtilizationEntryR\vutilization\SUB>\n\
+      \\DLERequestCostEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEUtilizationEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        cpuUtilization__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "cpu_utilization"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"cpuUtilization")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport
+        memoryUtilization__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "memory_utilization"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"memoryUtilization")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport
+        requestCost__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "request_cost"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor TestOrcaReport'RequestCostEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"requestCost")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport
+        utilization__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "utilization"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor TestOrcaReport'UtilizationEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"utilization")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, cpuUtilization__field_descriptor),
+           (Data.ProtoLens.Tag 2, memoryUtilization__field_descriptor),
+           (Data.ProtoLens.Tag 3, requestCost__field_descriptor),
+           (Data.ProtoLens.Tag 4, utilization__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _TestOrcaReport'_unknownFields
+        (\ x__ y__ -> x__ {_TestOrcaReport'_unknownFields = y__})
+  defMessage
+    = TestOrcaReport'_constructor
+        {_TestOrcaReport'cpuUtilization = Data.ProtoLens.fieldDefault,
+         _TestOrcaReport'memoryUtilization = Data.ProtoLens.fieldDefault,
+         _TestOrcaReport'requestCost = Data.Map.empty,
+         _TestOrcaReport'utilization = Data.Map.empty,
+         _TestOrcaReport'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          TestOrcaReport
+          -> Data.ProtoLens.Encoding.Bytes.Parser TestOrcaReport
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        9 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "cpu_utilization"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"cpuUtilization") y x)
+                        17
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "memory_utilization"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"memoryUtilization") y x)
+                        26
+                          -> do !(entry :: TestOrcaReport'RequestCostEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "request_cost"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"requestCost")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        34
+                          -> do !(entry :: TestOrcaReport'UtilizationEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "utilization"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"utilization")
+                                        (\ !t -> Data.Map.insert key value t) x))
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "TestOrcaReport"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"cpuUtilization") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 9)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putFixed64
+                         Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"memoryUtilization") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 17)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed64
+                            Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
+                ((Data.Monoid.<>)
+                   (Data.Monoid.mconcat
+                      (Prelude.map
+                         (\ _v
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
+                                 ((Prelude..)
+                                    (\ bs
+                                       -> (Data.Monoid.<>)
+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                    Data.ProtoLens.encodeMessage
+                                    (Lens.Family2.set
+                                       (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                          (Data.ProtoLens.defMessage ::
+                                             TestOrcaReport'RequestCostEntry)))))
+                         (Data.Map.toList
+                            (Lens.Family2.view
+                               (Data.ProtoLens.Field.field @"requestCost") _x))))
+                   ((Data.Monoid.<>)
+                      (Data.Monoid.mconcat
+                         (Prelude.map
+                            (\ _v
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
+                                    ((Prelude..)
+                                       (\ bs
+                                          -> (Data.Monoid.<>)
+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                  (Prelude.fromIntegral
+                                                     (Data.ByteString.length bs)))
+                                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                                       Data.ProtoLens.encodeMessage
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
+                                          (Lens.Family2.set
+                                             (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
+                                             (Data.ProtoLens.defMessage ::
+                                                TestOrcaReport'UtilizationEntry)))))
+                            (Data.Map.toList
+                               (Lens.Family2.view
+                                  (Data.ProtoLens.Field.field @"utilization") _x))))
+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
+instance Control.DeepSeq.NFData TestOrcaReport where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_TestOrcaReport'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_TestOrcaReport'cpuUtilization x__)
+                (Control.DeepSeq.deepseq
+                   (_TestOrcaReport'memoryUtilization x__)
+                   (Control.DeepSeq.deepseq
+                      (_TestOrcaReport'requestCost x__)
+                      (Control.DeepSeq.deepseq (_TestOrcaReport'utilization x__) ()))))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' TestOrcaReport'RequestCostEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' TestOrcaReport'RequestCostEntry Prelude.Double@ -}
+data TestOrcaReport'RequestCostEntry
+  = TestOrcaReport'RequestCostEntry'_constructor {_TestOrcaReport'RequestCostEntry'key :: !Data.Text.Text,
+                                                  _TestOrcaReport'RequestCostEntry'value :: !Prelude.Double,
+                                                  _TestOrcaReport'RequestCostEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show TestOrcaReport'RequestCostEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField TestOrcaReport'RequestCostEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'RequestCostEntry'key
+           (\ x__ y__ -> x__ {_TestOrcaReport'RequestCostEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField TestOrcaReport'RequestCostEntry "value" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'RequestCostEntry'value
+           (\ x__ y__ -> x__ {_TestOrcaReport'RequestCostEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message TestOrcaReport'RequestCostEntry where
+  messageName _
+    = Data.Text.pack "grpc.testing.TestOrcaReport.RequestCostEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLERequestCostEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport'RequestCostEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport'RequestCostEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _TestOrcaReport'RequestCostEntry'_unknownFields
+        (\ x__ y__
+           -> x__ {_TestOrcaReport'RequestCostEntry'_unknownFields = y__})
+  defMessage
+    = TestOrcaReport'RequestCostEntry'_constructor
+        {_TestOrcaReport'RequestCostEntry'key = Data.ProtoLens.fieldDefault,
+         _TestOrcaReport'RequestCostEntry'value = Data.ProtoLens.fieldDefault,
+         _TestOrcaReport'RequestCostEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          TestOrcaReport'RequestCostEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser TestOrcaReport'RequestCostEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        17
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RequestCostEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 17)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed64
+                            Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData TestOrcaReport'RequestCostEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_TestOrcaReport'RequestCostEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_TestOrcaReport'RequestCostEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_TestOrcaReport'RequestCostEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Messages_Fields.key' @:: Lens' TestOrcaReport'UtilizationEntry Data.Text.Text@
+         * 'Proto.Messages_Fields.value' @:: Lens' TestOrcaReport'UtilizationEntry Prelude.Double@ -}
+data TestOrcaReport'UtilizationEntry
+  = TestOrcaReport'UtilizationEntry'_constructor {_TestOrcaReport'UtilizationEntry'key :: !Data.Text.Text,
+                                                  _TestOrcaReport'UtilizationEntry'value :: !Prelude.Double,
+                                                  _TestOrcaReport'UtilizationEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show TestOrcaReport'UtilizationEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField TestOrcaReport'UtilizationEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'UtilizationEntry'key
+           (\ x__ y__ -> x__ {_TestOrcaReport'UtilizationEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField TestOrcaReport'UtilizationEntry "value" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestOrcaReport'UtilizationEntry'value
+           (\ x__ y__ -> x__ {_TestOrcaReport'UtilizationEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message TestOrcaReport'UtilizationEntry where
+  messageName _
+    = Data.Text.pack "grpc.testing.TestOrcaReport.UtilizationEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEUtilizationEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport'UtilizationEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor TestOrcaReport'UtilizationEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _TestOrcaReport'UtilizationEntry'_unknownFields
+        (\ x__ y__
+           -> x__ {_TestOrcaReport'UtilizationEntry'_unknownFields = y__})
+  defMessage
+    = TestOrcaReport'UtilizationEntry'_constructor
+        {_TestOrcaReport'UtilizationEntry'key = Data.ProtoLens.fieldDefault,
+         _TestOrcaReport'UtilizationEntry'value = Data.ProtoLens.fieldDefault,
+         _TestOrcaReport'UtilizationEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          TestOrcaReport'UtilizationEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser TestOrcaReport'UtilizationEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        17
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "UtilizationEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 17)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed64
+                            Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData TestOrcaReport'UtilizationEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_TestOrcaReport'UtilizationEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_TestOrcaReport'UtilizationEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_TestOrcaReport'UtilizationEntry'value x__) ()))
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\SOmessages.proto\DC2\fgrpc.testing\"!\n\
+    \\tBoolValue\DC2\DC4\n\
+    \\ENQvalue\CAN\SOH \SOH(\bR\ENQvalue\"L\n\
+    \\aPayload\DC2-\n\
+    \\EOTtype\CAN\SOH \SOH(\SO2\EM.grpc.testing.PayloadTypeR\EOTtype\DC2\DC2\n\
+    \\EOTbody\CAN\STX \SOH(\fR\EOTbody\":\n\
+    \\n\
+    \EchoStatus\DC2\DC2\n\
+    \\EOTcode\CAN\SOH \SOH(\ENQR\EOTcode\DC2\CAN\n\
+    \\amessage\CAN\STX \SOH(\tR\amessage\"\243\EOT\n\
+    \\rSimpleRequest\DC2>\n\
+    \\rresponse_type\CAN\SOH \SOH(\SO2\EM.grpc.testing.PayloadTypeR\fresponseType\DC2#\n\
+    \\rresponse_size\CAN\STX \SOH(\ENQR\fresponseSize\DC2/\n\
+    \\apayload\CAN\ETX \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2#\n\
+    \\rfill_username\CAN\EOT \SOH(\bR\ffillUsername\DC2(\n\
+    \\DLEfill_oauth_scope\CAN\ENQ \SOH(\bR\SOfillOauthScope\DC2H\n\
+    \\DC3response_compressed\CAN\ACK \SOH(\v2\ETB.grpc.testing.BoolValueR\DC2responseCompressed\DC2A\n\
+    \\SIresponse_status\CAN\a \SOH(\v2\CAN.grpc.testing.EchoStatusR\SOresponseStatus\DC2D\n\
+    \\DC1expect_compressed\CAN\b \SOH(\v2\ETB.grpc.testing.BoolValueR\DLEexpectCompressed\DC2$\n\
+    \\SOfill_server_id\CAN\t \SOH(\bR\ffillServerId\DC23\n\
+    \\SYNfill_grpclb_route_type\CAN\n\
+    \ \SOH(\bR\DC3fillGrpclbRouteType\DC2O\n\
+    \\NAKorca_per_query_report\CAN\v \SOH(\v2\FS.grpc.testing.TestOrcaReportR\DC2orcaPerQueryReport\"\130\STX\n\
+    \\SOSimpleResponse\DC2/\n\
+    \\apayload\CAN\SOH \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2\SUB\n\
+    \\busername\CAN\STX \SOH(\tR\busername\DC2\US\n\
+    \\voauth_scope\CAN\ETX \SOH(\tR\n\
+    \oauthScope\DC2\ESC\n\
+    \\tserver_id\CAN\EOT \SOH(\tR\bserverId\DC2I\n\
+    \\DC1grpclb_route_type\CAN\ENQ \SOH(\SO2\GS.grpc.testing.GrpclbRouteTypeR\SIgrpclbRouteType\DC2\SUB\n\
+    \\bhostname\CAN\ACK \SOH(\tR\bhostname\"\146\SOH\n\
+    \\EMStreamingInputCallRequest\DC2/\n\
+    \\apayload\CAN\SOH \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2D\n\
+    \\DC1expect_compressed\CAN\STX \SOH(\v2\ETB.grpc.testing.BoolValueR\DLEexpectCompressed\"T\n\
+    \\SUBStreamingInputCallResponse\DC26\n\
+    \\ETBaggregated_payload_size\CAN\SOH \SOH(\ENQR\NAKaggregatedPayloadSize\"\130\SOH\n\
+    \\DC2ResponseParameters\DC2\DC2\n\
+    \\EOTsize\CAN\SOH \SOH(\ENQR\EOTsize\DC2\US\n\
+    \\vinterval_us\CAN\STX \SOH(\ENQR\n\
+    \intervalUs\DC27\n\
+    \\n\
+    \compressed\CAN\ETX \SOH(\v2\ETB.grpc.testing.BoolValueR\n\
+    \compressed\"\233\STX\n\
+    \\SUBStreamingOutputCallRequest\DC2>\n\
+    \\rresponse_type\CAN\SOH \SOH(\SO2\EM.grpc.testing.PayloadTypeR\fresponseType\DC2Q\n\
+    \\DC3response_parameters\CAN\STX \ETX(\v2 .grpc.testing.ResponseParametersR\DC2responseParameters\DC2/\n\
+    \\apayload\CAN\ETX \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\DC2A\n\
+    \\SIresponse_status\CAN\a \SOH(\v2\CAN.grpc.testing.EchoStatusR\SOresponseStatus\DC2D\n\
+    \\SIorca_oob_report\CAN\b \SOH(\v2\FS.grpc.testing.TestOrcaReportR\rorcaOobReport\"N\n\
+    \\ESCStreamingOutputCallResponse\DC2/\n\
+    \\apayload\CAN\SOH \SOH(\v2\NAK.grpc.testing.PayloadR\apayload\"J\n\
+    \\SIReconnectParams\DC27\n\
+    \\CANmax_reconnect_backoff_ms\CAN\SOH \SOH(\ENQR\NAKmaxReconnectBackoffMs\"F\n\
+    \\rReconnectInfo\DC2\SYN\n\
+    \\ACKpassed\CAN\SOH \SOH(\bR\ACKpassed\DC2\GS\n\
+    \\n\
+    \backoff_ms\CAN\STX \ETX(\ENQR\tbackoffMs\"{\n\
+    \\CANLoadBalancerStatsRequest\DC2\EM\n\
+    \\bnum_rpcs\CAN\SOH \SOH(\ENQR\anumRpcs\DC2\US\n\
+    \\vtimeout_sec\CAN\STX \SOH(\ENQR\n\
+    \timeoutSec\DC2#\n\
+    \\rmetadata_keys\CAN\ETX \ETX(\tR\fmetadataKeys\"\208\t\n\
+    \\EMLoadBalancerStatsResponse\DC2Y\n\
+    \\frpcs_by_peer\CAN\SOH \ETX(\v27.grpc.testing.LoadBalancerStatsResponse.RpcsByPeerEntryR\n\
+    \rpcsByPeer\DC2!\n\
+    \\fnum_failures\CAN\STX \SOH(\ENQR\vnumFailures\DC2_\n\
+    \\SOrpcs_by_method\CAN\ETX \ETX(\v29.grpc.testing.LoadBalancerStatsResponse.RpcsByMethodEntryR\frpcsByMethod\DC2h\n\
+    \\DC1metadatas_by_peer\CAN\EOT \ETX(\v2<.grpc.testing.LoadBalancerStatsResponse.MetadatasByPeerEntryR\SImetadatasByPeer\SUB\129\SOH\n\
+    \\rMetadataEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\tR\ENQvalue\DC2H\n\
+    \\EOTtype\CAN\ETX \SOH(\SO24.grpc.testing.LoadBalancerStatsResponse.MetadataTypeR\EOTtype\SUB`\n\
+    \\vRpcMetadata\DC2Q\n\
+    \\bmetadata\CAN\SOH \ETX(\v25.grpc.testing.LoadBalancerStatsResponse.MetadataEntryR\bmetadata\SUBh\n\
+    \\SOMetadataByPeer\DC2V\n\
+    \\frpc_metadata\CAN\SOH \ETX(\v23.grpc.testing.LoadBalancerStatsResponse.RpcMetadataR\vrpcMetadata\SUB\177\SOH\n\
+    \\n\
+    \RpcsByPeer\DC2d\n\
+    \\frpcs_by_peer\CAN\SOH \ETX(\v2B.grpc.testing.LoadBalancerStatsResponse.RpcsByPeer.RpcsByPeerEntryR\n\
+    \rpcsByPeer\SUB=\n\
+    \\SIRpcsByPeerEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB=\n\
+    \\SIRpcsByPeerEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUBs\n\
+    \\DC1RpcsByMethodEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2H\n\
+    \\ENQvalue\CAN\STX \SOH(\v22.grpc.testing.LoadBalancerStatsResponse.RpcsByPeerR\ENQvalue:\STX8\SOH\SUBz\n\
+    \\DC4MetadatasByPeerEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2L\n\
+    \\ENQvalue\CAN\STX \SOH(\v26.grpc.testing.LoadBalancerStatsResponse.MetadataByPeerR\ENQvalue:\STX8\SOH\"6\n\
+    \\fMetadataType\DC2\v\n\
+    \\aUNKNOWN\DLE\NUL\DC2\v\n\
+    \\aINITIAL\DLE\SOH\DC2\f\n\
+    \\bTRAILING\DLE\STX\"%\n\
+    \#LoadBalancerAccumulatedStatsRequest\"\134\t\n\
+    \$LoadBalancerAccumulatedStatsResponse\DC2\142\SOH\n\
+    \\SUBnum_rpcs_started_by_method\CAN\SOH \ETX(\v2N.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsStartedByMethodEntryR\SYNnumRpcsStartedByMethodB\STX\CAN\SOH\DC2\148\SOH\n\
+    \\FSnum_rpcs_succeeded_by_method\CAN\STX \ETX(\v2P.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsSucceededByMethodEntryR\CANnumRpcsSucceededByMethodB\STX\CAN\SOH\DC2\139\SOH\n\
+    \\EMnum_rpcs_failed_by_method\CAN\ETX \ETX(\v2M.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsFailedByMethodEntryR\NAKnumRpcsFailedByMethodB\STX\CAN\SOH\DC2p\n\
+    \\DLEstats_per_method\CAN\EOT \ETX(\v2F.grpc.testing.LoadBalancerAccumulatedStatsResponse.StatsPerMethodEntryR\SOstatsPerMethod\SUBI\n\
+    \\ESCNumRpcsStartedByMethodEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUBK\n\
+    \\GSNumRpcsSucceededByMethodEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUBH\n\
+    \\SUBNumRpcsFailedByMethodEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB\207\SOH\n\
+    \\vMethodStats\DC2!\n\
+    \\frpcs_started\CAN\SOH \SOH(\ENQR\vrpcsStarted\DC2b\n\
+    \\ACKresult\CAN\STX \ETX(\v2J.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats.ResultEntryR\ACKresult\SUB9\n\
+    \\vResultEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\ENQR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB\129\SOH\n\
+    \\DC3StatsPerMethodEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2T\n\
+    \\ENQvalue\CAN\STX \SOH(\v2>.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStatsR\ENQvalue:\STX8\SOH\"\233\STX\n\
+    \\SYNClientConfigureRequest\DC2B\n\
+    \\ENQtypes\CAN\SOH \ETX(\SO2,.grpc.testing.ClientConfigureRequest.RpcTypeR\ENQtypes\DC2I\n\
+    \\bmetadata\CAN\STX \ETX(\v2-.grpc.testing.ClientConfigureRequest.MetadataR\bmetadata\DC2\US\n\
+    \\vtimeout_sec\CAN\ETX \SOH(\ENQR\n\
+    \timeoutSec\SUBt\n\
+    \\bMetadata\DC2@\n\
+    \\EOTtype\CAN\SOH \SOH(\SO2,.grpc.testing.ClientConfigureRequest.RpcTypeR\EOTtype\DC2\DLE\n\
+    \\ETXkey\CAN\STX \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\ETX \SOH(\tR\ENQvalue\")\n\
+    \\aRpcType\DC2\SO\n\
+    \\n\
+    \EMPTY_CALL\DLE\NUL\DC2\SO\n\
+    \\n\
+    \UNARY_CALL\DLE\SOH\"\EM\n\
+    \\ETBClientConfigureResponse\"\RS\n\
+    \\n\
+    \MemorySize\DC2\DLE\n\
+    \\ETXrss\CAN\SOH \SOH(\ETXR\ETXrss\"\139\ETX\n\
+    \\SOTestOrcaReport\DC2'\n\
+    \\SIcpu_utilization\CAN\SOH \SOH(\SOHR\SOcpuUtilization\DC2-\n\
+    \\DC2memory_utilization\CAN\STX \SOH(\SOHR\DC1memoryUtilization\DC2P\n\
+    \\frequest_cost\CAN\ETX \ETX(\v2-.grpc.testing.TestOrcaReport.RequestCostEntryR\vrequestCost\DC2O\n\
+    \\vutilization\CAN\EOT \ETX(\v2-.grpc.testing.TestOrcaReport.UtilizationEntryR\vutilization\SUB>\n\
+    \\DLERequestCostEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEUtilizationEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH\"\DEL\n\
+    \\SYNSetReturnStatusRequest\DC2-\n\
+    \\DC3grpc_code_to_return\CAN\SOH \SOH(\ENQR\DLEgrpcCodeToReturn\DC26\n\
+    \\ETBgrpc_status_description\CAN\STX \SOH(\tR\NAKgrpcStatusDescription\"\165\STX\n\
+    \\vHookRequest\DC2F\n\
+    \\acommand\CAN\SOH \SOH(\SO2,.grpc.testing.HookRequest.HookRequestCommandR\acommand\DC2-\n\
+    \\DC3grpc_code_to_return\CAN\STX \SOH(\ENQR\DLEgrpcCodeToReturn\DC26\n\
+    \\ETBgrpc_status_description\CAN\ETX \SOH(\tR\NAKgrpcStatusDescription\DC2\US\n\
+    \\vserver_port\CAN\EOT \SOH(\ENQR\n\
+    \serverPort\"F\n\
+    \\DC2HookRequestCommand\DC2\SI\n\
+    \\vUNSPECIFIED\DLE\NUL\DC2\t\n\
+    \\ENQSTART\DLE\SOH\DC2\b\n\
+    \\EOTSTOP\DLE\STX\DC2\n\
+    \\n\
+    \\ACKRETURN\DLE\ETX\"\SO\n\
+    \\fHookResponse*\US\n\
+    \\vPayloadType\DC2\DLE\n\
+    \\fCOMPRESSABLE\DLE\NUL*o\n\
+    \\SIGrpclbRouteType\DC2\GS\n\
+    \\EMGRPCLB_ROUTE_TYPE_UNKNOWN\DLE\NUL\DC2\RS\n\
+    \\SUBGRPCLB_ROUTE_TYPE_FALLBACK\DLE\SOH\DC2\GS\n\
+    \\EMGRPCLB_ROUTE_TYPE_BACKEND\DLE\STXB\GS\n\
+    \\ESCio.grpc.testing.integrationJ\171i\n\
+    \\a\DC2\ENQ\DLE\NUL\218\STX\SOH\n\
+    \\143\ENQ\n\
+    \\SOH\f\DC2\ETX\DLE\NUL\DC22\185\EOT Copyright 2015-2016 gRPC authors.\n\
+    \\n\
+    \ Licensed under the Apache License, Version 2.0 (the \"License\");\n\
+    \ you may not use this file except in compliance with the License.\n\
+    \ You may obtain a copy of the License at\n\
+    \\n\
+    \     http://www.apache.org/licenses/LICENSE-2.0\n\
+    \\n\
+    \ Unless required by applicable law or agreed to in writing, software\n\
+    \ distributed under the License is distributed on an \"AS IS\" BASIS,\n\
+    \ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+    \ See the License for the specific language governing permissions and\n\
+    \ limitations under the License.\n\
+    \2I Message definitions to be used by integration test service definitions.\n\
+    \\n\
+    \\b\n\
+    \\SOH\STX\DC2\ETX\DC2\NUL\NAK\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC4\NUL4\n\
+    \\t\n\
+    \\STX\b\SOH\DC2\ETX\DC4\NUL4\n\
+    \\164\SOH\n\
+    \\STX\EOT\NUL\DC2\EOT\EM\NUL\FS\SOH\SUB\151\SOH TODO(dgq): Go back to using well-known types once\n\
+    \ https://github.com/grpc/grpc/issues/6980 has been fixed.\n\
+    \ import \"google/protobuf/wrappers.proto\";\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX\EM\b\DC1\n\
+    \\RS\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\ESC\STX\DC1\SUB\DC1 The bool value.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\ESC\STX\ACK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\ESC\a\f\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\ESC\SI\DLE\n\
+    \:\n\
+    \\STX\ENQ\NUL\DC2\EOT\US\NUL\"\SOH\SUB. The type of payload that should be returned.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\ENQ\NUL\SOH\DC2\ETX\US\ENQ\DLE\n\
+    \(\n\
+    \\EOT\ENQ\NUL\STX\NUL\DC2\ETX!\STX\DC3\SUB\ESC Compressable text format.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\ETX!\STX\SO\n\
+    \\f\n\
+    \\ENQ\ENQ\NUL\STX\NUL\STX\DC2\ETX!\DC1\DC2\n\
+    \D\n\
+    \\STX\EOT\SOH\DC2\EOT%\NUL*\SOH\SUB8 A block of data, to simply increase gRPC message size.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\SOH\SOH\DC2\ETX%\b\SI\n\
+    \(\n\
+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX'\STX\ETB\SUB\ESC The type of data in body.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX'\STX\r\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX'\SO\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX'\NAK\SYN\n\
+    \+\n\
+    \\EOT\EOT\SOH\STX\SOH\DC2\ETX)\STX\DC1\SUB\RS Primary contents of payload.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\SOH\ENQ\DC2\ETX)\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX)\b\f\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX)\SI\DLE\n\
+    \\149\SOH\n\
+    \\STX\EOT\STX\DC2\EOT.\NUL1\SOH\SUB\136\SOH A protobuf representation for grpc status. This is used by test\n\
+    \ clients to specify a status that the server should attempt to return.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\STX\SOH\DC2\ETX.\b\DC2\n\
+    \\v\n\
+    \\EOT\EOT\STX\STX\NUL\DC2\ETX/\STX\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX/\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX/\b\f\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX/\SI\DLE\n\
+    \\v\n\
+    \\EOT\EOT\STX\STX\SOH\DC2\ETX0\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\SOH\ENQ\DC2\ETX0\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETX0\t\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETX0\DC3\DC4\n\
+    \\184\ETX\n\
+    \\STX\ENQ\SOH\DC2\EOT9\NUL@\SOH\SUB\171\ETX The type of route that a client took to reach a server w.r.t. gRPCLB.\n\
+    \ The server must fill in \"fallback\" if it detects that the RPC reached\n\
+    \ the server via the \"gRPCLB fallback\" path, and \"backend\" if it detects\n\
+    \ that the RPC reached the server via \"gRPCLB backend\" path (i.e. if it got\n\
+    \ the address of this server from the gRPCLB server BalanceLoad RPC). Exactly\n\
+    \ how this detection is done is context and server dependent.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\ENQ\SOH\SOH\DC2\ETX9\ENQ\DC4\n\
+    \M\n\
+    \\EOT\ENQ\SOH\STX\NUL\DC2\ETX;\STX \SUB@ Server didn't detect the route that a client took to reach it.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ENQ\SOH\STX\NUL\SOH\DC2\ETX;\STX\ESC\n\
+    \\f\n\
+    \\ENQ\ENQ\SOH\STX\NUL\STX\DC2\ETX;\RS\US\n\
+    \L\n\
+    \\EOT\ENQ\SOH\STX\SOH\DC2\ETX=\STX!\SUB? Indicates that a client reached a server via gRPCLB fallback.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ENQ\SOH\STX\SOH\SOH\DC2\ETX=\STX\FS\n\
+    \\f\n\
+    \\ENQ\ENQ\SOH\STX\SOH\STX\DC2\ETX=\US \n\
+    \R\n\
+    \\EOT\ENQ\SOH\STX\STX\DC2\ETX?\STX \SUBE Indicates that a client reached a server as a gRPCLB-given backend.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ENQ\SOH\STX\STX\SOH\DC2\ETX?\STX\ESC\n\
+    \\f\n\
+    \\ENQ\ENQ\SOH\STX\STX\STX\DC2\ETX?\RS\US\n\
+    \\FS\n\
+    \\STX\EOT\ETX\DC2\EOTC\NULh\SOH\SUB\DLE Unary request.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\ETX\SOH\DC2\ETXC\b\NAK\n\
+    \\146\SOH\n\
+    \\EOT\EOT\ETX\STX\NUL\DC2\ETXF\STX \SUB\132\SOH Desired payload type in the response from the server.\n\
+    \ If response_type is RANDOM, server randomly chooses one from other formats.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETXF\STX\r\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETXF\SO\ESC\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETXF\RS\US\n\
+    \D\n\
+    \\EOT\EOT\ETX\STX\SOH\DC2\ETXI\STX\SUB\SUB7 Desired payload size in the response from the server.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\SOH\ENQ\DC2\ETXI\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETXI\b\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETXI\CAN\EM\n\
+    \B\n\
+    \\EOT\EOT\ETX\STX\STX\DC2\ETXL\STX\SYN\SUB5 Optional input payload sent along with the request.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\STX\ACK\DC2\ETXL\STX\t\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\STX\SOH\DC2\ETXL\n\
+    \\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\STX\ETX\DC2\ETXL\DC4\NAK\n\
+    \>\n\
+    \\EOT\EOT\ETX\STX\ETX\DC2\ETXO\STX\EM\SUB1 Whether SimpleResponse should include username.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ETX\ENQ\DC2\ETXO\STX\ACK\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ETX\SOH\DC2\ETXO\a\DC4\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ETX\ETX\DC2\ETXO\ETB\CAN\n\
+    \A\n\
+    \\EOT\EOT\ETX\STX\EOT\DC2\ETXR\STX\FS\SUB4 Whether SimpleResponse should include OAuth scope.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\EOT\ENQ\DC2\ETXR\STX\ACK\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\EOT\SOH\DC2\ETXR\a\ETB\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\EOT\ETX\DC2\ETXR\SUB\ESC\n\
+    \\140\STX\n\
+    \\EOT\EOT\ETX\STX\ENQ\DC2\ETXX\STX$\SUB\254\SOH Whether to request the server to compress the response. This field is\n\
+    \ \"nullable\" in order to interoperate seamlessly with clients not able to\n\
+    \ implement the full compression tests by introspecting the call to verify\n\
+    \ the response's compression status.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ENQ\ACK\DC2\ETXX\STX\v\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ENQ\SOH\DC2\ETXX\f\US\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ENQ\ETX\DC2\ETXX\"#\n\
+    \:\n\
+    \\EOT\EOT\ETX\STX\ACK\DC2\ETX[\STX!\SUB- Whether server should return a given status\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ACK\ACK\DC2\ETX[\STX\f\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ACK\SOH\DC2\ETX[\r\FS\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\ACK\ETX\DC2\ETX[\US \n\
+    \N\n\
+    \\EOT\EOT\ETX\STX\a\DC2\ETX^\STX\"\SUBA Whether the server should expect this request to be compressed.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\a\ACK\DC2\ETX^\STX\v\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\a\SOH\DC2\ETX^\f\GS\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\a\ETX\DC2\ETX^ !\n\
+    \?\n\
+    \\EOT\EOT\ETX\STX\b\DC2\ETXa\STX\SUB\SUB2 Whether SimpleResponse should include server_id.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\b\ENQ\DC2\ETXa\STX\ACK\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\b\SOH\DC2\ETXa\a\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\b\ETX\DC2\ETXa\CAN\EM\n\
+    \G\n\
+    \\EOT\EOT\ETX\STX\t\DC2\ETXd\STX#\SUB: Whether SimpleResponse should include grpclb_route_type.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\t\ENQ\DC2\ETXd\STX\ACK\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\t\SOH\DC2\ETXd\a\GS\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\t\ETX\DC2\ETXd \"\n\
+    \\\\n\
+    \\EOT\EOT\ETX\STX\n\
+    \\DC2\ETXg\STX,\SUBO If set the server should record this metrics report data for the current RPC.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\n\
+    \\ACK\DC2\ETXg\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\n\
+    \\SOH\DC2\ETXg\DC1&\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\n\
+    \\ETX\DC2\ETXg)+\n\
+    \;\n\
+    \\STX\EOT\EOT\DC2\EOTk\NUL|\SOH\SUB/ Unary response, as configured by the request.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\EOT\SOH\DC2\ETXk\b\SYN\n\
+    \0\n\
+    \\EOT\EOT\EOT\STX\NUL\DC2\ETXm\STX\SYN\SUB# Payload to increase message size.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\ACK\DC2\ETXm\STX\t\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETXm\n\
+    \\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETXm\DC4\NAK\n\
+    \x\n\
+    \\EOT\EOT\EOT\STX\SOH\DC2\ETXp\STX\SYN\SUBk The user the request came from, for verifying authentication was\n\
+    \ successful when the client expected it.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\ENQ\DC2\ETXp\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\SOH\DC2\ETXp\t\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\ETX\DC2\ETXp\DC4\NAK\n\
+    \\ESC\n\
+    \\EOT\EOT\EOT\STX\STX\DC2\ETXr\STX\EM\SUB\SO OAuth scope.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\STX\ENQ\DC2\ETXr\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\STX\SOH\DC2\ETXr\t\DC4\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\STX\ETX\DC2\ETXr\ETB\CAN\n\
+    \\149\SOH\n\
+    \\EOT\EOT\EOT\STX\ETX\DC2\ETXv\STX\ETB\SUB\135\SOH Server ID. This must be unique among different server instances,\n\
+    \ but the same across all RPC's made to a particular server instance.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ETX\ENQ\DC2\ETXv\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ETX\SOH\DC2\ETXv\t\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ETX\ETX\DC2\ETXv\NAK\SYN\n\
+    \\ESC\n\
+    \\EOT\EOT\EOT\STX\EOT\DC2\ETXx\STX(\SUB\SO gRPCLB Path.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\EOT\ACK\DC2\ETXx\STX\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\EOT\SOH\DC2\ETXx\DC2#\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\EOT\ETX\DC2\ETXx&'\n\
+    \\US\n\
+    \\EOT\EOT\EOT\STX\ENQ\DC2\ETX{\STX\SYN\SUB\DC2 Server hostname.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ENQ\ENQ\DC2\ETX{\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ENQ\SOH\DC2\ETX{\t\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ENQ\ETX\DC2\ETX{\DC4\NAK\n\
+    \(\n\
+    \\STX\EOT\ENQ\DC2\ENQ\DEL\NUL\138\SOH\SOH\SUB\ESC Client-streaming request.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\ENQ\SOH\DC2\ETX\DEL\b!\n\
+    \C\n\
+    \\EOT\EOT\ENQ\STX\NUL\DC2\EOT\129\SOH\STX\SYN\SUB5 Optional input payload sent along with the request.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\ENQ\STX\NUL\ACK\DC2\EOT\129\SOH\STX\t\n\
+    \\r\n\
+    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\EOT\129\SOH\n\
+    \\DC1\n\
+    \\r\n\
+    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\EOT\129\SOH\DC4\NAK\n\
+    \\148\STX\n\
+    \\EOT\EOT\ENQ\STX\SOH\DC2\EOT\135\SOH\STX\"\SUB\133\STX Whether the server should expect this request to be compressed. This field\n\
+    \ is \"nullable\" in order to interoperate seamlessly with servers not able to\n\
+    \ implement the full compression tests by introspecting the call to verify\n\
+    \ the request's compression status.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\ENQ\STX\SOH\ACK\DC2\EOT\135\SOH\STX\v\n\
+    \\r\n\
+    \\ENQ\EOT\ENQ\STX\SOH\SOH\DC2\EOT\135\SOH\f\GS\n\
+    \\r\n\
+    \\ENQ\EOT\ENQ\STX\SOH\ETX\DC2\EOT\135\SOH !\n\
+    \*\n\
+    \\STX\EOT\ACK\DC2\ACK\141\SOH\NUL\144\SOH\SOH\SUB\FS Client-streaming response.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\ACK\SOH\DC2\EOT\141\SOH\b\"\n\
+    \E\n\
+    \\EOT\EOT\ACK\STX\NUL\DC2\EOT\143\SOH\STX$\SUB7 Aggregated size of payloads received from the client.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\ACK\STX\NUL\ENQ\DC2\EOT\143\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\ACK\STX\NUL\SOH\DC2\EOT\143\SOH\b\US\n\
+    \\r\n\
+    \\ENQ\EOT\ACK\STX\NUL\ETX\DC2\EOT\143\SOH\"#\n\
+    \8\n\
+    \\STX\EOT\a\DC2\ACK\147\SOH\NUL\160\SOH\SOH\SUB* Configuration for a particular response.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\a\SOH\DC2\EOT\147\SOH\b\SUB\n\
+    \C\n\
+    \\EOT\EOT\a\STX\NUL\DC2\EOT\149\SOH\STX\DC1\SUB5 Desired payload sizes in responses from the server.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\NUL\ENQ\DC2\EOT\149\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\NUL\SOH\DC2\EOT\149\SOH\b\f\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\NUL\ETX\DC2\EOT\149\SOH\SI\DLE\n\
+    \g\n\
+    \\EOT\EOT\a\STX\SOH\DC2\EOT\153\SOH\STX\CAN\SUBY Desired interval between consecutive responses in the response stream in\n\
+    \ microseconds.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\SOH\ENQ\DC2\EOT\153\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\SOH\SOH\DC2\EOT\153\SOH\b\DC3\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\SOH\ETX\DC2\EOT\153\SOH\SYN\ETB\n\
+    \\141\STX\n\
+    \\EOT\EOT\a\STX\STX\DC2\EOT\159\SOH\STX\ESC\SUB\254\SOH Whether to request the server to compress the response. This field is\n\
+    \ \"nullable\" in order to interoperate seamlessly with clients not able to\n\
+    \ implement the full compression tests by introspecting the call to verify\n\
+    \ the response's compression status.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\STX\ACK\DC2\EOT\159\SOH\STX\v\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\STX\SOH\DC2\EOT\159\SOH\f\SYN\n\
+    \\r\n\
+    \\ENQ\EOT\a\STX\STX\ETX\DC2\EOT\159\SOH\EM\SUB\n\
+    \)\n\
+    \\STX\EOT\b\DC2\ACK\163\SOH\NUL\181\SOH\SOH\SUB\ESC Server-streaming request.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\b\SOH\DC2\EOT\163\SOH\b\"\n\
+    \\227\SOH\n\
+    \\EOT\EOT\b\STX\NUL\DC2\EOT\168\SOH\STX \SUB\212\SOH Desired payload type in the response from the server.\n\
+    \ If response_type is RANDOM, the payload from each response in the stream\n\
+    \ might be of different types. This is to simulate a mixed type of payload\n\
+    \ stream.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\NUL\ACK\DC2\EOT\168\SOH\STX\r\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\NUL\SOH\DC2\EOT\168\SOH\SO\ESC\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\NUL\ETX\DC2\EOT\168\SOH\RS\US\n\
+    \A\n\
+    \\EOT\EOT\b\STX\SOH\DC2\EOT\171\SOH\STX6\SUB3 Configuration for each expected response message.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\SOH\EOT\DC2\EOT\171\SOH\STX\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\SOH\ACK\DC2\EOT\171\SOH\v\GS\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\SOH\SOH\DC2\EOT\171\SOH\RS1\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\SOH\ETX\DC2\EOT\171\SOH45\n\
+    \C\n\
+    \\EOT\EOT\b\STX\STX\DC2\EOT\174\SOH\STX\SYN\SUB5 Optional input payload sent along with the request.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\STX\ACK\DC2\EOT\174\SOH\STX\t\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\STX\SOH\DC2\EOT\174\SOH\n\
+    \\DC1\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\STX\ETX\DC2\EOT\174\SOH\DC4\NAK\n\
+    \;\n\
+    \\EOT\EOT\b\STX\ETX\DC2\EOT\177\SOH\STX!\SUB- Whether server should return a given status\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\ETX\ACK\DC2\EOT\177\SOH\STX\f\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\ETX\SOH\DC2\EOT\177\SOH\r\FS\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\ETX\ETX\DC2\EOT\177\SOH\US \n\
+    \[\n\
+    \\EOT\EOT\b\STX\EOT\DC2\EOT\180\SOH\STX%\SUBM If set the server should update this metrics report data at the OOB server.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\EOT\ACK\DC2\EOT\180\SOH\STX\DLE\n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\EOT\SOH\DC2\EOT\180\SOH\DC1 \n\
+    \\r\n\
+    \\ENQ\EOT\b\STX\EOT\ETX\DC2\EOT\180\SOH#$\n\
+    \W\n\
+    \\STX\EOT\t\DC2\ACK\184\SOH\NUL\187\SOH\SOH\SUBI Server-streaming response, as configured by the request and parameters.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\t\SOH\DC2\EOT\184\SOH\b#\n\
+    \2\n\
+    \\EOT\EOT\t\STX\NUL\DC2\EOT\186\SOH\STX\SYN\SUB$ Payload to increase response size.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\t\STX\NUL\ACK\DC2\EOT\186\SOH\STX\t\n\
+    \\r\n\
+    \\ENQ\EOT\t\STX\NUL\SOH\DC2\EOT\186\SOH\n\
+    \\DC1\n\
+    \\r\n\
+    \\ENQ\EOT\t\STX\NUL\ETX\DC2\EOT\186\SOH\DC4\NAK\n\
+    \k\n\
+    \\STX\EOT\n\
+    \\DC2\ACK\191\SOH\NUL\193\SOH\SOH\SUB] For reconnect interop test only.\n\
+    \ Client tells server what reconnection parameters it used.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\n\
+    \\SOH\DC2\EOT\191\SOH\b\ETB\n\
+    \\f\n\
+    \\EOT\EOT\n\
+    \\STX\NUL\DC2\EOT\192\SOH\STX%\n\
+    \\r\n\
+    \\ENQ\EOT\n\
+    \\STX\NUL\ENQ\DC2\EOT\192\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\n\
+    \\STX\NUL\SOH\DC2\EOT\192\SOH\b \n\
+    \\r\n\
+    \\ENQ\EOT\n\
+    \\STX\NUL\ETX\DC2\EOT\192\SOH#$\n\
+    \\152\SOH\n\
+    \\STX\EOT\v\DC2\ACK\198\SOH\NUL\201\SOH\SOH\SUB\137\SOH For reconnect interop test only.\n\
+    \ Server tells client whether its reconnects are following the spec and the\n\
+    \ reconnect backoffs it saw.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\v\SOH\DC2\EOT\198\SOH\b\NAK\n\
+    \\f\n\
+    \\EOT\EOT\v\STX\NUL\DC2\EOT\199\SOH\STX\DC2\n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\NUL\ENQ\DC2\EOT\199\SOH\STX\ACK\n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\NUL\SOH\DC2\EOT\199\SOH\a\r\n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\NUL\ETX\DC2\EOT\199\SOH\DLE\DC1\n\
+    \\f\n\
+    \\EOT\EOT\v\STX\SOH\DC2\EOT\200\SOH\STX \n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\SOH\EOT\DC2\EOT\200\SOH\STX\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\SOH\ENQ\DC2\EOT\200\SOH\v\DLE\n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\SOH\SOH\DC2\EOT\200\SOH\DC1\ESC\n\
+    \\r\n\
+    \\ENQ\EOT\v\STX\SOH\ETX\DC2\EOT\200\SOH\RS\US\n\
+    \\f\n\
+    \\STX\EOT\f\DC2\ACK\203\SOH\NUL\212\SOH\SOH\n\
+    \\v\n\
+    \\ETX\EOT\f\SOH\DC2\EOT\203\SOH\b \n\
+    \C\n\
+    \\EOT\EOT\f\STX\NUL\DC2\EOT\205\SOH\STX\NAK\SUB5 Request stats for the next num_rpcs sent by client.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\NUL\ENQ\DC2\EOT\205\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\NUL\SOH\DC2\EOT\205\SOH\b\DLE\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\NUL\ETX\DC2\EOT\205\SOH\DC3\DC4\n\
+    \Z\n\
+    \\EOT\EOT\f\STX\SOH\DC2\EOT\207\SOH\STX\CAN\SUBL If num_rpcs have not completed within timeout_sec, return partial results.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\SOH\ENQ\DC2\EOT\207\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\SOH\SOH\DC2\EOT\207\SOH\b\DC3\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\SOH\ETX\DC2\EOT\207\SOH\SYN\ETB\n\
+    \\224\SOH\n\
+    \\EOT\EOT\f\STX\STX\DC2\EOT\211\SOH\STX$\SUB\209\SOH Response header + trailer metadata entries we want the values of.\n\
+    \ Matching of the keys is case-insensitive as per rfc7540#section-8.1.2\n\
+    \ * (asterisk) is a special value that will return all metadata entries\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\STX\EOT\DC2\EOT\211\SOH\STX\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\STX\ENQ\DC2\EOT\211\SOH\v\DC1\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\STX\SOH\DC2\EOT\211\SOH\DC2\US\n\
+    \\r\n\
+    \\ENQ\EOT\f\STX\STX\ETX\DC2\EOT\211\SOH\"#\n\
+    \\f\n\
+    \\STX\EOT\r\DC2\ACK\214\SOH\NUL\249\SOH\SOH\n\
+    \\v\n\
+    \\ETX\EOT\r\SOH\DC2\EOT\214\SOH\b!\n\
+    \\SO\n\
+    \\EOT\EOT\r\EOT\NUL\DC2\ACK\215\SOH\STX\219\SOH\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\r\EOT\NUL\SOH\DC2\EOT\215\SOH\a\DC3\n\
+    \\SO\n\
+    \\ACK\EOT\r\EOT\NUL\STX\NUL\DC2\EOT\216\SOH\EOT\DLE\n\
+    \\SI\n\
+    \\a\EOT\r\EOT\NUL\STX\NUL\SOH\DC2\EOT\216\SOH\EOT\v\n\
+    \\SI\n\
+    \\a\EOT\r\EOT\NUL\STX\NUL\STX\DC2\EOT\216\SOH\SO\SI\n\
+    \\SO\n\
+    \\ACK\EOT\r\EOT\NUL\STX\SOH\DC2\EOT\217\SOH\EOT\DLE\n\
+    \\SI\n\
+    \\a\EOT\r\EOT\NUL\STX\SOH\SOH\DC2\EOT\217\SOH\EOT\v\n\
+    \\SI\n\
+    \\a\EOT\r\EOT\NUL\STX\SOH\STX\DC2\EOT\217\SOH\SO\SI\n\
+    \\SO\n\
+    \\ACK\EOT\r\EOT\NUL\STX\STX\DC2\EOT\218\SOH\EOT\DC1\n\
+    \\SI\n\
+    \\a\EOT\r\EOT\NUL\STX\STX\SOH\DC2\EOT\218\SOH\EOT\f\n\
+    \\SI\n\
+    \\a\EOT\r\EOT\NUL\STX\STX\STX\DC2\EOT\218\SOH\SI\DLE\n\
+    \\SO\n\
+    \\EOT\EOT\r\ETX\NUL\DC2\ACK\220\SOH\STX\228\SOH\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\r\ETX\NUL\SOH\DC2\EOT\220\SOH\n\
+    \\ETB\n\
+    \\139\SOH\n\
+    \\ACK\EOT\r\ETX\NUL\STX\NUL\DC2\EOT\223\SOH\EOT\DC3\SUB{ Key, exactly as received from the server. Case may be different from what\n\
+    \ was requested in the LoadBalancerStatsRequest)\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\NUL\ENQ\DC2\EOT\223\SOH\EOT\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\NUL\SOH\DC2\EOT\223\SOH\v\SO\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\NUL\ETX\DC2\EOT\223\SOH\DC1\DC2\n\
+    \=\n\
+    \\ACK\EOT\r\ETX\NUL\STX\SOH\DC2\EOT\225\SOH\EOT\NAK\SUB- Value, exactly as received from the server.\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\SOH\ENQ\DC2\EOT\225\SOH\EOT\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\SOH\SOH\DC2\EOT\225\SOH\v\DLE\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\SOH\ETX\DC2\EOT\225\SOH\DC3\DC4\n\
+    \\US\n\
+    \\ACK\EOT\r\ETX\NUL\STX\STX\DC2\EOT\227\SOH\EOT\SUB\SUB\SI Metadata type\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\STX\ACK\DC2\EOT\227\SOH\EOT\DLE\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\STX\SOH\DC2\EOT\227\SOH\DC1\NAK\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\NUL\STX\STX\ETX\DC2\EOT\227\SOH\CAN\EM\n\
+    \\SO\n\
+    \\EOT\EOT\r\ETX\SOH\DC2\ACK\229\SOH\STX\233\SOH\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\r\ETX\SOH\SOH\DC2\EOT\229\SOH\n\
+    \\NAK\n\
+    \q\n\
+    \\ACK\EOT\r\ETX\SOH\STX\NUL\DC2\EOT\232\SOH\EOT(\SUBa metadata values for each rpc for the keys specified in\n\
+    \ LoadBalancerStatsRequest.metadata_keys.\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\SOH\STX\NUL\EOT\DC2\EOT\232\SOH\EOT\f\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\SOH\STX\NUL\ACK\DC2\EOT\232\SOH\r\SUB\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\SOH\STX\NUL\SOH\DC2\EOT\232\SOH\ESC#\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\SOH\STX\NUL\ETX\DC2\EOT\232\SOH&'\n\
+    \\SO\n\
+    \\EOT\EOT\r\ETX\STX\DC2\ACK\234\SOH\STX\237\SOH\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\r\ETX\STX\SOH\DC2\EOT\234\SOH\n\
+    \\CAN\n\
+    \G\n\
+    \\ACK\EOT\r\ETX\STX\STX\NUL\DC2\EOT\236\SOH\EOT*\SUB7 List of RpcMetadata in for each RPC with a given peer\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\STX\STX\NUL\EOT\DC2\EOT\236\SOH\EOT\f\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\STX\STX\NUL\ACK\DC2\EOT\236\SOH\r\CAN\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\STX\STX\NUL\SOH\DC2\EOT\236\SOH\EM%\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\STX\STX\NUL\ETX\DC2\EOT\236\SOH()\n\
+    \\SO\n\
+    \\EOT\EOT\r\ETX\ETX\DC2\ACK\238\SOH\STX\241\SOH\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\r\ETX\ETX\SOH\DC2\EOT\238\SOH\n\
+    \\DC4\n\
+    \=\n\
+    \\ACK\EOT\r\ETX\ETX\STX\NUL\DC2\EOT\240\SOH\EOT(\SUB- The number of completed RPCs for each peer.\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\ETX\STX\NUL\ACK\DC2\EOT\240\SOH\EOT\SYN\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\ETX\STX\NUL\SOH\DC2\EOT\240\SOH\ETB#\n\
+    \\SI\n\
+    \\a\EOT\r\ETX\ETX\STX\NUL\ETX\DC2\EOT\240\SOH&'\n\
+    \;\n\
+    \\EOT\EOT\r\STX\NUL\DC2\EOT\243\SOH\STX&\SUB- The number of completed RPCs for each peer.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\NUL\ACK\DC2\EOT\243\SOH\STX\DC4\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\NUL\SOH\DC2\EOT\243\SOH\NAK!\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\NUL\ETX\DC2\EOT\243\SOH$%\n\
+    \G\n\
+    \\EOT\EOT\r\STX\SOH\DC2\EOT\245\SOH\STX\EM\SUB9 The number of RPCs that failed to record a remote peer.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\SOH\ENQ\DC2\EOT\245\SOH\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\SOH\SOH\DC2\EOT\245\SOH\b\DC4\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\SOH\ETX\DC2\EOT\245\SOH\ETB\CAN\n\
+    \\f\n\
+    \\EOT\EOT\r\STX\STX\DC2\EOT\246\SOH\STX-\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\STX\ACK\DC2\EOT\246\SOH\STX\EM\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\STX\SOH\DC2\EOT\246\SOH\SUB(\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\STX\ETX\DC2\EOT\246\SOH+,\n\
+    \;\n\
+    \\EOT\EOT\r\STX\ETX\DC2\EOT\248\SOH\STX4\SUB- All the metadata of all RPCs for each peer.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\ETX\ACK\DC2\EOT\248\SOH\STX\GS\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\ETX\SOH\DC2\EOT\248\SOH\RS/\n\
+    \\r\n\
+    \\ENQ\EOT\r\STX\ETX\ETX\DC2\EOT\248\SOH23\n\
+    \G\n\
+    \\STX\EOT\SO\DC2\EOT\252\SOH\NUL.\SUB; Request for retrieving a test client's accumulated stats.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\SO\SOH\DC2\EOT\252\SOH\b+\n\
+    \A\n\
+    \\STX\EOT\SI\DC2\ACK\255\SOH\NUL\150\STX\SOH\SUB3 Accumulated stats for RPCs sent by a test client.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\SI\SOH\DC2\EOT\255\SOH\b,\n\
+    \\128\SOH\n\
+    \\EOT\EOT\SI\STX\NUL\DC2\EOT\130\STX\STXH\SUBr The total number of RPCs have ever issued for each type.\n\
+    \ Deprecated: use stats_per_method.rpcs_started instead.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\NUL\ACK\DC2\EOT\130\STX\STX\DC4\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\NUL\SOH\DC2\EOT\130\STX\NAK/\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\NUL\ETX\DC2\EOT\130\STX23\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\NUL\b\DC2\EOT\130\STX4G\n\
+    \\SO\n\
+    \\ACK\EOT\SI\STX\NUL\b\ETX\DC2\EOT\130\STX5F\n\
+    \\138\SOH\n\
+    \\EOT\EOT\SI\STX\SOH\DC2\EOT\133\STX\STXJ\SUB| The total number of RPCs have ever completed successfully for each type.\n\
+    \ Deprecated: use stats_per_method.result instead.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\SOH\ACK\DC2\EOT\133\STX\STX\DC4\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\SOH\SOH\DC2\EOT\133\STX\NAK1\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\SOH\ETX\DC2\EOT\133\STX45\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\SOH\b\DC2\EOT\133\STX6I\n\
+    \\SO\n\
+    \\ACK\EOT\SI\STX\SOH\b\ETX\DC2\EOT\133\STX7H\n\
+    \z\n\
+    \\EOT\EOT\SI\STX\STX\DC2\EOT\136\STX\STXG\SUBl The total number of RPCs have ever failed for each type.\n\
+    \ Deprecated: use stats_per_method.result instead.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\STX\ACK\DC2\EOT\136\STX\STX\DC4\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\STX\SOH\DC2\EOT\136\STX\NAK.\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\STX\ETX\DC2\EOT\136\STX12\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\STX\b\DC2\EOT\136\STX3F\n\
+    \\SO\n\
+    \\ACK\EOT\SI\STX\STX\b\ETX\DC2\EOT\136\STX4E\n\
+    \\SO\n\
+    \\EOT\EOT\SI\ETX\ETX\DC2\ACK\138\STX\STX\145\STX\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\SI\ETX\ETX\SOH\DC2\EOT\138\STX\n\
+    \\NAK\n\
+    \G\n\
+    \\ACK\EOT\SI\ETX\ETX\STX\NUL\DC2\EOT\140\STX\EOT\ESC\SUB7 The number of RPCs that were started for this method.\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\SI\ETX\ETX\STX\NUL\ENQ\DC2\EOT\140\STX\EOT\t\n\
+    \\SI\n\
+    \\a\EOT\SI\ETX\ETX\STX\NUL\SOH\DC2\EOT\140\STX\n\
+    \\SYN\n\
+    \\SI\n\
+    \\a\EOT\SI\ETX\ETX\STX\NUL\ETX\DC2\EOT\140\STX\EM\SUB\n\
+    \\164\SOH\n\
+    \\ACK\EOT\SI\ETX\ETX\STX\SOH\DC2\EOT\144\STX\EOT!\SUB\147\SOH The number of RPCs that completed with each status for this method.  The\n\
+    \ key is the integral value of a google.rpc.Code; the value is the count.\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\SI\ETX\ETX\STX\SOH\ACK\DC2\EOT\144\STX\EOT\NAK\n\
+    \\SI\n\
+    \\a\EOT\SI\ETX\ETX\STX\SOH\SOH\DC2\EOT\144\STX\SYN\FS\n\
+    \\SI\n\
+    \\a\EOT\SI\ETX\ETX\STX\SOH\ETX\DC2\EOT\144\STX\US \n\
+    \u\n\
+    \\EOT\EOT\SI\STX\ETX\DC2\EOT\149\STX\STX0\SUBg Per-method RPC statistics.  The key is the RpcType in string form; e.g.\n\
+    \ 'EMPTY_CALL' or 'UNARY_CALL'\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\ETX\ACK\DC2\EOT\149\STX\STX\SUB\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\ETX\SOH\DC2\EOT\149\STX\ESC+\n\
+    \\r\n\
+    \\ENQ\EOT\SI\STX\ETX\ETX\DC2\EOT\149\STX./\n\
+    \1\n\
+    \\STX\EOT\DLE\DC2\ACK\153\STX\NUL\174\STX\SOH\SUB# Configurations for a test client.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\DLE\SOH\DC2\EOT\153\STX\b\RS\n\
+    \'\n\
+    \\EOT\EOT\DLE\EOT\NUL\DC2\ACK\155\STX\STX\158\STX\ETX\SUB\ETB Type of RPCs to send.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\EOT\NUL\SOH\DC2\EOT\155\STX\a\SO\n\
+    \\SO\n\
+    \\ACK\EOT\DLE\EOT\NUL\STX\NUL\DC2\EOT\156\STX\EOT\DC3\n\
+    \\SI\n\
+    \\a\EOT\DLE\EOT\NUL\STX\NUL\SOH\DC2\EOT\156\STX\EOT\SO\n\
+    \\SI\n\
+    \\a\EOT\DLE\EOT\NUL\STX\NUL\STX\DC2\EOT\156\STX\DC1\DC2\n\
+    \\SO\n\
+    \\ACK\EOT\DLE\EOT\NUL\STX\SOH\DC2\EOT\157\STX\EOT\DC3\n\
+    \\SI\n\
+    \\a\EOT\DLE\EOT\NUL\STX\SOH\SOH\DC2\EOT\157\STX\EOT\SO\n\
+    \\SI\n\
+    \\a\EOT\DLE\EOT\NUL\STX\SOH\STX\DC2\EOT\157\STX\DC1\DC2\n\
+    \E\n\
+    \\EOT\EOT\DLE\ETX\NUL\DC2\ACK\161\STX\STX\165\STX\ETX\SUB5 Metadata to be attached for the given type of RPCs.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\ETX\NUL\SOH\DC2\EOT\161\STX\n\
+    \\DC2\n\
+    \\SO\n\
+    \\ACK\EOT\DLE\ETX\NUL\STX\NUL\DC2\EOT\162\STX\EOT\NAK\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\NUL\ACK\DC2\EOT\162\STX\EOT\v\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\NUL\SOH\DC2\EOT\162\STX\f\DLE\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\NUL\ETX\DC2\EOT\162\STX\DC3\DC4\n\
+    \\SO\n\
+    \\ACK\EOT\DLE\ETX\NUL\STX\SOH\DC2\EOT\163\STX\EOT\DC3\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\SOH\ENQ\DC2\EOT\163\STX\EOT\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\SOH\SOH\DC2\EOT\163\STX\v\SO\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\SOH\ETX\DC2\EOT\163\STX\DC1\DC2\n\
+    \\SO\n\
+    \\ACK\EOT\DLE\ETX\NUL\STX\STX\DC2\EOT\164\STX\EOT\NAK\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\STX\ENQ\DC2\EOT\164\STX\EOT\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\STX\SOH\DC2\EOT\164\STX\v\DLE\n\
+    \\SI\n\
+    \\a\EOT\DLE\ETX\NUL\STX\STX\ETX\DC2\EOT\164\STX\DC3\DC4\n\
+    \3\n\
+    \\EOT\EOT\DLE\STX\NUL\DC2\EOT\168\STX\STX\GS\SUB% The types of RPCs the client sends.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\NUL\EOT\DC2\EOT\168\STX\STX\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\NUL\ACK\DC2\EOT\168\STX\v\DC2\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\NUL\SOH\DC2\EOT\168\STX\DC3\CAN\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\NUL\ETX\DC2\EOT\168\STX\ESC\FS\n\
+    \\\\n\
+    \\EOT\EOT\DLE\STX\SOH\DC2\EOT\170\STX\STX!\SUBN The collection of custom metadata to be attached to RPCs sent by the client.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\SOH\EOT\DC2\EOT\170\STX\STX\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\SOH\ACK\DC2\EOT\170\STX\v\DC3\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\SOH\SOH\DC2\EOT\170\STX\DC4\FS\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\SOH\ETX\DC2\EOT\170\STX\US \n\
+    \\137\SOH\n\
+    \\EOT\EOT\DLE\STX\STX\DC2\EOT\173\STX\STX\CAN\SUB{ The deadline to use, in seconds, for all RPCs.  If unset or zero, the\n\
+    \ client will use the default from the command-line.\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\STX\ENQ\DC2\EOT\173\STX\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\STX\SOH\DC2\EOT\173\STX\b\DC3\n\
+    \\r\n\
+    \\ENQ\EOT\DLE\STX\STX\ETX\DC2\EOT\173\STX\SYN\ETB\n\
+    \B\n\
+    \\STX\EOT\DC1\DC2\EOT\177\STX\NUL\"\SUB6 Response for updating a test client's configuration.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\DC1\SOH\DC2\EOT\177\STX\b\US\n\
+    \\f\n\
+    \\STX\EOT\DC2\DC2\ACK\179\STX\NUL\181\STX\SOH\n\
+    \\v\n\
+    \\ETX\EOT\DC2\SOH\DC2\EOT\179\STX\b\DC2\n\
+    \\f\n\
+    \\EOT\EOT\DC2\STX\NUL\DC2\EOT\180\STX\STX\DLE\n\
+    \\r\n\
+    \\ENQ\EOT\DC2\STX\NUL\ENQ\DC2\EOT\180\STX\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\DC2\STX\NUL\SOH\DC2\EOT\180\STX\b\v\n\
+    \\r\n\
+    \\ENQ\EOT\DC2\STX\NUL\ETX\DC2\EOT\180\STX\SO\SI\n\
+    \\181\STX\n\
+    \\STX\EOT\DC3\DC2\ACK\186\STX\NUL\191\STX\SOH\SUB\166\STX Metrics data the server will update and send to the client. It mirrors orca load report\n\
+    \ https://github.com/cncf/xds/blob/eded343319d09f30032952beda9840bbd3dcf7ac/xds/data/orca/v3/orca_load_report.proto#L15,\n\
+    \ but avoids orca dependency. Used by both per-query and out-of-band reporting tests.\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\DC3\SOH\DC2\EOT\186\STX\b\SYN\n\
+    \\f\n\
+    \\EOT\EOT\DC3\STX\NUL\DC2\EOT\187\STX\STX\GS\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\NUL\ENQ\DC2\EOT\187\STX\STX\b\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\NUL\SOH\DC2\EOT\187\STX\t\CAN\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\NUL\ETX\DC2\EOT\187\STX\ESC\FS\n\
+    \\f\n\
+    \\EOT\EOT\DC3\STX\SOH\DC2\EOT\188\STX\STX \n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\SOH\ENQ\DC2\EOT\188\STX\STX\b\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\SOH\SOH\DC2\EOT\188\STX\t\ESC\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\SOH\ETX\DC2\EOT\188\STX\RS\US\n\
+    \\f\n\
+    \\EOT\EOT\DC3\STX\STX\DC2\EOT\189\STX\STX'\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\STX\ACK\DC2\EOT\189\STX\STX\NAK\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\STX\SOH\DC2\EOT\189\STX\SYN\"\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\STX\ETX\DC2\EOT\189\STX%&\n\
+    \\f\n\
+    \\EOT\EOT\DC3\STX\ETX\DC2\EOT\190\STX\STX&\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\ETX\ACK\DC2\EOT\190\STX\STX\NAK\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\ETX\SOH\DC2\EOT\190\STX\SYN!\n\
+    \\r\n\
+    \\ENQ\EOT\DC3\STX\ETX\ETX\DC2\EOT\190\STX$%\n\
+    \H\n\
+    \\STX\EOT\DC4\DC2\ACK\194\STX\NUL\197\STX\SOH\SUB: Status that will be return to callers of the Hook method\n\
+    \\n\
+    \\v\n\
+    \\ETX\EOT\DC4\SOH\DC2\EOT\194\STX\b\RS\n\
+    \\f\n\
+    \\EOT\EOT\DC4\STX\NUL\DC2\EOT\195\STX\STX \n\
+    \\r\n\
+    \\ENQ\EOT\DC4\STX\NUL\ENQ\DC2\EOT\195\STX\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\DC4\STX\NUL\SOH\DC2\EOT\195\STX\b\ESC\n\
+    \\r\n\
+    \\ENQ\EOT\DC4\STX\NUL\ETX\DC2\EOT\195\STX\RS\US\n\
+    \\f\n\
+    \\EOT\EOT\DC4\STX\SOH\DC2\EOT\196\STX\STX%\n\
+    \\r\n\
+    \\ENQ\EOT\DC4\STX\SOH\ENQ\DC2\EOT\196\STX\STX\b\n\
+    \\r\n\
+    \\ENQ\EOT\DC4\STX\SOH\SOH\DC2\EOT\196\STX\t \n\
+    \\r\n\
+    \\ENQ\EOT\DC4\STX\SOH\ETX\DC2\EOT\196\STX#$\n\
+    \\f\n\
+    \\STX\EOT\NAK\DC2\ACK\199\STX\NUL\215\STX\SOH\n\
+    \\v\n\
+    \\ETX\EOT\NAK\SOH\DC2\EOT\199\STX\b\DC3\n\
+    \\SO\n\
+    \\EOT\EOT\NAK\EOT\NUL\DC2\ACK\200\STX\STX\209\STX\ETX\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\EOT\NUL\SOH\DC2\EOT\200\STX\a\EM\n\
+    \\US\n\
+    \\ACK\EOT\NAK\EOT\NUL\STX\NUL\DC2\EOT\202\STX\EOT\DC4\SUB\SI Default value\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\NUL\SOH\DC2\EOT\202\STX\EOT\SI\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\NUL\STX\DC2\EOT\202\STX\DC2\DC3\n\
+    \)\n\
+    \\ACK\EOT\NAK\EOT\NUL\STX\SOH\DC2\EOT\204\STX\EOT\SO\SUB\EM Start the HTTP endpoint\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\SOH\SOH\DC2\EOT\204\STX\EOT\t\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\SOH\STX\DC2\EOT\204\STX\f\r\n\
+    \\SYN\n\
+    \\ACK\EOT\NAK\EOT\NUL\STX\STX\DC2\EOT\206\STX\EOT\r\SUB\ACK Stop\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\STX\SOH\DC2\EOT\206\STX\EOT\b\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\STX\STX\DC2\EOT\206\STX\v\f\n\
+    \+\n\
+    \\ACK\EOT\NAK\EOT\NUL\STX\ETX\DC2\EOT\208\STX\EOT\SI\SUB\ESC Return from HTTP GET/POST\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\ETX\SOH\DC2\EOT\208\STX\EOT\n\
+    \\n\
+    \\SI\n\
+    \\a\EOT\NAK\EOT\NUL\STX\ETX\STX\DC2\EOT\208\STX\r\SO\n\
+    \\f\n\
+    \\EOT\EOT\NAK\STX\NUL\DC2\EOT\210\STX\STX!\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\NUL\ACK\DC2\EOT\210\STX\STX\DC4\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\NUL\SOH\DC2\EOT\210\STX\NAK\FS\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\NUL\ETX\DC2\EOT\210\STX\US \n\
+    \\f\n\
+    \\EOT\EOT\NAK\STX\SOH\DC2\EOT\211\STX\STX \n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\SOH\ENQ\DC2\EOT\211\STX\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\SOH\SOH\DC2\EOT\211\STX\b\ESC\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\SOH\ETX\DC2\EOT\211\STX\RS\US\n\
+    \\f\n\
+    \\EOT\EOT\NAK\STX\STX\DC2\EOT\212\STX\STX%\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\STX\ENQ\DC2\EOT\212\STX\STX\b\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\STX\SOH\DC2\EOT\212\STX\t \n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\STX\ETX\DC2\EOT\212\STX#$\n\
+    \(\n\
+    \\EOT\EOT\NAK\STX\ETX\DC2\EOT\214\STX\STX\CAN\SUB\SUB Server port to listen to\n\
+    \\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\ETX\ENQ\DC2\EOT\214\STX\STX\a\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\ETX\SOH\DC2\EOT\214\STX\b\DC3\n\
+    \\r\n\
+    \\ENQ\EOT\NAK\STX\ETX\ETX\DC2\EOT\214\STX\SYN\ETB\n\
+    \\f\n\
+    \\STX\EOT\SYN\DC2\ACK\217\STX\NUL\218\STX\SOH\n\
+    \\v\n\
+    \\ETX\EOT\SYN\SOH\DC2\EOT\217\STX\b\DC4b\ACKproto3"
diff --git a/proto/Proto/Ping.hs b/proto/Proto/Ping.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Ping.hs
@@ -0,0 +1,311 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from ping.proto by the proto-lens-protoc program. -}
+{-# 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.Ping (
+        PingService(..), PingMessage(), PongMessage()
+    ) 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
+{- | Fields :
+     
+         * 'Proto.Ping_Fields.id' @:: Lens' PingMessage Data.Word.Word32@ -}
+data PingMessage
+  = PingMessage'_constructor {_PingMessage'id :: !Data.Word.Word32,
+                              _PingMessage'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show PingMessage where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField PingMessage "id" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _PingMessage'id (\ x__ y__ -> x__ {_PingMessage'id = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message PingMessage where
+  messageName _ = Data.Text.pack "PingMessage"
+  packedMessageDescriptor _
+    = "\n\
+      \\vPingMessage\DC2\SO\n\
+      \\STXid\CAN\SOH \SOH(\rR\STXid"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        id__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "id"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"id")) ::
+              Data.ProtoLens.FieldDescriptor PingMessage
+      in Data.Map.fromList [(Data.ProtoLens.Tag 1, id__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _PingMessage'_unknownFields
+        (\ x__ y__ -> x__ {_PingMessage'_unknownFields = y__})
+  defMessage
+    = PingMessage'_constructor
+        {_PingMessage'id = Data.ProtoLens.fieldDefault,
+         _PingMessage'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          PingMessage -> Data.ProtoLens.Encoding.Bytes.Parser PingMessage
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "id"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"id") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "PingMessage"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"id") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData PingMessage where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_PingMessage'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_PingMessage'id x__) ())
+{- | Fields :
+     
+         * 'Proto.Ping_Fields.id' @:: Lens' PongMessage Data.Word.Word32@ -}
+data PongMessage
+  = PongMessage'_constructor {_PongMessage'id :: !Data.Word.Word32,
+                              _PongMessage'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show PongMessage where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField PongMessage "id" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _PongMessage'id (\ x__ y__ -> x__ {_PongMessage'id = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message PongMessage where
+  messageName _ = Data.Text.pack "PongMessage"
+  packedMessageDescriptor _
+    = "\n\
+      \\vPongMessage\DC2\SO\n\
+      \\STXid\CAN\SOH \SOH(\rR\STXid"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        id__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "id"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"id")) ::
+              Data.ProtoLens.FieldDescriptor PongMessage
+      in Data.Map.fromList [(Data.ProtoLens.Tag 1, id__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _PongMessage'_unknownFields
+        (\ x__ y__ -> x__ {_PongMessage'_unknownFields = y__})
+  defMessage
+    = PongMessage'_constructor
+        {_PongMessage'id = Data.ProtoLens.fieldDefault,
+         _PongMessage'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          PongMessage -> Data.ProtoLens.Encoding.Bytes.Parser PongMessage
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "id"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"id") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "PongMessage"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"id") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData PongMessage where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_PongMessage'_unknownFields x__)
+             (Control.DeepSeq.deepseq (_PongMessage'id x__) ())
+data PingService = PingService {}
+instance Data.ProtoLens.Service.Types.Service PingService where
+  type ServiceName PingService = "PingService"
+  type ServicePackage PingService = ""
+  type ServiceMethods PingService = '["ping"]
+  packedServiceDescriptor _
+    = "\n\
+      \\vPingService\DC2\"\n\
+      \\EOTPing\DC2\f.PingMessage\SUB\f.PongMessage"
+instance Data.ProtoLens.Service.Types.HasMethodImpl PingService "ping" where
+  type MethodName PingService "ping" = "Ping"
+  type MethodInput PingService "ping" = PingMessage
+  type MethodOutput PingService "ping" = PongMessage
+  type MethodStreamingType PingService "ping" = 'Data.ProtoLens.Service.Types.NonStreaming
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\n\
+    \ping.proto\"\GS\n\
+    \\vPingMessage\DC2\SO\n\
+    \\STXid\CAN\SOH \SOH(\rR\STXid\"\GS\n\
+    \\vPongMessage\DC2\SO\n\
+    \\STXid\CAN\SOH \SOH(\rR\STXid21\n\
+    \\vPingService\DC2\"\n\
+    \\EOTPing\DC2\f.PingMessage\SUB\f.PongMessageJ\255\SOH\n\
+    \\ACK\DC2\EOT\NUL\NUL\f\SOH\n\
+    \\b\n\
+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
+    \\n\
+    \\n\
+    \\STX\ACK\NUL\DC2\EOT\STX\NUL\EOT\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\ACK\NUL\SOH\DC2\ETX\STX\b\DC3\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\NUL\DC2\ETX\ETX\STX/\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX\ETX\ACK\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX\ETX\f\ETB\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX\ETX\"-\n\
+    \\n\
+    \\n\
+    \\STX\EOT\NUL\DC2\EOT\ACK\NUL\b\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX\ACK\b\DC3\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\a\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\a\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\a\t\v\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\a\SO\SI\n\
+    \\n\
+    \\n\
+    \\STX\EOT\SOH\DC2\EOT\n\
+    \\NUL\f\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\SOH\SOH\DC2\ETX\n\
+    \\b\DC3\n\
+    \\v\n\
+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\v\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\v\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\v\t\v\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\v\SO\SIb\ACKproto3"
diff --git a/proto/Proto/RouteGuide.hs b/proto/Proto/RouteGuide.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/RouteGuide.hs
@@ -0,0 +1,1223 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from route_guide.proto by the proto-lens-protoc program. -}
+{-# 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.RouteGuide (
+        RouteGuide(..), Feature(), Point(), Rectangle(), RouteNote(),
+        RouteSummary()
+    ) 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
+{- | Fields :
+     
+         * 'Proto.RouteGuide_Fields.name' @:: Lens' Feature Data.Text.Text@
+         * 'Proto.RouteGuide_Fields.location' @:: Lens' Feature Point@
+         * 'Proto.RouteGuide_Fields.maybe'location' @:: Lens' Feature (Prelude.Maybe Point)@ -}
+data Feature
+  = Feature'_constructor {_Feature'name :: !Data.Text.Text,
+                          _Feature'location :: !(Prelude.Maybe Point),
+                          _Feature'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show Feature where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField Feature "name" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Feature'name (\ x__ y__ -> x__ {_Feature'name = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField Feature "location" Point where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Feature'location (\ x__ y__ -> x__ {_Feature'location = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField Feature "maybe'location" (Prelude.Maybe Point) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Feature'location (\ x__ y__ -> x__ {_Feature'location = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message Feature where
+  messageName _ = Data.Text.pack "routeguide.Feature"
+  packedMessageDescriptor _
+    = "\n\
+      \\aFeature\DC2\DC2\n\
+      \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2-\n\
+      \\blocation\CAN\STX \SOH(\v2\DC1.routeguide.PointR\blocation"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        name__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "name"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::
+              Data.ProtoLens.FieldDescriptor Feature
+        location__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "location"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Point)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'location")) ::
+              Data.ProtoLens.FieldDescriptor Feature
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, name__field_descriptor),
+           (Data.ProtoLens.Tag 2, location__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _Feature'_unknownFields
+        (\ x__ y__ -> x__ {_Feature'_unknownFields = y__})
+  defMessage
+    = Feature'_constructor
+        {_Feature'name = Data.ProtoLens.fieldDefault,
+         _Feature'location = Prelude.Nothing, _Feature'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: Feature -> Data.ProtoLens.Encoding.Bytes.Parser Feature
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "name"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "location"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"location") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Feature"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'location") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData Feature where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_Feature'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_Feature'name x__)
+                (Control.DeepSeq.deepseq (_Feature'location x__) ()))
+{- | Fields :
+     
+         * 'Proto.RouteGuide_Fields.latitude' @:: Lens' Point Data.Int.Int32@
+         * 'Proto.RouteGuide_Fields.longitude' @:: Lens' Point Data.Int.Int32@ -}
+data Point
+  = Point'_constructor {_Point'latitude :: !Data.Int.Int32,
+                        _Point'longitude :: !Data.Int.Int32,
+                        _Point'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show Point where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField Point "latitude" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Point'latitude (\ x__ y__ -> x__ {_Point'latitude = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField Point "longitude" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Point'longitude (\ x__ y__ -> x__ {_Point'longitude = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message Point where
+  messageName _ = Data.Text.pack "routeguide.Point"
+  packedMessageDescriptor _
+    = "\n\
+      \\ENQPoint\DC2\SUB\n\
+      \\blatitude\CAN\SOH \SOH(\ENQR\blatitude\DC2\FS\n\
+      \\tlongitude\CAN\STX \SOH(\ENQR\tlongitude"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        latitude__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "latitude"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"latitude")) ::
+              Data.ProtoLens.FieldDescriptor Point
+        longitude__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "longitude"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"longitude")) ::
+              Data.ProtoLens.FieldDescriptor Point
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, latitude__field_descriptor),
+           (Data.ProtoLens.Tag 2, longitude__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _Point'_unknownFields
+        (\ x__ y__ -> x__ {_Point'_unknownFields = y__})
+  defMessage
+    = Point'_constructor
+        {_Point'latitude = Data.ProtoLens.fieldDefault,
+         _Point'longitude = Data.ProtoLens.fieldDefault,
+         _Point'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: Point -> Data.ProtoLens.Encoding.Bytes.Parser Point
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "latitude"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"latitude") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "longitude"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"longitude") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Point"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"latitude") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"longitude") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData Point where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_Point'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_Point'latitude x__)
+                (Control.DeepSeq.deepseq (_Point'longitude x__) ()))
+{- | Fields :
+     
+         * 'Proto.RouteGuide_Fields.lo' @:: Lens' Rectangle Point@
+         * 'Proto.RouteGuide_Fields.maybe'lo' @:: Lens' Rectangle (Prelude.Maybe Point)@
+         * 'Proto.RouteGuide_Fields.hi' @:: Lens' Rectangle Point@
+         * 'Proto.RouteGuide_Fields.maybe'hi' @:: Lens' Rectangle (Prelude.Maybe Point)@ -}
+data Rectangle
+  = Rectangle'_constructor {_Rectangle'lo :: !(Prelude.Maybe Point),
+                            _Rectangle'hi :: !(Prelude.Maybe Point),
+                            _Rectangle'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show Rectangle where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField Rectangle "lo" Point where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Rectangle'lo (\ x__ y__ -> x__ {_Rectangle'lo = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField Rectangle "maybe'lo" (Prelude.Maybe Point) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Rectangle'lo (\ x__ y__ -> x__ {_Rectangle'lo = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField Rectangle "hi" Point where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Rectangle'hi (\ x__ y__ -> x__ {_Rectangle'hi = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField Rectangle "maybe'hi" (Prelude.Maybe Point) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _Rectangle'hi (\ x__ y__ -> x__ {_Rectangle'hi = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message Rectangle where
+  messageName _ = Data.Text.pack "routeguide.Rectangle"
+  packedMessageDescriptor _
+    = "\n\
+      \\tRectangle\DC2!\n\
+      \\STXlo\CAN\SOH \SOH(\v2\DC1.routeguide.PointR\STXlo\DC2!\n\
+      \\STXhi\CAN\STX \SOH(\v2\DC1.routeguide.PointR\STXhi"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        lo__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "lo"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Point)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'lo")) ::
+              Data.ProtoLens.FieldDescriptor Rectangle
+        hi__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "hi"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Point)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'hi")) ::
+              Data.ProtoLens.FieldDescriptor Rectangle
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, lo__field_descriptor),
+           (Data.ProtoLens.Tag 2, hi__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _Rectangle'_unknownFields
+        (\ x__ y__ -> x__ {_Rectangle'_unknownFields = y__})
+  defMessage
+    = Rectangle'_constructor
+        {_Rectangle'lo = Prelude.Nothing, _Rectangle'hi = Prelude.Nothing,
+         _Rectangle'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: Rectangle -> Data.ProtoLens.Encoding.Bytes.Parser Rectangle
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "lo"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"lo") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "hi"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"hi") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Rectangle"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (case
+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'lo") _x
+              of
+                Prelude.Nothing -> Data.Monoid.mempty
+                (Prelude.Just _v)
+                  -> (Data.Monoid.<>)
+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                       ((Prelude..)
+                          (\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                          Data.ProtoLens.encodeMessage _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'hi") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData Rectangle where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_Rectangle'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_Rectangle'lo x__)
+                (Control.DeepSeq.deepseq (_Rectangle'hi x__) ()))
+{- | Fields :
+     
+         * 'Proto.RouteGuide_Fields.location' @:: Lens' RouteNote Point@
+         * 'Proto.RouteGuide_Fields.maybe'location' @:: Lens' RouteNote (Prelude.Maybe Point)@
+         * 'Proto.RouteGuide_Fields.message' @:: Lens' RouteNote Data.Text.Text@ -}
+data RouteNote
+  = RouteNote'_constructor {_RouteNote'location :: !(Prelude.Maybe Point),
+                            _RouteNote'message :: !Data.Text.Text,
+                            _RouteNote'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show RouteNote where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField RouteNote "location" Point where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteNote'location (\ x__ y__ -> x__ {_RouteNote'location = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField RouteNote "maybe'location" (Prelude.Maybe Point) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteNote'location (\ x__ y__ -> x__ {_RouteNote'location = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField RouteNote "message" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteNote'message (\ x__ y__ -> x__ {_RouteNote'message = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message RouteNote where
+  messageName _ = Data.Text.pack "routeguide.RouteNote"
+  packedMessageDescriptor _
+    = "\n\
+      \\tRouteNote\DC2-\n\
+      \\blocation\CAN\SOH \SOH(\v2\DC1.routeguide.PointR\blocation\DC2\CAN\n\
+      \\amessage\CAN\STX \SOH(\tR\amessage"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        location__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "location"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Point)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'location")) ::
+              Data.ProtoLens.FieldDescriptor RouteNote
+        message__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "message"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"message")) ::
+              Data.ProtoLens.FieldDescriptor RouteNote
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, location__field_descriptor),
+           (Data.ProtoLens.Tag 2, message__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _RouteNote'_unknownFields
+        (\ x__ y__ -> x__ {_RouteNote'_unknownFields = y__})
+  defMessage
+    = RouteNote'_constructor
+        {_RouteNote'location = Prelude.Nothing,
+         _RouteNote'message = Data.ProtoLens.fieldDefault,
+         _RouteNote'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: RouteNote -> Data.ProtoLens.Encoding.Bytes.Parser RouteNote
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "location"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"location") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "message"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"message") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RouteNote"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (case
+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'location") _x
+              of
+                Prelude.Nothing -> Data.Monoid.mempty
+                (Prelude.Just _v)
+                  -> (Data.Monoid.<>)
+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                       ((Prelude..)
+                          (\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                          Data.ProtoLens.encodeMessage _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"message") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData RouteNote where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_RouteNote'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_RouteNote'location x__)
+                (Control.DeepSeq.deepseq (_RouteNote'message x__) ()))
+{- | Fields :
+     
+         * 'Proto.RouteGuide_Fields.pointCount' @:: Lens' RouteSummary Data.Int.Int32@
+         * 'Proto.RouteGuide_Fields.featureCount' @:: Lens' RouteSummary Data.Int.Int32@
+         * 'Proto.RouteGuide_Fields.distance' @:: Lens' RouteSummary Data.Int.Int32@
+         * 'Proto.RouteGuide_Fields.elapsedTime' @:: Lens' RouteSummary Data.Int.Int32@ -}
+data RouteSummary
+  = RouteSummary'_constructor {_RouteSummary'pointCount :: !Data.Int.Int32,
+                               _RouteSummary'featureCount :: !Data.Int.Int32,
+                               _RouteSummary'distance :: !Data.Int.Int32,
+                               _RouteSummary'elapsedTime :: !Data.Int.Int32,
+                               _RouteSummary'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show RouteSummary where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField RouteSummary "pointCount" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteSummary'pointCount
+           (\ x__ y__ -> x__ {_RouteSummary'pointCount = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField RouteSummary "featureCount" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteSummary'featureCount
+           (\ x__ y__ -> x__ {_RouteSummary'featureCount = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField RouteSummary "distance" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteSummary'distance
+           (\ x__ y__ -> x__ {_RouteSummary'distance = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField RouteSummary "elapsedTime" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _RouteSummary'elapsedTime
+           (\ x__ y__ -> x__ {_RouteSummary'elapsedTime = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message RouteSummary where
+  messageName _ = Data.Text.pack "routeguide.RouteSummary"
+  packedMessageDescriptor _
+    = "\n\
+      \\fRouteSummary\DC2\US\n\
+      \\vpoint_count\CAN\SOH \SOH(\ENQR\n\
+      \pointCount\DC2#\n\
+      \\rfeature_count\CAN\STX \SOH(\ENQR\ffeatureCount\DC2\SUB\n\
+      \\bdistance\CAN\ETX \SOH(\ENQR\bdistance\DC2!\n\
+      \\felapsed_time\CAN\EOT \SOH(\ENQR\velapsedTime"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        pointCount__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "point_count"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"pointCount")) ::
+              Data.ProtoLens.FieldDescriptor RouteSummary
+        featureCount__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "feature_count"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"featureCount")) ::
+              Data.ProtoLens.FieldDescriptor RouteSummary
+        distance__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "distance"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"distance")) ::
+              Data.ProtoLens.FieldDescriptor RouteSummary
+        elapsedTime__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "elapsed_time"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"elapsedTime")) ::
+              Data.ProtoLens.FieldDescriptor RouteSummary
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, pointCount__field_descriptor),
+           (Data.ProtoLens.Tag 2, featureCount__field_descriptor),
+           (Data.ProtoLens.Tag 3, distance__field_descriptor),
+           (Data.ProtoLens.Tag 4, elapsedTime__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _RouteSummary'_unknownFields
+        (\ x__ y__ -> x__ {_RouteSummary'_unknownFields = y__})
+  defMessage
+    = RouteSummary'_constructor
+        {_RouteSummary'pointCount = Data.ProtoLens.fieldDefault,
+         _RouteSummary'featureCount = Data.ProtoLens.fieldDefault,
+         _RouteSummary'distance = Data.ProtoLens.fieldDefault,
+         _RouteSummary'elapsedTime = Data.ProtoLens.fieldDefault,
+         _RouteSummary'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          RouteSummary -> Data.ProtoLens.Encoding.Bytes.Parser RouteSummary
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "point_count"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"pointCount") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "feature_count"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"featureCount") y x)
+                        24
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "distance"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"distance") y x)
+                        32
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "elapsed_time"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"elapsedTime") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "RouteSummary"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view (Data.ProtoLens.Field.field @"pointCount") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view (Data.ProtoLens.Field.field @"featureCount") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                ((Data.Monoid.<>)
+                   (let
+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"distance") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
+                            ((Prelude..)
+                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                   ((Data.Monoid.<>)
+                      (let
+                         _v
+                           = Lens.Family2.view (Data.ProtoLens.Field.field @"elapsedTime") _x
+                       in
+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                             Data.Monoid.mempty
+                         else
+                             (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
+                               ((Prelude..)
+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
+instance Control.DeepSeq.NFData RouteSummary where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_RouteSummary'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_RouteSummary'pointCount x__)
+                (Control.DeepSeq.deepseq
+                   (_RouteSummary'featureCount x__)
+                   (Control.DeepSeq.deepseq
+                      (_RouteSummary'distance x__)
+                      (Control.DeepSeq.deepseq (_RouteSummary'elapsedTime x__) ()))))
+data RouteGuide = RouteGuide {}
+instance Data.ProtoLens.Service.Types.Service RouteGuide where
+  type ServiceName RouteGuide = "RouteGuide"
+  type ServicePackage RouteGuide = "routeguide"
+  type ServiceMethods RouteGuide = '["getFeature",
+                                     "listFeatures",
+                                     "recordRoute",
+                                     "routeChat"]
+  packedServiceDescriptor _
+    = "\n\
+      \\n\
+      \RouteGuide\DC26\n\
+      \\n\
+      \GetFeature\DC2\DC1.routeguide.Point\SUB\DC3.routeguide.Feature\"\NUL\DC2>\n\
+      \\fListFeatures\DC2\NAK.routeguide.Rectangle\SUB\DC3.routeguide.Feature\"\NUL0\SOH\DC2>\n\
+      \\vRecordRoute\DC2\DC1.routeguide.Point\SUB\CAN.routeguide.RouteSummary\"\NUL(\SOH\DC2?\n\
+      \\tRouteChat\DC2\NAK.routeguide.RouteNote\SUB\NAK.routeguide.RouteNote\"\NUL(\SOH0\SOH"
+instance Data.ProtoLens.Service.Types.HasMethodImpl RouteGuide "getFeature" where
+  type MethodName RouteGuide "getFeature" = "GetFeature"
+  type MethodInput RouteGuide "getFeature" = Point
+  type MethodOutput RouteGuide "getFeature" = Feature
+  type MethodStreamingType RouteGuide "getFeature" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl RouteGuide "listFeatures" where
+  type MethodName RouteGuide "listFeatures" = "ListFeatures"
+  type MethodInput RouteGuide "listFeatures" = Rectangle
+  type MethodOutput RouteGuide "listFeatures" = Feature
+  type MethodStreamingType RouteGuide "listFeatures" = 'Data.ProtoLens.Service.Types.ServerStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl RouteGuide "recordRoute" where
+  type MethodName RouteGuide "recordRoute" = "RecordRoute"
+  type MethodInput RouteGuide "recordRoute" = Point
+  type MethodOutput RouteGuide "recordRoute" = RouteSummary
+  type MethodStreamingType RouteGuide "recordRoute" = 'Data.ProtoLens.Service.Types.ClientStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl RouteGuide "routeChat" where
+  type MethodName RouteGuide "routeChat" = "RouteChat"
+  type MethodInput RouteGuide "routeChat" = RouteNote
+  type MethodOutput RouteGuide "routeChat" = RouteNote
+  type MethodStreamingType RouteGuide "routeChat" = 'Data.ProtoLens.Service.Types.BiDiStreaming
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\DC1route_guide.proto\DC2\n\
+    \routeguide\"A\n\
+    \\ENQPoint\DC2\SUB\n\
+    \\blatitude\CAN\SOH \SOH(\ENQR\blatitude\DC2\FS\n\
+    \\tlongitude\CAN\STX \SOH(\ENQR\tlongitude\"Q\n\
+    \\tRectangle\DC2!\n\
+    \\STXlo\CAN\SOH \SOH(\v2\DC1.routeguide.PointR\STXlo\DC2!\n\
+    \\STXhi\CAN\STX \SOH(\v2\DC1.routeguide.PointR\STXhi\"L\n\
+    \\aFeature\DC2\DC2\n\
+    \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2-\n\
+    \\blocation\CAN\STX \SOH(\v2\DC1.routeguide.PointR\blocation\"T\n\
+    \\tRouteNote\DC2-\n\
+    \\blocation\CAN\SOH \SOH(\v2\DC1.routeguide.PointR\blocation\DC2\CAN\n\
+    \\amessage\CAN\STX \SOH(\tR\amessage\"\147\SOH\n\
+    \\fRouteSummary\DC2\US\n\
+    \\vpoint_count\CAN\SOH \SOH(\ENQR\n\
+    \pointCount\DC2#\n\
+    \\rfeature_count\CAN\STX \SOH(\ENQR\ffeatureCount\DC2\SUB\n\
+    \\bdistance\CAN\ETX \SOH(\ENQR\bdistance\DC2!\n\
+    \\felapsed_time\CAN\EOT \SOH(\ENQR\velapsedTime2\133\STX\n\
+    \\n\
+    \RouteGuide\DC26\n\
+    \\n\
+    \GetFeature\DC2\DC1.routeguide.Point\SUB\DC3.routeguide.Feature\"\NUL\DC2>\n\
+    \\fListFeatures\DC2\NAK.routeguide.Rectangle\SUB\DC3.routeguide.Feature\"\NUL0\SOH\DC2>\n\
+    \\vRecordRoute\DC2\DC1.routeguide.Point\SUB\CAN.routeguide.RouteSummary\"\NUL(\SOH\DC2?\n\
+    \\tRouteChat\DC2\NAK.routeguide.RouteNote\SUB\NAK.routeguide.RouteNote\"\NUL(\SOH0\SOHB6\n\
+    \\ESCio.grpc.examples.routeguideB\SIRouteGuideProtoP\SOH\162\STX\ETXRTGJ\130\GS\n\
+    \\ACK\DC2\EOT\SO\NULn\SOH\n\
+    \\191\EOT\n\
+    \\SOH\f\DC2\ETX\SO\NUL\DC22\180\EOT Copyright 2015 gRPC authors.\n\
+    \\n\
+    \ Licensed under the Apache License, Version 2.0 (the \"License\");\n\
+    \ you may not use this file except in compliance with the License.\n\
+    \ You may obtain a copy of the License at\n\
+    \\n\
+    \     http://www.apache.org/licenses/LICENSE-2.0\n\
+    \\n\
+    \ Unless required by applicable law or agreed to in writing, software\n\
+    \ distributed under the License is distributed on an \"AS IS\" BASIS,\n\
+    \ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+    \ See the License for the specific language governing permissions and\n\
+    \ limitations under the License.\n\
+    \\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DLE\NUL\"\n\
+    \\t\n\
+    \\STX\b\n\
+    \\DC2\ETX\DLE\NUL\"\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC1\NUL4\n\
+    \\t\n\
+    \\STX\b\SOH\DC2\ETX\DC1\NUL4\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC2\NUL0\n\
+    \\t\n\
+    \\STX\b\b\DC2\ETX\DC2\NUL0\n\
+    \\b\n\
+    \\SOH\b\DC2\ETX\DC3\NUL!\n\
+    \\t\n\
+    \\STX\b$\DC2\ETX\DC3\NUL!\n\
+    \\b\n\
+    \\SOH\STX\DC2\ETX\NAK\NUL\DC3\n\
+    \/\n\
+    \\STX\ACK\NUL\DC2\EOT\CAN\NUL4\SOH\SUB# Interface exported by the server.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\ACK\NUL\SOH\DC2\ETX\CAN\b\DC2\n\
+    \\161\SOH\n\
+    \\EOT\ACK\NUL\STX\NUL\DC2\ETX\US\STX,\SUB\147\SOH A simple RPC.\n\
+    \\n\
+    \ Obtains the feature at a given position.\n\
+    \\n\
+    \ A feature with an empty name is returned if there's no feature at the given\n\
+    \ position.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX\US\ACK\DLE\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX\US\DC1\SYN\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX\US!(\n\
+    \\167\STX\n\
+    \\EOT\ACK\NUL\STX\SOH\DC2\ETX'\STX9\SUB\153\STX A server-to-client streaming RPC.\n\
+    \\n\
+    \ Obtains the Features available within the given Rectangle.  Results are\n\
+    \ streamed rather than returned at once (e.g. in a response message with a\n\
+    \ repeated field), as the rectangle may cover a large area and contain a\n\
+    \ huge number of features.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\SOH\DC2\ETX'\ACK\DC2\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\STX\DC2\ETX'\DC3\FS\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\ACK\DC2\ETX''-\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\SOH\ETX\DC2\ETX'.5\n\
+    \\161\SOH\n\
+    \\EOT\ACK\NUL\STX\STX\DC2\ETX-\STX9\SUB\147\SOH A client-to-server streaming RPC.\n\
+    \\n\
+    \ Accepts a stream of Points on a route being traversed, returning a\n\
+    \ RouteSummary when traversal is completed.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\SOH\DC2\ETX-\ACK\DC1\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\ENQ\DC2\ETX-\DC2\CAN\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\STX\DC2\ETX-\EM\RS\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\STX\ETX\DC2\ETX-)5\n\
+    \\177\SOH\n\
+    \\EOT\ACK\NUL\STX\ETX\DC2\ETX3\STX?\SUB\163\SOH A Bidirectional streaming RPC.\n\
+    \\n\
+    \ Accepts a stream of RouteNotes sent while a route is being traversed,\n\
+    \ while receiving other RouteNotes (e.g. from other users).\n\
+    \\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\SOH\DC2\ETX3\ACK\SI\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\ENQ\DC2\ETX3\DLE\SYN\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\STX\DC2\ETX3\ETB \n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\ACK\DC2\ETX3+1\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\ETX\ETX\DC2\ETX32;\n\
+    \\145\STX\n\
+    \\STX\EOT\NUL\DC2\EOT:\NUL=\SOH\SUB\132\STX Points are represented as latitude-longitude pairs in the E7 representation\n\
+    \ (degrees multiplied by 10**7 and rounded to the nearest integer).\n\
+    \ Latitudes should be in the range +/- 90 degrees and longitude should be in\n\
+    \ the range +/- 180 degrees (inclusive).\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX:\b\r\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX;\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX;\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX;\b\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX;\DC3\DC4\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX<\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX<\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX<\b\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX<\DC4\NAK\n\
+    \k\n\
+    \\STX\EOT\SOH\DC2\EOTA\NULG\SOH\SUB_ A latitude-longitude rectangle, represented as two diagonally opposite\n\
+    \ points \"lo\" and \"hi\".\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\SOH\SOH\DC2\ETXA\b\DC1\n\
+    \+\n\
+    \\EOT\EOT\SOH\STX\NUL\DC2\ETXC\STX\SI\SUB\RS One corner of the rectangle.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETXC\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETXC\b\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETXC\r\SO\n\
+    \1\n\
+    \\EOT\EOT\SOH\STX\SOH\DC2\ETXF\STX\SI\SUB$ The other corner of the rectangle.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\SOH\ACK\DC2\ETXF\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETXF\b\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETXF\r\SO\n\
+    \o\n\
+    \\STX\EOT\STX\DC2\EOTL\NULR\SOH\SUBc A feature names something at a given point.\n\
+    \\n\
+    \ If a feature could not be named, the name is empty.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\STX\SOH\DC2\ETXL\b\SI\n\
+    \'\n\
+    \\EOT\EOT\STX\STX\NUL\DC2\ETXN\STX\DC2\SUB\SUB The name of the feature.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETXN\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETXN\t\r\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETXN\DLE\DC1\n\
+    \7\n\
+    \\EOT\EOT\STX\STX\SOH\DC2\ETXQ\STX\NAK\SUB* The point where the feature is detected.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\SOH\ACK\DC2\ETXQ\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETXQ\b\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETXQ\DC3\DC4\n\
+    \C\n\
+    \\STX\EOT\ETX\DC2\EOTU\NUL[\SOH\SUB7 A RouteNote is a message sent while at a given point.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\ETX\SOH\DC2\ETXU\b\DC1\n\
+    \;\n\
+    \\EOT\EOT\ETX\STX\NUL\DC2\ETXW\STX\NAK\SUB. The location from which the message is sent.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETXW\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETXW\b\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETXW\DC3\DC4\n\
+    \&\n\
+    \\EOT\EOT\ETX\STX\SOH\DC2\ETXZ\STX\NAK\SUB\EM The message to be sent.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\SOH\ENQ\DC2\ETXZ\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETXZ\t\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETXZ\DC3\DC4\n\
+    \\255\SOH\n\
+    \\STX\EOT\EOT\DC2\EOTb\NULn\SOH\SUB\242\SOH A RouteSummary is received in response to a RecordRoute rpc.\n\
+    \\n\
+    \ It contains the number of individual points received, the number of\n\
+    \ detected features, and the total distance covered as the cumulative sum of\n\
+    \ the distance between each point.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\EOT\SOH\DC2\ETXb\b\DC4\n\
+    \-\n\
+    \\EOT\EOT\EOT\STX\NUL\DC2\ETXd\STX\CAN\SUB  The number of points received.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\ETXd\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETXd\b\DC3\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETXd\SYN\ETB\n\
+    \N\n\
+    \\EOT\EOT\EOT\STX\SOH\DC2\ETXg\STX\SUB\SUBA The number of known features passed while traversing the route.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\ENQ\DC2\ETXg\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\SOH\DC2\ETXg\b\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\SOH\ETX\DC2\ETXg\CAN\EM\n\
+    \.\n\
+    \\EOT\EOT\EOT\STX\STX\DC2\ETXj\STX\NAK\SUB! The distance covered in metres.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\STX\ENQ\DC2\ETXj\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\STX\SOH\DC2\ETXj\b\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\STX\ETX\DC2\ETXj\DC3\DC4\n\
+    \8\n\
+    \\EOT\EOT\EOT\STX\ETX\DC2\ETXm\STX\EM\SUB+ The duration of the traversal in seconds.\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ETX\ENQ\DC2\ETXm\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ETX\SOH\DC2\ETXm\b\DC4\n\
+    \\f\n\
+    \\ENQ\EOT\EOT\STX\ETX\ETX\DC2\ETXm\ETB\CANb\ACKproto3"
diff --git a/proto/Proto/Spec.hs b/proto/Proto/Spec.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Spec.hs
@@ -0,0 +1,11755 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from spec.proto by the proto-lens-protoc program. -}
+{-# 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.Spec (
+        ExampleService(..), AnotherMessage(), Empty(), ExampleEnum(..),
+        ExampleEnum(), ExampleEnum'UnrecognizedValue, ExampleMessage(),
+        ExampleMessage'ExampleOneOf(..), _ExampleMessage'OneofScalar01,
+        _ExampleMessage'OneofScalar02, _ExampleMessage'OneofScalar03,
+        _ExampleMessage'OneofScalar04, _ExampleMessage'OneofScalar05,
+        _ExampleMessage'OneofScalar06, _ExampleMessage'OneofScalar07,
+        _ExampleMessage'OneofScalar08, _ExampleMessage'OneofScalar09,
+        _ExampleMessage'OneofScalar10, _ExampleMessage'OneofScalar11,
+        _ExampleMessage'OneofScalar12, _ExampleMessage'OneofScalar13,
+        _ExampleMessage'OneofScalar14, _ExampleMessage'OneofScalar15,
+        _ExampleMessage'OneofAnother, _ExampleMessage'OneofNested,
+        _ExampleMessage'OneofEnum, ExampleMessage'MapAnotherEntry(),
+        ExampleMessage'MapEnumEntry(), ExampleMessage'MapNestedEntry(),
+        ExampleMessage'MapScalar01Entry(),
+        ExampleMessage'MapScalar02Entry(),
+        ExampleMessage'MapScalar03Entry(),
+        ExampleMessage'MapScalar04Entry(),
+        ExampleMessage'MapScalar05Entry(),
+        ExampleMessage'MapScalar06Entry(),
+        ExampleMessage'MapScalar07Entry(),
+        ExampleMessage'MapScalar08Entry(),
+        ExampleMessage'MapScalar09Entry(),
+        ExampleMessage'MapScalar10Entry(),
+        ExampleMessage'MapScalar11Entry(),
+        ExampleMessage'MapScalar12Entry(),
+        ExampleMessage'MapScalar13Entry(),
+        ExampleMessage'MapScalar14Entry(),
+        ExampleMessage'MapScalar15Entry(), ExampleMessage'NestedMessage()
+    ) 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
+{- | Fields :
+      -}
+data AnotherMessage
+  = AnotherMessage'_constructor {_AnotherMessage'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show AnotherMessage where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message AnotherMessage where
+  messageName _ = Data.Text.pack "AnotherMessage"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOAnotherMessage"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _AnotherMessage'_unknownFields
+        (\ x__ y__ -> x__ {_AnotherMessage'_unknownFields = y__})
+  defMessage
+    = AnotherMessage'_constructor {_AnotherMessage'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          AnotherMessage
+          -> Data.ProtoLens.Encoding.Bytes.Parser AnotherMessage
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "AnotherMessage"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData AnotherMessage where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq (_AnotherMessage'_unknownFields x__) ()
+{- | Fields :
+      -}
+data Empty
+  = Empty'_constructor {_Empty'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show Empty where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message Empty where
+  messageName _ = Data.Text.pack "Empty"
+  packedMessageDescriptor _
+    = "\n\
+      \\ENQEmpty"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _Empty'_unknownFields
+        (\ x__ y__ -> x__ {_Empty'_unknownFields = y__})
+  defMessage = Empty'_constructor {_Empty'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: Empty -> Data.ProtoLens.Encoding.Bytes.Parser Empty
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "Empty"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData Empty where
+  rnf
+    = \ x__ -> Control.DeepSeq.deepseq (_Empty'_unknownFields x__) ()
+newtype ExampleEnum'UnrecognizedValue
+  = ExampleEnum'UnrecognizedValue Data.Int.Int32
+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)
+data ExampleEnum
+  = ENUM_A |
+    ENUM_B |
+    ENUM_C |
+    ExampleEnum'Unrecognized !ExampleEnum'UnrecognizedValue
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.MessageEnum ExampleEnum where
+  maybeToEnum 0 = Prelude.Just ENUM_A
+  maybeToEnum 1 = Prelude.Just ENUM_B
+  maybeToEnum 2 = Prelude.Just ENUM_C
+  maybeToEnum k
+    = Prelude.Just
+        (ExampleEnum'Unrecognized
+           (ExampleEnum'UnrecognizedValue (Prelude.fromIntegral k)))
+  showEnum ENUM_A = "ENUM_A"
+  showEnum ENUM_B = "ENUM_B"
+  showEnum ENUM_C = "ENUM_C"
+  showEnum
+    (ExampleEnum'Unrecognized (ExampleEnum'UnrecognizedValue k))
+    = Prelude.show k
+  readEnum k
+    | (Prelude.==) k "ENUM_A" = Prelude.Just ENUM_A
+    | (Prelude.==) k "ENUM_B" = Prelude.Just ENUM_B
+    | (Prelude.==) k "ENUM_C" = Prelude.Just ENUM_C
+    | Prelude.otherwise
+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
+instance Prelude.Bounded ExampleEnum where
+  minBound = ENUM_A
+  maxBound = ENUM_C
+instance Prelude.Enum ExampleEnum where
+  toEnum k__
+    = Prelude.maybe
+        (Prelude.error
+           ((Prelude.++)
+              "toEnum: unknown value for enum ExampleEnum: " (Prelude.show k__)))
+        Prelude.id (Data.ProtoLens.maybeToEnum k__)
+  fromEnum ENUM_A = 0
+  fromEnum ENUM_B = 1
+  fromEnum ENUM_C = 2
+  fromEnum
+    (ExampleEnum'Unrecognized (ExampleEnum'UnrecognizedValue k))
+    = Prelude.fromIntegral k
+  succ ENUM_C
+    = Prelude.error
+        "ExampleEnum.succ: bad argument ENUM_C. This value would be out of bounds."
+  succ ENUM_A = ENUM_B
+  succ ENUM_B = ENUM_C
+  succ (ExampleEnum'Unrecognized _)
+    = Prelude.error
+        "ExampleEnum.succ: bad argument: unrecognized value"
+  pred ENUM_A
+    = Prelude.error
+        "ExampleEnum.pred: bad argument ENUM_A. This value would be out of bounds."
+  pred ENUM_B = ENUM_A
+  pred ENUM_C = ENUM_B
+  pred (ExampleEnum'Unrecognized _)
+    = Prelude.error
+        "ExampleEnum.pred: bad argument: unrecognized value"
+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
+instance Data.ProtoLens.FieldDefault ExampleEnum where
+  fieldDefault = ENUM_A
+instance Control.DeepSeq.NFData ExampleEnum where
+  rnf x__ = Prelude.seq x__ ()
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.defaultScalar01' @:: Lens' ExampleMessage Prelude.Double@
+         * 'Proto.Spec_Fields.defaultScalar02' @:: Lens' ExampleMessage Prelude.Float@
+         * 'Proto.Spec_Fields.defaultScalar03' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.defaultScalar04' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.defaultScalar05' @:: Lens' ExampleMessage Data.Word.Word32@
+         * 'Proto.Spec_Fields.defaultScalar06' @:: Lens' ExampleMessage Data.Word.Word64@
+         * 'Proto.Spec_Fields.defaultScalar07' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.defaultScalar08' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.defaultScalar09' @:: Lens' ExampleMessage Data.Word.Word32@
+         * 'Proto.Spec_Fields.defaultScalar10' @:: Lens' ExampleMessage Data.Word.Word64@
+         * 'Proto.Spec_Fields.defaultScalar11' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.defaultScalar12' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.defaultScalar13' @:: Lens' ExampleMessage Prelude.Bool@
+         * 'Proto.Spec_Fields.defaultScalar14' @:: Lens' ExampleMessage Data.Text.Text@
+         * 'Proto.Spec_Fields.defaultScalar15' @:: Lens' ExampleMessage Data.ByteString.ByteString@
+         * 'Proto.Spec_Fields.defaultAnother' @:: Lens' ExampleMessage AnotherMessage@
+         * 'Proto.Spec_Fields.maybe'defaultAnother' @:: Lens' ExampleMessage (Prelude.Maybe AnotherMessage)@
+         * 'Proto.Spec_Fields.defaultNested' @:: Lens' ExampleMessage ExampleMessage'NestedMessage@
+         * 'Proto.Spec_Fields.maybe'defaultNested' @:: Lens' ExampleMessage (Prelude.Maybe ExampleMessage'NestedMessage)@
+         * 'Proto.Spec_Fields.defaultEnum' @:: Lens' ExampleMessage ExampleEnum@
+         * 'Proto.Spec_Fields.optionalScalar01' @:: Lens' ExampleMessage Prelude.Double@
+         * 'Proto.Spec_Fields.maybe'optionalScalar01' @:: Lens' ExampleMessage (Prelude.Maybe Prelude.Double)@
+         * 'Proto.Spec_Fields.optionalScalar02' @:: Lens' ExampleMessage Prelude.Float@
+         * 'Proto.Spec_Fields.maybe'optionalScalar02' @:: Lens' ExampleMessage (Prelude.Maybe Prelude.Float)@
+         * 'Proto.Spec_Fields.optionalScalar03' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.maybe'optionalScalar03' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int32)@
+         * 'Proto.Spec_Fields.optionalScalar04' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.maybe'optionalScalar04' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int64)@
+         * 'Proto.Spec_Fields.optionalScalar05' @:: Lens' ExampleMessage Data.Word.Word32@
+         * 'Proto.Spec_Fields.maybe'optionalScalar05' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word32)@
+         * 'Proto.Spec_Fields.optionalScalar06' @:: Lens' ExampleMessage Data.Word.Word64@
+         * 'Proto.Spec_Fields.maybe'optionalScalar06' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word64)@
+         * 'Proto.Spec_Fields.optionalScalar07' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.maybe'optionalScalar07' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int32)@
+         * 'Proto.Spec_Fields.optionalScalar08' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.maybe'optionalScalar08' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int64)@
+         * 'Proto.Spec_Fields.optionalScalar09' @:: Lens' ExampleMessage Data.Word.Word32@
+         * 'Proto.Spec_Fields.maybe'optionalScalar09' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word32)@
+         * 'Proto.Spec_Fields.optionalScalar10' @:: Lens' ExampleMessage Data.Word.Word64@
+         * 'Proto.Spec_Fields.maybe'optionalScalar10' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word64)@
+         * 'Proto.Spec_Fields.optionalScalar11' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.maybe'optionalScalar11' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int32)@
+         * 'Proto.Spec_Fields.optionalScalar12' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.maybe'optionalScalar12' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int64)@
+         * 'Proto.Spec_Fields.optionalScalar13' @:: Lens' ExampleMessage Prelude.Bool@
+         * 'Proto.Spec_Fields.maybe'optionalScalar13' @:: Lens' ExampleMessage (Prelude.Maybe Prelude.Bool)@
+         * 'Proto.Spec_Fields.optionalScalar14' @:: Lens' ExampleMessage Data.Text.Text@
+         * 'Proto.Spec_Fields.maybe'optionalScalar14' @:: Lens' ExampleMessage (Prelude.Maybe Data.Text.Text)@
+         * 'Proto.Spec_Fields.optionalScalar15' @:: Lens' ExampleMessage Data.ByteString.ByteString@
+         * 'Proto.Spec_Fields.maybe'optionalScalar15' @:: Lens' ExampleMessage (Prelude.Maybe Data.ByteString.ByteString)@
+         * 'Proto.Spec_Fields.optionalAnother' @:: Lens' ExampleMessage AnotherMessage@
+         * 'Proto.Spec_Fields.maybe'optionalAnother' @:: Lens' ExampleMessage (Prelude.Maybe AnotherMessage)@
+         * 'Proto.Spec_Fields.optionalNested' @:: Lens' ExampleMessage ExampleMessage'NestedMessage@
+         * 'Proto.Spec_Fields.maybe'optionalNested' @:: Lens' ExampleMessage (Prelude.Maybe ExampleMessage'NestedMessage)@
+         * 'Proto.Spec_Fields.optionalEnum' @:: Lens' ExampleMessage ExampleEnum@
+         * 'Proto.Spec_Fields.maybe'optionalEnum' @:: Lens' ExampleMessage (Prelude.Maybe ExampleEnum)@
+         * 'Proto.Spec_Fields.repeatedScalar01' @:: Lens' ExampleMessage [Prelude.Double]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar01' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Prelude.Double)@
+         * 'Proto.Spec_Fields.repeatedScalar02' @:: Lens' ExampleMessage [Prelude.Float]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar02' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Prelude.Float)@
+         * 'Proto.Spec_Fields.repeatedScalar03' @:: Lens' ExampleMessage [Data.Int.Int32]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar03' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Int.Int32)@
+         * 'Proto.Spec_Fields.repeatedScalar04' @:: Lens' ExampleMessage [Data.Int.Int64]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar04' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Int.Int64)@
+         * 'Proto.Spec_Fields.repeatedScalar05' @:: Lens' ExampleMessage [Data.Word.Word32]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar05' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Word.Word32)@
+         * 'Proto.Spec_Fields.repeatedScalar06' @:: Lens' ExampleMessage [Data.Word.Word64]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar06' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Word.Word64)@
+         * 'Proto.Spec_Fields.repeatedScalar07' @:: Lens' ExampleMessage [Data.Int.Int32]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar07' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Int.Int32)@
+         * 'Proto.Spec_Fields.repeatedScalar08' @:: Lens' ExampleMessage [Data.Int.Int64]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar08' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Int.Int64)@
+         * 'Proto.Spec_Fields.repeatedScalar09' @:: Lens' ExampleMessage [Data.Word.Word32]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar09' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Word.Word32)@
+         * 'Proto.Spec_Fields.repeatedScalar10' @:: Lens' ExampleMessage [Data.Word.Word64]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar10' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Word.Word64)@
+         * 'Proto.Spec_Fields.repeatedScalar11' @:: Lens' ExampleMessage [Data.Int.Int32]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar11' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Int.Int32)@
+         * 'Proto.Spec_Fields.repeatedScalar12' @:: Lens' ExampleMessage [Data.Int.Int64]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar12' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Data.Int.Int64)@
+         * 'Proto.Spec_Fields.repeatedScalar13' @:: Lens' ExampleMessage [Prelude.Bool]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar13' @:: Lens' ExampleMessage (Data.Vector.Unboxed.Vector Prelude.Bool)@
+         * 'Proto.Spec_Fields.repeatedScalar14' @:: Lens' ExampleMessage [Data.Text.Text]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar14' @:: Lens' ExampleMessage (Data.Vector.Vector Data.Text.Text)@
+         * 'Proto.Spec_Fields.repeatedScalar15' @:: Lens' ExampleMessage [Data.ByteString.ByteString]@
+         * 'Proto.Spec_Fields.vec'repeatedScalar15' @:: Lens' ExampleMessage (Data.Vector.Vector Data.ByteString.ByteString)@
+         * 'Proto.Spec_Fields.repeatedAnother' @:: Lens' ExampleMessage [AnotherMessage]@
+         * 'Proto.Spec_Fields.vec'repeatedAnother' @:: Lens' ExampleMessage (Data.Vector.Vector AnotherMessage)@
+         * 'Proto.Spec_Fields.repeatedNested' @:: Lens' ExampleMessage [ExampleMessage'NestedMessage]@
+         * 'Proto.Spec_Fields.vec'repeatedNested' @:: Lens' ExampleMessage (Data.Vector.Vector ExampleMessage'NestedMessage)@
+         * 'Proto.Spec_Fields.repeatedEnum' @:: Lens' ExampleMessage [ExampleEnum]@
+         * 'Proto.Spec_Fields.vec'repeatedEnum' @:: Lens' ExampleMessage (Data.Vector.Vector ExampleEnum)@
+         * 'Proto.Spec_Fields.mapScalar01' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Prelude.Double)@
+         * 'Proto.Spec_Fields.mapScalar02' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Prelude.Float)@
+         * 'Proto.Spec_Fields.mapScalar03' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Spec_Fields.mapScalar04' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Int.Int64)@
+         * 'Proto.Spec_Fields.mapScalar05' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Word.Word32)@
+         * 'Proto.Spec_Fields.mapScalar06' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Word.Word64)@
+         * 'Proto.Spec_Fields.mapScalar07' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Spec_Fields.mapScalar08' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Int.Int64)@
+         * 'Proto.Spec_Fields.mapScalar09' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Word.Word32)@
+         * 'Proto.Spec_Fields.mapScalar10' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Word.Word64)@
+         * 'Proto.Spec_Fields.mapScalar11' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Int.Int32)@
+         * 'Proto.Spec_Fields.mapScalar12' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Int.Int64)@
+         * 'Proto.Spec_Fields.mapScalar13' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Prelude.Bool)@
+         * 'Proto.Spec_Fields.mapScalar14' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.Text.Text)@
+         * 'Proto.Spec_Fields.mapScalar15' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text Data.ByteString.ByteString)@
+         * 'Proto.Spec_Fields.mapAnother' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text AnotherMessage)@
+         * 'Proto.Spec_Fields.mapNested' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text ExampleMessage'NestedMessage)@
+         * 'Proto.Spec_Fields.mapEnum' @:: Lens' ExampleMessage (Data.Map.Map Data.Text.Text ExampleEnum)@
+         * 'Proto.Spec_Fields.maybe'exampleOneOf' @:: Lens' ExampleMessage (Prelude.Maybe ExampleMessage'ExampleOneOf)@
+         * 'Proto.Spec_Fields.maybe'oneofScalar01' @:: Lens' ExampleMessage (Prelude.Maybe Prelude.Double)@
+         * 'Proto.Spec_Fields.oneofScalar01' @:: Lens' ExampleMessage Prelude.Double@
+         * 'Proto.Spec_Fields.maybe'oneofScalar02' @:: Lens' ExampleMessage (Prelude.Maybe Prelude.Float)@
+         * 'Proto.Spec_Fields.oneofScalar02' @:: Lens' ExampleMessage Prelude.Float@
+         * 'Proto.Spec_Fields.maybe'oneofScalar03' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int32)@
+         * 'Proto.Spec_Fields.oneofScalar03' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.maybe'oneofScalar04' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int64)@
+         * 'Proto.Spec_Fields.oneofScalar04' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.maybe'oneofScalar05' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word32)@
+         * 'Proto.Spec_Fields.oneofScalar05' @:: Lens' ExampleMessage Data.Word.Word32@
+         * 'Proto.Spec_Fields.maybe'oneofScalar06' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word64)@
+         * 'Proto.Spec_Fields.oneofScalar06' @:: Lens' ExampleMessage Data.Word.Word64@
+         * 'Proto.Spec_Fields.maybe'oneofScalar07' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int32)@
+         * 'Proto.Spec_Fields.oneofScalar07' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.maybe'oneofScalar08' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int64)@
+         * 'Proto.Spec_Fields.oneofScalar08' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.maybe'oneofScalar09' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word32)@
+         * 'Proto.Spec_Fields.oneofScalar09' @:: Lens' ExampleMessage Data.Word.Word32@
+         * 'Proto.Spec_Fields.maybe'oneofScalar10' @:: Lens' ExampleMessage (Prelude.Maybe Data.Word.Word64)@
+         * 'Proto.Spec_Fields.oneofScalar10' @:: Lens' ExampleMessage Data.Word.Word64@
+         * 'Proto.Spec_Fields.maybe'oneofScalar11' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int32)@
+         * 'Proto.Spec_Fields.oneofScalar11' @:: Lens' ExampleMessage Data.Int.Int32@
+         * 'Proto.Spec_Fields.maybe'oneofScalar12' @:: Lens' ExampleMessage (Prelude.Maybe Data.Int.Int64)@
+         * 'Proto.Spec_Fields.oneofScalar12' @:: Lens' ExampleMessage Data.Int.Int64@
+         * 'Proto.Spec_Fields.maybe'oneofScalar13' @:: Lens' ExampleMessage (Prelude.Maybe Prelude.Bool)@
+         * 'Proto.Spec_Fields.oneofScalar13' @:: Lens' ExampleMessage Prelude.Bool@
+         * 'Proto.Spec_Fields.maybe'oneofScalar14' @:: Lens' ExampleMessage (Prelude.Maybe Data.Text.Text)@
+         * 'Proto.Spec_Fields.oneofScalar14' @:: Lens' ExampleMessage Data.Text.Text@
+         * 'Proto.Spec_Fields.maybe'oneofScalar15' @:: Lens' ExampleMessage (Prelude.Maybe Data.ByteString.ByteString)@
+         * 'Proto.Spec_Fields.oneofScalar15' @:: Lens' ExampleMessage Data.ByteString.ByteString@
+         * 'Proto.Spec_Fields.maybe'oneofAnother' @:: Lens' ExampleMessage (Prelude.Maybe AnotherMessage)@
+         * 'Proto.Spec_Fields.oneofAnother' @:: Lens' ExampleMessage AnotherMessage@
+         * 'Proto.Spec_Fields.maybe'oneofNested' @:: Lens' ExampleMessage (Prelude.Maybe ExampleMessage'NestedMessage)@
+         * 'Proto.Spec_Fields.oneofNested' @:: Lens' ExampleMessage ExampleMessage'NestedMessage@
+         * 'Proto.Spec_Fields.maybe'oneofEnum' @:: Lens' ExampleMessage (Prelude.Maybe ExampleEnum)@
+         * 'Proto.Spec_Fields.oneofEnum' @:: Lens' ExampleMessage ExampleEnum@ -}
+data ExampleMessage
+  = ExampleMessage'_constructor {_ExampleMessage'defaultScalar01 :: !Prelude.Double,
+                                 _ExampleMessage'defaultScalar02 :: !Prelude.Float,
+                                 _ExampleMessage'defaultScalar03 :: !Data.Int.Int32,
+                                 _ExampleMessage'defaultScalar04 :: !Data.Int.Int64,
+                                 _ExampleMessage'defaultScalar05 :: !Data.Word.Word32,
+                                 _ExampleMessage'defaultScalar06 :: !Data.Word.Word64,
+                                 _ExampleMessage'defaultScalar07 :: !Data.Int.Int32,
+                                 _ExampleMessage'defaultScalar08 :: !Data.Int.Int64,
+                                 _ExampleMessage'defaultScalar09 :: !Data.Word.Word32,
+                                 _ExampleMessage'defaultScalar10 :: !Data.Word.Word64,
+                                 _ExampleMessage'defaultScalar11 :: !Data.Int.Int32,
+                                 _ExampleMessage'defaultScalar12 :: !Data.Int.Int64,
+                                 _ExampleMessage'defaultScalar13 :: !Prelude.Bool,
+                                 _ExampleMessage'defaultScalar14 :: !Data.Text.Text,
+                                 _ExampleMessage'defaultScalar15 :: !Data.ByteString.ByteString,
+                                 _ExampleMessage'defaultAnother :: !(Prelude.Maybe AnotherMessage),
+                                 _ExampleMessage'defaultNested :: !(Prelude.Maybe ExampleMessage'NestedMessage),
+                                 _ExampleMessage'defaultEnum :: !ExampleEnum,
+                                 _ExampleMessage'optionalScalar01 :: !(Prelude.Maybe Prelude.Double),
+                                 _ExampleMessage'optionalScalar02 :: !(Prelude.Maybe Prelude.Float),
+                                 _ExampleMessage'optionalScalar03 :: !(Prelude.Maybe Data.Int.Int32),
+                                 _ExampleMessage'optionalScalar04 :: !(Prelude.Maybe Data.Int.Int64),
+                                 _ExampleMessage'optionalScalar05 :: !(Prelude.Maybe Data.Word.Word32),
+                                 _ExampleMessage'optionalScalar06 :: !(Prelude.Maybe Data.Word.Word64),
+                                 _ExampleMessage'optionalScalar07 :: !(Prelude.Maybe Data.Int.Int32),
+                                 _ExampleMessage'optionalScalar08 :: !(Prelude.Maybe Data.Int.Int64),
+                                 _ExampleMessage'optionalScalar09 :: !(Prelude.Maybe Data.Word.Word32),
+                                 _ExampleMessage'optionalScalar10 :: !(Prelude.Maybe Data.Word.Word64),
+                                 _ExampleMessage'optionalScalar11 :: !(Prelude.Maybe Data.Int.Int32),
+                                 _ExampleMessage'optionalScalar12 :: !(Prelude.Maybe Data.Int.Int64),
+                                 _ExampleMessage'optionalScalar13 :: !(Prelude.Maybe Prelude.Bool),
+                                 _ExampleMessage'optionalScalar14 :: !(Prelude.Maybe Data.Text.Text),
+                                 _ExampleMessage'optionalScalar15 :: !(Prelude.Maybe Data.ByteString.ByteString),
+                                 _ExampleMessage'optionalAnother :: !(Prelude.Maybe AnotherMessage),
+                                 _ExampleMessage'optionalNested :: !(Prelude.Maybe ExampleMessage'NestedMessage),
+                                 _ExampleMessage'optionalEnum :: !(Prelude.Maybe ExampleEnum),
+                                 _ExampleMessage'repeatedScalar01 :: !(Data.Vector.Unboxed.Vector Prelude.Double),
+                                 _ExampleMessage'repeatedScalar02 :: !(Data.Vector.Unboxed.Vector Prelude.Float),
+                                 _ExampleMessage'repeatedScalar03 :: !(Data.Vector.Unboxed.Vector Data.Int.Int32),
+                                 _ExampleMessage'repeatedScalar04 :: !(Data.Vector.Unboxed.Vector Data.Int.Int64),
+                                 _ExampleMessage'repeatedScalar05 :: !(Data.Vector.Unboxed.Vector Data.Word.Word32),
+                                 _ExampleMessage'repeatedScalar06 :: !(Data.Vector.Unboxed.Vector Data.Word.Word64),
+                                 _ExampleMessage'repeatedScalar07 :: !(Data.Vector.Unboxed.Vector Data.Int.Int32),
+                                 _ExampleMessage'repeatedScalar08 :: !(Data.Vector.Unboxed.Vector Data.Int.Int64),
+                                 _ExampleMessage'repeatedScalar09 :: !(Data.Vector.Unboxed.Vector Data.Word.Word32),
+                                 _ExampleMessage'repeatedScalar10 :: !(Data.Vector.Unboxed.Vector Data.Word.Word64),
+                                 _ExampleMessage'repeatedScalar11 :: !(Data.Vector.Unboxed.Vector Data.Int.Int32),
+                                 _ExampleMessage'repeatedScalar12 :: !(Data.Vector.Unboxed.Vector Data.Int.Int64),
+                                 _ExampleMessage'repeatedScalar13 :: !(Data.Vector.Unboxed.Vector Prelude.Bool),
+                                 _ExampleMessage'repeatedScalar14 :: !(Data.Vector.Vector Data.Text.Text),
+                                 _ExampleMessage'repeatedScalar15 :: !(Data.Vector.Vector Data.ByteString.ByteString),
+                                 _ExampleMessage'repeatedAnother :: !(Data.Vector.Vector AnotherMessage),
+                                 _ExampleMessage'repeatedNested :: !(Data.Vector.Vector ExampleMessage'NestedMessage),
+                                 _ExampleMessage'repeatedEnum :: !(Data.Vector.Vector ExampleEnum),
+                                 _ExampleMessage'mapScalar01 :: !(Data.Map.Map Data.Text.Text Prelude.Double),
+                                 _ExampleMessage'mapScalar02 :: !(Data.Map.Map Data.Text.Text Prelude.Float),
+                                 _ExampleMessage'mapScalar03 :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                 _ExampleMessage'mapScalar04 :: !(Data.Map.Map Data.Text.Text Data.Int.Int64),
+                                 _ExampleMessage'mapScalar05 :: !(Data.Map.Map Data.Text.Text Data.Word.Word32),
+                                 _ExampleMessage'mapScalar06 :: !(Data.Map.Map Data.Text.Text Data.Word.Word64),
+                                 _ExampleMessage'mapScalar07 :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                 _ExampleMessage'mapScalar08 :: !(Data.Map.Map Data.Text.Text Data.Int.Int64),
+                                 _ExampleMessage'mapScalar09 :: !(Data.Map.Map Data.Text.Text Data.Word.Word32),
+                                 _ExampleMessage'mapScalar10 :: !(Data.Map.Map Data.Text.Text Data.Word.Word64),
+                                 _ExampleMessage'mapScalar11 :: !(Data.Map.Map Data.Text.Text Data.Int.Int32),
+                                 _ExampleMessage'mapScalar12 :: !(Data.Map.Map Data.Text.Text Data.Int.Int64),
+                                 _ExampleMessage'mapScalar13 :: !(Data.Map.Map Data.Text.Text Prelude.Bool),
+                                 _ExampleMessage'mapScalar14 :: !(Data.Map.Map Data.Text.Text Data.Text.Text),
+                                 _ExampleMessage'mapScalar15 :: !(Data.Map.Map Data.Text.Text Data.ByteString.ByteString),
+                                 _ExampleMessage'mapAnother :: !(Data.Map.Map Data.Text.Text AnotherMessage),
+                                 _ExampleMessage'mapNested :: !(Data.Map.Map Data.Text.Text ExampleMessage'NestedMessage),
+                                 _ExampleMessage'mapEnum :: !(Data.Map.Map Data.Text.Text ExampleEnum),
+                                 _ExampleMessage'exampleOneOf :: !(Prelude.Maybe ExampleMessage'ExampleOneOf),
+                                 _ExampleMessage'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+data ExampleMessage'ExampleOneOf
+  = ExampleMessage'OneofScalar01 !Prelude.Double |
+    ExampleMessage'OneofScalar02 !Prelude.Float |
+    ExampleMessage'OneofScalar03 !Data.Int.Int32 |
+    ExampleMessage'OneofScalar04 !Data.Int.Int64 |
+    ExampleMessage'OneofScalar05 !Data.Word.Word32 |
+    ExampleMessage'OneofScalar06 !Data.Word.Word64 |
+    ExampleMessage'OneofScalar07 !Data.Int.Int32 |
+    ExampleMessage'OneofScalar08 !Data.Int.Int64 |
+    ExampleMessage'OneofScalar09 !Data.Word.Word32 |
+    ExampleMessage'OneofScalar10 !Data.Word.Word64 |
+    ExampleMessage'OneofScalar11 !Data.Int.Int32 |
+    ExampleMessage'OneofScalar12 !Data.Int.Int64 |
+    ExampleMessage'OneofScalar13 !Prelude.Bool |
+    ExampleMessage'OneofScalar14 !Data.Text.Text |
+    ExampleMessage'OneofScalar15 !Data.ByteString.ByteString |
+    ExampleMessage'OneofAnother !AnotherMessage |
+    ExampleMessage'OneofNested !ExampleMessage'NestedMessage |
+    ExampleMessage'OneofEnum !ExampleEnum
+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar01" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar01
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar01 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar02" Prelude.Float where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar02
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar02 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar03" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar03
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar03 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar04" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar04
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar04 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar05" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar05
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar05 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar06" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar06
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar06 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar07" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar07
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar07 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar08" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar08
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar08 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar09" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar09
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar09 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar10" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar10
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar10 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar11" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar11
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar11 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar12" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar12
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar12 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar13" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar13
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar13 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar14" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar14
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar14 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultScalar15" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultScalar15
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultScalar15 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultAnother" AnotherMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultAnother = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'defaultAnother" (Prelude.Maybe AnotherMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultAnother = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultNested" ExampleMessage'NestedMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultNested
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultNested = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'defaultNested" (Prelude.Maybe ExampleMessage'NestedMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultNested
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultNested = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "defaultEnum" ExampleEnum where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'defaultEnum
+           (\ x__ y__ -> x__ {_ExampleMessage'defaultEnum = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar01" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar01
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar01 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar01" (Prelude.Maybe Prelude.Double) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar01
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar01 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar02" Prelude.Float where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar02
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar02 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar02" (Prelude.Maybe Prelude.Float) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar02
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar02 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar03" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar03
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar03 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar03" (Prelude.Maybe Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar03
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar03 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar04" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar04
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar04 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar04" (Prelude.Maybe Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar04
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar04 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar05" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar05
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar05 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar05" (Prelude.Maybe Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar05
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar05 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar06" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar06
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar06 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar06" (Prelude.Maybe Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar06
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar06 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar07" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar07
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar07 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar07" (Prelude.Maybe Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar07
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar07 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar08" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar08
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar08 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar08" (Prelude.Maybe Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar08
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar08 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar09" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar09
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar09 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar09" (Prelude.Maybe Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar09
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar09 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar10" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar10
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar10 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar10" (Prelude.Maybe Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar10
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar10 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar11" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar11
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar11 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar11" (Prelude.Maybe Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar11
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar11 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar12" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar12
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar12 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar12" (Prelude.Maybe Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar12
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar12 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar13" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar13
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar13 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar13" (Prelude.Maybe Prelude.Bool) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar13
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar13 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar14" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar14
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar14 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar14" (Prelude.Maybe Data.Text.Text) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar14
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar14 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalScalar15" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar15
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar15 = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalScalar15" (Prelude.Maybe Data.ByteString.ByteString) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalScalar15
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalScalar15 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalAnother" AnotherMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalAnother = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalAnother" (Prelude.Maybe AnotherMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalAnother = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalNested" ExampleMessage'NestedMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalNested
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalNested = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalNested" (Prelude.Maybe ExampleMessage'NestedMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalNested
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalNested = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "optionalEnum" ExampleEnum where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalEnum
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalEnum = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'optionalEnum" (Prelude.Maybe ExampleEnum) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'optionalEnum
+           (\ x__ y__ -> x__ {_ExampleMessage'optionalEnum = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar01" [Prelude.Double] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar01
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar01 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar01" (Data.Vector.Unboxed.Vector Prelude.Double) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar01
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar01 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar02" [Prelude.Float] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar02
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar02 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar02" (Data.Vector.Unboxed.Vector Prelude.Float) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar02
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar02 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar03" [Data.Int.Int32] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar03
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar03 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar03" (Data.Vector.Unboxed.Vector Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar03
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar03 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar04" [Data.Int.Int64] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar04
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar04 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar04" (Data.Vector.Unboxed.Vector Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar04
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar04 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar05" [Data.Word.Word32] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar05
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar05 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar05" (Data.Vector.Unboxed.Vector Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar05
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar05 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar06" [Data.Word.Word64] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar06
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar06 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar06" (Data.Vector.Unboxed.Vector Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar06
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar06 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar07" [Data.Int.Int32] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar07
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar07 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar07" (Data.Vector.Unboxed.Vector Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar07
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar07 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar08" [Data.Int.Int64] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar08
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar08 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar08" (Data.Vector.Unboxed.Vector Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar08
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar08 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar09" [Data.Word.Word32] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar09
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar09 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar09" (Data.Vector.Unboxed.Vector Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar09
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar09 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar10" [Data.Word.Word64] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar10
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar10 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar10" (Data.Vector.Unboxed.Vector Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar10
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar10 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar11" [Data.Int.Int32] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar11
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar11 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar11" (Data.Vector.Unboxed.Vector Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar11
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar11 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar12" [Data.Int.Int64] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar12
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar12 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar12" (Data.Vector.Unboxed.Vector Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar12
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar12 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar13" [Prelude.Bool] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar13
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar13 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar13" (Data.Vector.Unboxed.Vector Prelude.Bool) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar13
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar13 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar14" [Data.Text.Text] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar14
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar14 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar14" (Data.Vector.Vector Data.Text.Text) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar14
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar14 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedScalar15" [Data.ByteString.ByteString] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar15
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar15 = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedScalar15" (Data.Vector.Vector Data.ByteString.ByteString) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedScalar15
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedScalar15 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedAnother" [AnotherMessage] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedAnother = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedAnother" (Data.Vector.Vector AnotherMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedAnother = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedNested" [ExampleMessage'NestedMessage] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedNested
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedNested = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedNested" (Data.Vector.Vector ExampleMessage'NestedMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedNested
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedNested = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "repeatedEnum" [ExampleEnum] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedEnum
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedEnum = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "vec'repeatedEnum" (Data.Vector.Vector ExampleEnum) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'repeatedEnum
+           (\ x__ y__ -> x__ {_ExampleMessage'repeatedEnum = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar01" (Data.Map.Map Data.Text.Text Prelude.Double) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar01
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar01 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar02" (Data.Map.Map Data.Text.Text Prelude.Float) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar02
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar02 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar03" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar03
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar03 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar04" (Data.Map.Map Data.Text.Text Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar04
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar04 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar05" (Data.Map.Map Data.Text.Text Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar05
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar05 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar06" (Data.Map.Map Data.Text.Text Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar06
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar06 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar07" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar07
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar07 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar08" (Data.Map.Map Data.Text.Text Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar08
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar08 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar09" (Data.Map.Map Data.Text.Text Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar09
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar09 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar10" (Data.Map.Map Data.Text.Text Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar10
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar10 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar11" (Data.Map.Map Data.Text.Text Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar11
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar11 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar12" (Data.Map.Map Data.Text.Text Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar12
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar12 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar13" (Data.Map.Map Data.Text.Text Prelude.Bool) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar13
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar13 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar14" (Data.Map.Map Data.Text.Text Data.Text.Text) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar14
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar14 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapScalar15" (Data.Map.Map Data.Text.Text Data.ByteString.ByteString) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapScalar15
+           (\ x__ y__ -> x__ {_ExampleMessage'mapScalar15 = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapAnother" (Data.Map.Map Data.Text.Text AnotherMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapAnother
+           (\ x__ y__ -> x__ {_ExampleMessage'mapAnother = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapNested" (Data.Map.Map Data.Text.Text ExampleMessage'NestedMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapNested
+           (\ x__ y__ -> x__ {_ExampleMessage'mapNested = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "mapEnum" (Data.Map.Map Data.Text.Text ExampleEnum) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'mapEnum
+           (\ x__ y__ -> x__ {_ExampleMessage'mapEnum = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'exampleOneOf" (Prelude.Maybe ExampleMessage'ExampleOneOf) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar01" (Prelude.Maybe Prelude.Double) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar01 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar01 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar01" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar01 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar01 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar02" (Prelude.Maybe Prelude.Float) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar02 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar02 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar02" Prelude.Float where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar02 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar02 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar03" (Prelude.Maybe Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar03 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar03 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar03" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar03 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar03 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar04" (Prelude.Maybe Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar04 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar04 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar04" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar04 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar04 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar05" (Prelude.Maybe Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar05 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar05 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar05" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar05 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar05 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar06" (Prelude.Maybe Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar06 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar06 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar06" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar06 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar06 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar07" (Prelude.Maybe Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar07 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar07 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar07" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar07 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar07 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar08" (Prelude.Maybe Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar08 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar08 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar08" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar08 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar08 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar09" (Prelude.Maybe Data.Word.Word32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar09 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar09 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar09" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar09 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar09 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar10" (Prelude.Maybe Data.Word.Word64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar10 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar10 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar10" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar10 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar10 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar11" (Prelude.Maybe Data.Int.Int32) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar11 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar11 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar11" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar11 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar11 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar12" (Prelude.Maybe Data.Int.Int64) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar12 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar12 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar12" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar12 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar12 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar13" (Prelude.Maybe Prelude.Bool) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar13 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar13 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar13" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar13 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar13 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar14" (Prelude.Maybe Data.Text.Text) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar14 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar14 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar14" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar14 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar14 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofScalar15" (Prelude.Maybe Data.ByteString.ByteString) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofScalar15 x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar15 y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofScalar15" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofScalar15 x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofScalar15 y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofAnother" (Prelude.Maybe AnotherMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofAnother x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofAnother y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofAnother" AnotherMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofAnother x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofAnother y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofNested" (Prelude.Maybe ExampleMessage'NestedMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofNested x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofNested y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofNested" ExampleMessage'NestedMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofNested x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofNested y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
+instance Data.ProtoLens.Field.HasField ExampleMessage "maybe'oneofEnum" (Prelude.Maybe ExampleEnum) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        (Lens.Family2.Unchecked.lens
+           (\ x__
+              -> case x__ of
+                   (Prelude.Just (ExampleMessage'OneofEnum x__val))
+                     -> Prelude.Just x__val
+                   _otherwise -> Prelude.Nothing)
+           (\ _ y__ -> Prelude.fmap ExampleMessage'OneofEnum y__))
+instance Data.ProtoLens.Field.HasField ExampleMessage "oneofEnum" ExampleEnum where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'exampleOneOf
+           (\ x__ y__ -> x__ {_ExampleMessage'exampleOneOf = y__}))
+        ((Prelude..)
+           (Lens.Family2.Unchecked.lens
+              (\ x__
+                 -> case x__ of
+                      (Prelude.Just (ExampleMessage'OneofEnum x__val))
+                        -> Prelude.Just x__val
+                      _otherwise -> Prelude.Nothing)
+              (\ _ y__ -> Prelude.fmap ExampleMessage'OneofEnum y__))
+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
+instance Data.ProtoLens.Message ExampleMessage where
+  messageName _ = Data.Text.pack "ExampleMessage"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOExampleMessage\DC2(\n\
+      \\SIdefaultScalar01\CANe \SOH(\SOHR\SIdefaultScalar01\DC2(\n\
+      \\SIdefaultScalar02\CANf \SOH(\STXR\SIdefaultScalar02\DC2(\n\
+      \\SIdefaultScalar03\CANg \SOH(\ENQR\SIdefaultScalar03\DC2(\n\
+      \\SIdefaultScalar04\CANh \SOH(\ETXR\SIdefaultScalar04\DC2(\n\
+      \\SIdefaultScalar05\CANi \SOH(\rR\SIdefaultScalar05\DC2(\n\
+      \\SIdefaultScalar06\CANj \SOH(\EOTR\SIdefaultScalar06\DC2(\n\
+      \\SIdefaultScalar07\CANk \SOH(\DC1R\SIdefaultScalar07\DC2(\n\
+      \\SIdefaultScalar08\CANl \SOH(\DC2R\SIdefaultScalar08\DC2(\n\
+      \\SIdefaultScalar09\CANm \SOH(\aR\SIdefaultScalar09\DC2(\n\
+      \\SIdefaultScalar10\CANn \SOH(\ACKR\SIdefaultScalar10\DC2(\n\
+      \\SIdefaultScalar11\CANo \SOH(\SIR\SIdefaultScalar11\DC2(\n\
+      \\SIdefaultScalar12\CANp \SOH(\DLER\SIdefaultScalar12\DC2(\n\
+      \\SIdefaultScalar13\CANq \SOH(\bR\SIdefaultScalar13\DC2(\n\
+      \\SIdefaultScalar14\CANr \SOH(\tR\SIdefaultScalar14\DC2(\n\
+      \\SIdefaultScalar15\CANs \SOH(\fR\SIdefaultScalar15\DC27\n\
+      \\SOdefaultAnother\CANt \SOH(\v2\SI.AnotherMessageR\SOdefaultAnother\DC2C\n\
+      \\rdefaultNested\CANu \SOH(\v2\GS.ExampleMessage.NestedMessageR\rdefaultNested\DC2.\n\
+      \\vdefaultEnum\CANv \SOH(\SO2\f.ExampleEnumR\vdefaultEnum\DC20\n\
+      \\DLEoptionalScalar01\CAN\201\SOH \SOH(\SOHH\SOHR\DLEoptionalScalar01\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar02\CAN\202\SOH \SOH(\STXH\STXR\DLEoptionalScalar02\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar03\CAN\203\SOH \SOH(\ENQH\ETXR\DLEoptionalScalar03\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar04\CAN\204\SOH \SOH(\ETXH\EOTR\DLEoptionalScalar04\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar05\CAN\205\SOH \SOH(\rH\ENQR\DLEoptionalScalar05\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar06\CAN\206\SOH \SOH(\EOTH\ACKR\DLEoptionalScalar06\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar07\CAN\207\SOH \SOH(\DC1H\aR\DLEoptionalScalar07\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar08\CAN\208\SOH \SOH(\DC2H\bR\DLEoptionalScalar08\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar09\CAN\209\SOH \SOH(\aH\tR\DLEoptionalScalar09\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar10\CAN\210\SOH \SOH(\ACKH\n\
+      \R\DLEoptionalScalar10\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar11\CAN\211\SOH \SOH(\SIH\vR\DLEoptionalScalar11\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar12\CAN\212\SOH \SOH(\DLEH\fR\DLEoptionalScalar12\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar13\CAN\213\SOH \SOH(\bH\rR\DLEoptionalScalar13\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar14\CAN\214\SOH \SOH(\tH\SOR\DLEoptionalScalar14\136\SOH\SOH\DC20\n\
+      \\DLEoptionalScalar15\CAN\215\SOH \SOH(\fH\SIR\DLEoptionalScalar15\136\SOH\SOH\DC2?\n\
+      \\SIoptionalAnother\CAN\216\SOH \SOH(\v2\SI.AnotherMessageH\DLER\SIoptionalAnother\136\SOH\SOH\DC2K\n\
+      \\SOoptionalNested\CAN\217\SOH \SOH(\v2\GS.ExampleMessage.NestedMessageH\DC1R\SOoptionalNested\136\SOH\SOH\DC26\n\
+      \\foptionalEnum\CAN\218\SOH \SOH(\SO2\f.ExampleEnumH\DC2R\foptionalEnum\136\SOH\SOH\DC2+\n\
+      \\DLErepeatedScalar01\CAN\173\STX \ETX(\SOHR\DLErepeatedScalar01\DC2+\n\
+      \\DLErepeatedScalar02\CAN\174\STX \ETX(\STXR\DLErepeatedScalar02\DC2+\n\
+      \\DLErepeatedScalar03\CAN\175\STX \ETX(\ENQR\DLErepeatedScalar03\DC2+\n\
+      \\DLErepeatedScalar04\CAN\176\STX \ETX(\ETXR\DLErepeatedScalar04\DC2+\n\
+      \\DLErepeatedScalar05\CAN\177\STX \ETX(\rR\DLErepeatedScalar05\DC2+\n\
+      \\DLErepeatedScalar06\CAN\178\STX \ETX(\EOTR\DLErepeatedScalar06\DC2+\n\
+      \\DLErepeatedScalar07\CAN\179\STX \ETX(\DC1R\DLErepeatedScalar07\DC2+\n\
+      \\DLErepeatedScalar08\CAN\180\STX \ETX(\DC2R\DLErepeatedScalar08\DC2+\n\
+      \\DLErepeatedScalar09\CAN\181\STX \ETX(\aR\DLErepeatedScalar09\DC2+\n\
+      \\DLErepeatedScalar10\CAN\182\STX \ETX(\ACKR\DLErepeatedScalar10\DC2+\n\
+      \\DLErepeatedScalar11\CAN\183\STX \ETX(\SIR\DLErepeatedScalar11\DC2+\n\
+      \\DLErepeatedScalar12\CAN\184\STX \ETX(\DLER\DLErepeatedScalar12\DC2+\n\
+      \\DLErepeatedScalar13\CAN\185\STX \ETX(\bR\DLErepeatedScalar13\DC2+\n\
+      \\DLErepeatedScalar14\CAN\186\STX \ETX(\tR\DLErepeatedScalar14\DC2+\n\
+      \\DLErepeatedScalar15\CAN\187\STX \ETX(\fR\DLErepeatedScalar15\DC2:\n\
+      \\SIrepeatedAnother\CAN\188\STX \ETX(\v2\SI.AnotherMessageR\SIrepeatedAnother\DC2F\n\
+      \\SOrepeatedNested\CAN\189\STX \ETX(\v2\GS.ExampleMessage.NestedMessageR\SOrepeatedNested\DC21\n\
+      \\frepeatedEnum\CAN\190\STX \ETX(\SO2\f.ExampleEnumR\frepeatedEnum\DC2C\n\
+      \\vmapScalar01\CAN\145\ETX \ETX(\v2 .ExampleMessage.MapScalar01EntryR\vmapScalar01\DC2C\n\
+      \\vmapScalar02\CAN\146\ETX \ETX(\v2 .ExampleMessage.MapScalar02EntryR\vmapScalar02\DC2C\n\
+      \\vmapScalar03\CAN\147\ETX \ETX(\v2 .ExampleMessage.MapScalar03EntryR\vmapScalar03\DC2C\n\
+      \\vmapScalar04\CAN\148\ETX \ETX(\v2 .ExampleMessage.MapScalar04EntryR\vmapScalar04\DC2C\n\
+      \\vmapScalar05\CAN\149\ETX \ETX(\v2 .ExampleMessage.MapScalar05EntryR\vmapScalar05\DC2C\n\
+      \\vmapScalar06\CAN\150\ETX \ETX(\v2 .ExampleMessage.MapScalar06EntryR\vmapScalar06\DC2C\n\
+      \\vmapScalar07\CAN\151\ETX \ETX(\v2 .ExampleMessage.MapScalar07EntryR\vmapScalar07\DC2C\n\
+      \\vmapScalar08\CAN\152\ETX \ETX(\v2 .ExampleMessage.MapScalar08EntryR\vmapScalar08\DC2C\n\
+      \\vmapScalar09\CAN\153\ETX \ETX(\v2 .ExampleMessage.MapScalar09EntryR\vmapScalar09\DC2C\n\
+      \\vmapScalar10\CAN\154\ETX \ETX(\v2 .ExampleMessage.MapScalar10EntryR\vmapScalar10\DC2C\n\
+      \\vmapScalar11\CAN\155\ETX \ETX(\v2 .ExampleMessage.MapScalar11EntryR\vmapScalar11\DC2C\n\
+      \\vmapScalar12\CAN\156\ETX \ETX(\v2 .ExampleMessage.MapScalar12EntryR\vmapScalar12\DC2C\n\
+      \\vmapScalar13\CAN\157\ETX \ETX(\v2 .ExampleMessage.MapScalar13EntryR\vmapScalar13\DC2C\n\
+      \\vmapScalar14\CAN\158\ETX \ETX(\v2 .ExampleMessage.MapScalar14EntryR\vmapScalar14\DC2C\n\
+      \\vmapScalar15\CAN\159\ETX \ETX(\v2 .ExampleMessage.MapScalar15EntryR\vmapScalar15\DC2@\n\
+      \\n\
+      \mapAnother\CAN\160\ETX \ETX(\v2\US.ExampleMessage.MapAnotherEntryR\n\
+      \mapAnother\DC2=\n\
+      \\tmapNested\CAN\161\ETX \ETX(\v2\RS.ExampleMessage.MapNestedEntryR\tmapNested\DC27\n\
+      \\amapEnum\CAN\162\ETX \ETX(\v2\FS.ExampleMessage.MapEnumEntryR\amapEnum\DC2'\n\
+      \\roneofScalar01\CAN\245\ETX \SOH(\SOHH\NULR\roneofScalar01\DC2'\n\
+      \\roneofScalar02\CAN\246\ETX \SOH(\STXH\NULR\roneofScalar02\DC2'\n\
+      \\roneofScalar03\CAN\247\ETX \SOH(\ENQH\NULR\roneofScalar03\DC2'\n\
+      \\roneofScalar04\CAN\248\ETX \SOH(\ETXH\NULR\roneofScalar04\DC2'\n\
+      \\roneofScalar05\CAN\249\ETX \SOH(\rH\NULR\roneofScalar05\DC2'\n\
+      \\roneofScalar06\CAN\250\ETX \SOH(\EOTH\NULR\roneofScalar06\DC2'\n\
+      \\roneofScalar07\CAN\251\ETX \SOH(\DC1H\NULR\roneofScalar07\DC2'\n\
+      \\roneofScalar08\CAN\252\ETX \SOH(\DC2H\NULR\roneofScalar08\DC2'\n\
+      \\roneofScalar09\CAN\253\ETX \SOH(\aH\NULR\roneofScalar09\DC2'\n\
+      \\roneofScalar10\CAN\254\ETX \SOH(\ACKH\NULR\roneofScalar10\DC2'\n\
+      \\roneofScalar11\CAN\255\ETX \SOH(\SIH\NULR\roneofScalar11\DC2'\n\
+      \\roneofScalar12\CAN\128\EOT \SOH(\DLEH\NULR\roneofScalar12\DC2'\n\
+      \\roneofScalar13\CAN\129\EOT \SOH(\bH\NULR\roneofScalar13\DC2'\n\
+      \\roneofScalar14\CAN\130\EOT \SOH(\tH\NULR\roneofScalar14\DC2'\n\
+      \\roneofScalar15\CAN\131\EOT \SOH(\fH\NULR\roneofScalar15\DC26\n\
+      \\foneofAnother\CAN\132\EOT \SOH(\v2\SI.AnotherMessageH\NULR\foneofAnother\DC2B\n\
+      \\voneofNested\CAN\133\EOT \SOH(\v2\GS.ExampleMessage.NestedMessageH\NULR\voneofNested\DC2-\n\
+      \\toneofEnum\CAN\134\EOT \SOH(\SO2\f.ExampleEnumH\NULR\toneofEnum\SUB\SI\n\
+      \\rNestedMessage\SUB>\n\
+      \\DLEMapScalar01Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar02Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\STXR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar03Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar04Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ETXR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar05Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\rR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar06Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\EOTR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar07Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\DC1R\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar08Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\DC2R\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar09Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\aR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar10Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ACKR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar11Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SIR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar12Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\DLER\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar13Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\bR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar14Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH\SUB>\n\
+      \\DLEMapScalar15Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue:\STX8\SOH\SUBN\n\
+      \\SIMapAnotherEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2%\n\
+      \\ENQvalue\CAN\STX \SOH(\v2\SI.AnotherMessageR\ENQvalue:\STX8\SOH\SUB[\n\
+      \\SOMapNestedEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC23\n\
+      \\ENQvalue\CAN\STX \SOH(\v2\GS.ExampleMessage.NestedMessageR\ENQvalue:\STX8\SOH\SUBH\n\
+      \\fMapEnumEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\"\n\
+      \\ENQvalue\CAN\STX \SOH(\SO2\f.ExampleEnumR\ENQvalue:\STX8\SOHB\SO\n\
+      \\fexampleOneOfB\DC3\n\
+      \\DC1_optionalScalar01B\DC3\n\
+      \\DC1_optionalScalar02B\DC3\n\
+      \\DC1_optionalScalar03B\DC3\n\
+      \\DC1_optionalScalar04B\DC3\n\
+      \\DC1_optionalScalar05B\DC3\n\
+      \\DC1_optionalScalar06B\DC3\n\
+      \\DC1_optionalScalar07B\DC3\n\
+      \\DC1_optionalScalar08B\DC3\n\
+      \\DC1_optionalScalar09B\DC3\n\
+      \\DC1_optionalScalar10B\DC3\n\
+      \\DC1_optionalScalar11B\DC3\n\
+      \\DC1_optionalScalar12B\DC3\n\
+      \\DC1_optionalScalar13B\DC3\n\
+      \\DC1_optionalScalar14B\DC3\n\
+      \\DC1_optionalScalar15B\DC2\n\
+      \\DLE_optionalAnotherB\DC1\n\
+      \\SI_optionalNestedB\SI\n\
+      \\r_optionalEnum"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        defaultScalar01__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar01"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar01")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar02__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar02"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar02")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar03__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar03"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar03")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar04__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar04"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar04")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar05__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar05"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar05")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar06__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar06"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar06")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar07__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar07"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar07")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar08__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar08"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar08")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar09__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar09"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar09")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar10__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar10"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar10")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar11__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar11"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar11")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar12__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar12"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar12")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar13__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar13"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar13")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar14__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar14"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar14")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultScalar15__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultScalar15"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultScalar15")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultAnother__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultAnother"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor AnotherMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'defaultAnother")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultNested__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultNested"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'NestedMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'defaultNested")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        defaultEnum__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "defaultEnum"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleEnum)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional
+                 (Data.ProtoLens.Field.field @"defaultEnum")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar01__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar01"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar01")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar02__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar02"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar02")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar03__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar03"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar03")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar04__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar04"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar04")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar05__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar05"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar05")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar06__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar06"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar06")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar07__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar07"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar07")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar08__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar08"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar08")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar09__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar09"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar09")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar10__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar10"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar10")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar11__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar11"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar11")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar12__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar12"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar12")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar13__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar13"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar13")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar14__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar14"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar14")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalScalar15__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalScalar15"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalScalar15")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalAnother__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalAnother"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor AnotherMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalAnother")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalNested__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalNested"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'NestedMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalNested")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        optionalEnum__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "optionalEnum"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleEnum)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'optionalEnum")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar01__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar01"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar01")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar02__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar02"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar02")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar03__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar03"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar03")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar04__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar04"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar04")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar05__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar05"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar05")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar06__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar06"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar06")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar07__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar07"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar07")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar08__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar08"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar08")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar09__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar09"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar09")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar10__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar10"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar10")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar11__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar11"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar11")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar12__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar12"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar12")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar13__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar13"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedScalar13")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar14__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar14"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"repeatedScalar14")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedScalar15__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedScalar15"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"repeatedScalar15")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedAnother__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedAnother"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor AnotherMessage)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"repeatedAnother")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedNested__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedNested"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'NestedMessage)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked
+                 (Data.ProtoLens.Field.field @"repeatedNested")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        repeatedEnum__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "repeatedEnum"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleEnum)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Packed
+                 (Data.ProtoLens.Field.field @"repeatedEnum")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar01__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar01"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar01Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar01")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar02__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar02"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar02Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar02")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar03__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar03"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar03Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar03")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar04__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar04"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar04Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar04")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar05__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar05"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar05Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar05")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar06__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar06"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar06Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar06")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar07__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar07"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar07Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar07")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar08__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar08"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar08Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar08")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar09__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar09"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar09Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar09")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar10__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar10"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar10Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar10")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar11__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar11"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar11Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar11")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar12__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar12"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar12Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar12")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar13__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar13"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar13Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar13")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar14__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar14"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar14Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar14")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapScalar15__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapScalar15"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapScalar15Entry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapScalar15")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapAnother__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapAnother"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapAnotherEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapAnother")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapNested__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapNested"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapNestedEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapNested")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        mapEnum__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "mapEnum"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'MapEnumEntry)
+              (Data.ProtoLens.MapField
+                 (Data.ProtoLens.Field.field @"key")
+                 (Data.ProtoLens.Field.field @"value")
+                 (Data.ProtoLens.Field.field @"mapEnum")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar01__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar01"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar01")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar02__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar02"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar02")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar03__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar03"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar03")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar04__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar04"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar04")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar05__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar05"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar05")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar06__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar06"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar06")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar07__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar07"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar07")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar08__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar08"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar08")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar09__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar09"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar09")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar10__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar10"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar10")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar11__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar11"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar11")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar12__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar12"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar12")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar13__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar13"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar13")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar14__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar14"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar14")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofScalar15__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofScalar15"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofScalar15")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofAnother__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofAnother"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor AnotherMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofAnother")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofNested__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofNested"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'NestedMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofNested")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+        oneofEnum__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "oneofEnum"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleEnum)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'oneofEnum")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 101, defaultScalar01__field_descriptor),
+           (Data.ProtoLens.Tag 102, defaultScalar02__field_descriptor),
+           (Data.ProtoLens.Tag 103, defaultScalar03__field_descriptor),
+           (Data.ProtoLens.Tag 104, defaultScalar04__field_descriptor),
+           (Data.ProtoLens.Tag 105, defaultScalar05__field_descriptor),
+           (Data.ProtoLens.Tag 106, defaultScalar06__field_descriptor),
+           (Data.ProtoLens.Tag 107, defaultScalar07__field_descriptor),
+           (Data.ProtoLens.Tag 108, defaultScalar08__field_descriptor),
+           (Data.ProtoLens.Tag 109, defaultScalar09__field_descriptor),
+           (Data.ProtoLens.Tag 110, defaultScalar10__field_descriptor),
+           (Data.ProtoLens.Tag 111, defaultScalar11__field_descriptor),
+           (Data.ProtoLens.Tag 112, defaultScalar12__field_descriptor),
+           (Data.ProtoLens.Tag 113, defaultScalar13__field_descriptor),
+           (Data.ProtoLens.Tag 114, defaultScalar14__field_descriptor),
+           (Data.ProtoLens.Tag 115, defaultScalar15__field_descriptor),
+           (Data.ProtoLens.Tag 116, defaultAnother__field_descriptor),
+           (Data.ProtoLens.Tag 117, defaultNested__field_descriptor),
+           (Data.ProtoLens.Tag 118, defaultEnum__field_descriptor),
+           (Data.ProtoLens.Tag 201, optionalScalar01__field_descriptor),
+           (Data.ProtoLens.Tag 202, optionalScalar02__field_descriptor),
+           (Data.ProtoLens.Tag 203, optionalScalar03__field_descriptor),
+           (Data.ProtoLens.Tag 204, optionalScalar04__field_descriptor),
+           (Data.ProtoLens.Tag 205, optionalScalar05__field_descriptor),
+           (Data.ProtoLens.Tag 206, optionalScalar06__field_descriptor),
+           (Data.ProtoLens.Tag 207, optionalScalar07__field_descriptor),
+           (Data.ProtoLens.Tag 208, optionalScalar08__field_descriptor),
+           (Data.ProtoLens.Tag 209, optionalScalar09__field_descriptor),
+           (Data.ProtoLens.Tag 210, optionalScalar10__field_descriptor),
+           (Data.ProtoLens.Tag 211, optionalScalar11__field_descriptor),
+           (Data.ProtoLens.Tag 212, optionalScalar12__field_descriptor),
+           (Data.ProtoLens.Tag 213, optionalScalar13__field_descriptor),
+           (Data.ProtoLens.Tag 214, optionalScalar14__field_descriptor),
+           (Data.ProtoLens.Tag 215, optionalScalar15__field_descriptor),
+           (Data.ProtoLens.Tag 216, optionalAnother__field_descriptor),
+           (Data.ProtoLens.Tag 217, optionalNested__field_descriptor),
+           (Data.ProtoLens.Tag 218, optionalEnum__field_descriptor),
+           (Data.ProtoLens.Tag 301, repeatedScalar01__field_descriptor),
+           (Data.ProtoLens.Tag 302, repeatedScalar02__field_descriptor),
+           (Data.ProtoLens.Tag 303, repeatedScalar03__field_descriptor),
+           (Data.ProtoLens.Tag 304, repeatedScalar04__field_descriptor),
+           (Data.ProtoLens.Tag 305, repeatedScalar05__field_descriptor),
+           (Data.ProtoLens.Tag 306, repeatedScalar06__field_descriptor),
+           (Data.ProtoLens.Tag 307, repeatedScalar07__field_descriptor),
+           (Data.ProtoLens.Tag 308, repeatedScalar08__field_descriptor),
+           (Data.ProtoLens.Tag 309, repeatedScalar09__field_descriptor),
+           (Data.ProtoLens.Tag 310, repeatedScalar10__field_descriptor),
+           (Data.ProtoLens.Tag 311, repeatedScalar11__field_descriptor),
+           (Data.ProtoLens.Tag 312, repeatedScalar12__field_descriptor),
+           (Data.ProtoLens.Tag 313, repeatedScalar13__field_descriptor),
+           (Data.ProtoLens.Tag 314, repeatedScalar14__field_descriptor),
+           (Data.ProtoLens.Tag 315, repeatedScalar15__field_descriptor),
+           (Data.ProtoLens.Tag 316, repeatedAnother__field_descriptor),
+           (Data.ProtoLens.Tag 317, repeatedNested__field_descriptor),
+           (Data.ProtoLens.Tag 318, repeatedEnum__field_descriptor),
+           (Data.ProtoLens.Tag 401, mapScalar01__field_descriptor),
+           (Data.ProtoLens.Tag 402, mapScalar02__field_descriptor),
+           (Data.ProtoLens.Tag 403, mapScalar03__field_descriptor),
+           (Data.ProtoLens.Tag 404, mapScalar04__field_descriptor),
+           (Data.ProtoLens.Tag 405, mapScalar05__field_descriptor),
+           (Data.ProtoLens.Tag 406, mapScalar06__field_descriptor),
+           (Data.ProtoLens.Tag 407, mapScalar07__field_descriptor),
+           (Data.ProtoLens.Tag 408, mapScalar08__field_descriptor),
+           (Data.ProtoLens.Tag 409, mapScalar09__field_descriptor),
+           (Data.ProtoLens.Tag 410, mapScalar10__field_descriptor),
+           (Data.ProtoLens.Tag 411, mapScalar11__field_descriptor),
+           (Data.ProtoLens.Tag 412, mapScalar12__field_descriptor),
+           (Data.ProtoLens.Tag 413, mapScalar13__field_descriptor),
+           (Data.ProtoLens.Tag 414, mapScalar14__field_descriptor),
+           (Data.ProtoLens.Tag 415, mapScalar15__field_descriptor),
+           (Data.ProtoLens.Tag 416, mapAnother__field_descriptor),
+           (Data.ProtoLens.Tag 417, mapNested__field_descriptor),
+           (Data.ProtoLens.Tag 418, mapEnum__field_descriptor),
+           (Data.ProtoLens.Tag 501, oneofScalar01__field_descriptor),
+           (Data.ProtoLens.Tag 502, oneofScalar02__field_descriptor),
+           (Data.ProtoLens.Tag 503, oneofScalar03__field_descriptor),
+           (Data.ProtoLens.Tag 504, oneofScalar04__field_descriptor),
+           (Data.ProtoLens.Tag 505, oneofScalar05__field_descriptor),
+           (Data.ProtoLens.Tag 506, oneofScalar06__field_descriptor),
+           (Data.ProtoLens.Tag 507, oneofScalar07__field_descriptor),
+           (Data.ProtoLens.Tag 508, oneofScalar08__field_descriptor),
+           (Data.ProtoLens.Tag 509, oneofScalar09__field_descriptor),
+           (Data.ProtoLens.Tag 510, oneofScalar10__field_descriptor),
+           (Data.ProtoLens.Tag 511, oneofScalar11__field_descriptor),
+           (Data.ProtoLens.Tag 512, oneofScalar12__field_descriptor),
+           (Data.ProtoLens.Tag 513, oneofScalar13__field_descriptor),
+           (Data.ProtoLens.Tag 514, oneofScalar14__field_descriptor),
+           (Data.ProtoLens.Tag 515, oneofScalar15__field_descriptor),
+           (Data.ProtoLens.Tag 516, oneofAnother__field_descriptor),
+           (Data.ProtoLens.Tag 517, oneofNested__field_descriptor),
+           (Data.ProtoLens.Tag 518, oneofEnum__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'_unknownFields
+        (\ x__ y__ -> x__ {_ExampleMessage'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'_constructor
+        {_ExampleMessage'defaultScalar01 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar02 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar03 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar04 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar05 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar06 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar07 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar08 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar09 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar10 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar11 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar12 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar13 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar14 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultScalar15 = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'defaultAnother = Prelude.Nothing,
+         _ExampleMessage'defaultNested = Prelude.Nothing,
+         _ExampleMessage'defaultEnum = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'optionalScalar01 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar02 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar03 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar04 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar05 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar06 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar07 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar08 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar09 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar10 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar11 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar12 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar13 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar14 = Prelude.Nothing,
+         _ExampleMessage'optionalScalar15 = Prelude.Nothing,
+         _ExampleMessage'optionalAnother = Prelude.Nothing,
+         _ExampleMessage'optionalNested = Prelude.Nothing,
+         _ExampleMessage'optionalEnum = Prelude.Nothing,
+         _ExampleMessage'repeatedScalar01 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar02 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar03 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar04 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar05 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar06 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar07 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar08 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar09 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar10 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar11 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar12 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar13 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar14 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedScalar15 = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedAnother = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedNested = Data.Vector.Generic.empty,
+         _ExampleMessage'repeatedEnum = Data.Vector.Generic.empty,
+         _ExampleMessage'mapScalar01 = Data.Map.empty,
+         _ExampleMessage'mapScalar02 = Data.Map.empty,
+         _ExampleMessage'mapScalar03 = Data.Map.empty,
+         _ExampleMessage'mapScalar04 = Data.Map.empty,
+         _ExampleMessage'mapScalar05 = Data.Map.empty,
+         _ExampleMessage'mapScalar06 = Data.Map.empty,
+         _ExampleMessage'mapScalar07 = Data.Map.empty,
+         _ExampleMessage'mapScalar08 = Data.Map.empty,
+         _ExampleMessage'mapScalar09 = Data.Map.empty,
+         _ExampleMessage'mapScalar10 = Data.Map.empty,
+         _ExampleMessage'mapScalar11 = Data.Map.empty,
+         _ExampleMessage'mapScalar12 = Data.Map.empty,
+         _ExampleMessage'mapScalar13 = Data.Map.empty,
+         _ExampleMessage'mapScalar14 = Data.Map.empty,
+         _ExampleMessage'mapScalar15 = Data.Map.empty,
+         _ExampleMessage'mapAnother = Data.Map.empty,
+         _ExampleMessage'mapNested = Data.Map.empty,
+         _ExampleMessage'mapEnum = Data.Map.empty,
+         _ExampleMessage'exampleOneOf = Prelude.Nothing,
+         _ExampleMessage'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld AnotherMessage
+             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ExampleEnum
+                -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ExampleMessage'NestedMessage
+                   -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Prelude.Double
+                      -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Prelude.Float
+                         -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int32
+                            -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int64
+                               -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Word.Word32
+                                  -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Word.Word64
+                                     -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int32
+                                        -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int64
+                                           -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Word.Word32
+                                              -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Word.Word64
+                                                 -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int32
+                                                    -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int64
+                                                       -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Prelude.Bool
+                                                          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text
+                                                             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.ByteString.ByteString
+                                                                -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage
+        loop
+          x
+          mutable'repeatedAnother
+          mutable'repeatedEnum
+          mutable'repeatedNested
+          mutable'repeatedScalar01
+          mutable'repeatedScalar02
+          mutable'repeatedScalar03
+          mutable'repeatedScalar04
+          mutable'repeatedScalar05
+          mutable'repeatedScalar06
+          mutable'repeatedScalar07
+          mutable'repeatedScalar08
+          mutable'repeatedScalar09
+          mutable'repeatedScalar10
+          mutable'repeatedScalar11
+          mutable'repeatedScalar12
+          mutable'repeatedScalar13
+          mutable'repeatedScalar14
+          mutable'repeatedScalar15
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'repeatedAnother <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                  (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                     mutable'repeatedAnother)
+                      frozen'repeatedEnum <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                               (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                  mutable'repeatedEnum)
+                      frozen'repeatedNested <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                 (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                    mutable'repeatedNested)
+                      frozen'repeatedScalar01 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar01)
+                      frozen'repeatedScalar02 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar02)
+                      frozen'repeatedScalar03 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar03)
+                      frozen'repeatedScalar04 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar04)
+                      frozen'repeatedScalar05 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar05)
+                      frozen'repeatedScalar06 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar06)
+                      frozen'repeatedScalar07 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar07)
+                      frozen'repeatedScalar08 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar08)
+                      frozen'repeatedScalar09 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar09)
+                      frozen'repeatedScalar10 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar10)
+                      frozen'repeatedScalar11 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar11)
+                      frozen'repeatedScalar12 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar12)
+                      frozen'repeatedScalar13 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar13)
+                      frozen'repeatedScalar14 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar14)
+                      frozen'repeatedScalar15 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                                      mutable'repeatedScalar15)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'repeatedAnother")
+                              frozen'repeatedAnother
+                              (Lens.Family2.set
+                                 (Data.ProtoLens.Field.field @"vec'repeatedEnum")
+                                 frozen'repeatedEnum
+                                 (Lens.Family2.set
+                                    (Data.ProtoLens.Field.field @"vec'repeatedNested")
+                                    frozen'repeatedNested
+                                    (Lens.Family2.set
+                                       (Data.ProtoLens.Field.field @"vec'repeatedScalar01")
+                                       frozen'repeatedScalar01
+                                       (Lens.Family2.set
+                                          (Data.ProtoLens.Field.field @"vec'repeatedScalar02")
+                                          frozen'repeatedScalar02
+                                          (Lens.Family2.set
+                                             (Data.ProtoLens.Field.field @"vec'repeatedScalar03")
+                                             frozen'repeatedScalar03
+                                             (Lens.Family2.set
+                                                (Data.ProtoLens.Field.field @"vec'repeatedScalar04")
+                                                frozen'repeatedScalar04
+                                                (Lens.Family2.set
+                                                   (Data.ProtoLens.Field.field
+                                                      @"vec'repeatedScalar05")
+                                                   frozen'repeatedScalar05
+                                                   (Lens.Family2.set
+                                                      (Data.ProtoLens.Field.field
+                                                         @"vec'repeatedScalar06")
+                                                      frozen'repeatedScalar06
+                                                      (Lens.Family2.set
+                                                         (Data.ProtoLens.Field.field
+                                                            @"vec'repeatedScalar07")
+                                                         frozen'repeatedScalar07
+                                                         (Lens.Family2.set
+                                                            (Data.ProtoLens.Field.field
+                                                               @"vec'repeatedScalar08")
+                                                            frozen'repeatedScalar08
+                                                            (Lens.Family2.set
+                                                               (Data.ProtoLens.Field.field
+                                                                  @"vec'repeatedScalar09")
+                                                               frozen'repeatedScalar09
+                                                               (Lens.Family2.set
+                                                                  (Data.ProtoLens.Field.field
+                                                                     @"vec'repeatedScalar10")
+                                                                  frozen'repeatedScalar10
+                                                                  (Lens.Family2.set
+                                                                     (Data.ProtoLens.Field.field
+                                                                        @"vec'repeatedScalar11")
+                                                                     frozen'repeatedScalar11
+                                                                     (Lens.Family2.set
+                                                                        (Data.ProtoLens.Field.field
+                                                                           @"vec'repeatedScalar12")
+                                                                        frozen'repeatedScalar12
+                                                                        (Lens.Family2.set
+                                                                           (Data.ProtoLens.Field.field
+                                                                              @"vec'repeatedScalar13")
+                                                                           frozen'repeatedScalar13
+                                                                           (Lens.Family2.set
+                                                                              (Data.ProtoLens.Field.field
+                                                                                 @"vec'repeatedScalar14")
+                                                                              frozen'repeatedScalar14
+                                                                              (Lens.Family2.set
+                                                                                 (Data.ProtoLens.Field.field
+                                                                                    @"vec'repeatedScalar15")
+                                                                                 frozen'repeatedScalar15
+                                                                                 x)))))))))))))))))))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        809
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "defaultScalar01"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar01") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        821
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToFloat
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "defaultScalar02"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar02") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        824
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "defaultScalar03"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar03") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        832
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "defaultScalar04"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar04") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        840
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "defaultScalar05"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar05") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        848
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "defaultScalar06"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar06") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        856
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt32
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "defaultScalar07"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar07") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        864
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt64
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "defaultScalar08"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar08") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        877
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed32 "defaultScalar09"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar09") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        881
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed64 "defaultScalar10"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar10") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        893
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "defaultScalar11"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar11") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        897
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "defaultScalar12"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar12") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        904
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "defaultScalar13"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar13") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        914
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "defaultScalar14"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar14") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        922
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "defaultScalar15"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultScalar15") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        930
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "defaultAnother"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultAnother") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        938
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "defaultNested"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"defaultNested") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        944
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "defaultEnum"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"defaultEnum") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1609
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "optionalScalar01"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar01") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1621
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToFloat
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "optionalScalar02"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar02") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1624
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "optionalScalar03"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar03") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1632
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "optionalScalar04"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar04") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1640
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "optionalScalar05"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar05") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1648
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "optionalScalar06"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar06") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1656
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt32
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "optionalScalar07"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar07") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1664
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt64
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "optionalScalar08"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar08") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1677
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed32 "optionalScalar09"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar09") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1681
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed64 "optionalScalar10"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar10") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1693
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "optionalScalar11"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar11") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1697
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "optionalScalar12"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar12") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1704
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "optionalScalar13"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar13") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1714
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "optionalScalar14"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar14") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1722
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "optionalScalar15"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalScalar15") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1730
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "optionalAnother"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalAnother") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1738
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "optionalNested"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalNested") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        1744
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "optionalEnum"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"optionalEnum") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        2409
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                           Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                        "repeatedScalar01"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar01 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested v mutable'repeatedScalar02
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2410
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                                                       Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                                                    "repeatedScalar01"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar01)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested y mutable'repeatedScalar02
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2421
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Data.ProtoLens.Encoding.Bytes.wordToFloat
+                                           Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                        "repeatedScalar02"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar02 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01 v
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2418
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Data.ProtoLens.Encoding.Bytes.wordToFloat
+                                                                       Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                                                    "repeatedScalar02"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar02)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01 y
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2424
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.fromIntegral
+                                           Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                        "repeatedScalar03"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar03 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 v mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2426
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.fromIntegral
+                                                                       Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                                                    "repeatedScalar03"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar03)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 y mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2432
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.fromIntegral
+                                           Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                        "repeatedScalar04"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar04 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03 v
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2434
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.fromIntegral
+                                                                       Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                                                    "repeatedScalar04"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar04)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03 y
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2440
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.fromIntegral
+                                           Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                        "repeatedScalar05"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar05 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 v mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2442
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.fromIntegral
+                                                                       Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                                                    "repeatedScalar05"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar05)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 y mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2448
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        Data.ProtoLens.Encoding.Bytes.getVarInt "repeatedScalar06"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar06 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05 v
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2450
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                    "repeatedScalar06"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar06)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05 y
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2456
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Data.ProtoLens.Encoding.Bytes.wordToSignedInt32
+                                           (Prelude.fmap
+                                              Prelude.fromIntegral
+                                              Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                        "repeatedScalar07"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar07 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 v mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2458
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Data.ProtoLens.Encoding.Bytes.wordToSignedInt32
+                                                                       (Prelude.fmap
+                                                                          Prelude.fromIntegral
+                                                                          Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                                                    "repeatedScalar07"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar07)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 y mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2464
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Data.ProtoLens.Encoding.Bytes.wordToSignedInt64
+                                           (Prelude.fmap
+                                              Prelude.fromIntegral
+                                              Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                        "repeatedScalar08"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar08 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07 v
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2466
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Data.ProtoLens.Encoding.Bytes.wordToSignedInt64
+                                                                       (Prelude.fmap
+                                                                          Prelude.fromIntegral
+                                                                          Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                                                    "repeatedScalar08"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar08)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07 y
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2477
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        Data.ProtoLens.Encoding.Bytes.getFixed32 "repeatedScalar09"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar09 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 v mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2474
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    Data.ProtoLens.Encoding.Bytes.getFixed32
+                                                                    "repeatedScalar09"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar09)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 y mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2481
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        Data.ProtoLens.Encoding.Bytes.getFixed64 "repeatedScalar10"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar10 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09 v
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2482
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    Data.ProtoLens.Encoding.Bytes.getFixed64
+                                                                    "repeatedScalar10"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar10)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09 y
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2493
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.fromIntegral
+                                           Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                        "repeatedScalar11"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar11 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 v mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2490
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.fromIntegral
+                                                                       Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                                                    "repeatedScalar11"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar11)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 y mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2497
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.fromIntegral
+                                           Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                        "repeatedScalar12"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar12 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11 v
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2498
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.fromIntegral
+                                                                       Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                                                    "repeatedScalar12"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar12)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11 y
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2504
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                        "repeatedScalar13"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar13 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 v mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2506
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       ((Prelude./=) 0)
+                                                                       Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                                                    "repeatedScalar13"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedScalar13)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 y mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2514
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.getText
+                                              (Prelude.fromIntegral len))
+                                        "repeatedScalar14"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar14 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13 v
+                                  mutable'repeatedScalar15
+                        2522
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.getBytes
+                                              (Prelude.fromIntegral len))
+                                        "repeatedScalar15"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedScalar15 y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 v
+                        2530
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "repeatedAnother"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedAnother y)
+                                loop
+                                  x v mutable'repeatedEnum mutable'repeatedNested
+                                  mutable'repeatedScalar01 mutable'repeatedScalar02
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2538
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "repeatedNested"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedNested y)
+                                loop
+                                  x mutable'repeatedAnother mutable'repeatedEnum v
+                                  mutable'repeatedScalar01 mutable'repeatedScalar02
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2544
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (Prelude.fmap
+                                           Prelude.toEnum
+                                           (Prelude.fmap
+                                              Prelude.fromIntegral
+                                              Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                        "repeatedEnum"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append
+                                          mutable'repeatedEnum y)
+                                loop
+                                  x mutable'repeatedAnother v mutable'repeatedNested
+                                  mutable'repeatedScalar01 mutable'repeatedScalar02
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        2546
+                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                        Data.ProtoLens.Encoding.Bytes.isolate
+                                          (Prelude.fromIntegral len)
+                                          ((let
+                                              ploop qs
+                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
+                                                     if packedEnd then
+                                                         Prelude.return qs
+                                                     else
+                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                    (Prelude.fmap
+                                                                       Prelude.toEnum
+                                                                       (Prelude.fmap
+                                                                          Prelude.fromIntegral
+                                                                          Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                                                    "repeatedEnum"
+                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                                                     (Data.ProtoLens.Encoding.Growing.append
+                                                                        qs q)
+                                                            ploop qs'
+                                            in ploop)
+                                             mutable'repeatedEnum)
+                                loop
+                                  x mutable'repeatedAnother y mutable'repeatedNested
+                                  mutable'repeatedScalar01 mutable'repeatedScalar02
+                                  mutable'repeatedScalar03 mutable'repeatedScalar04
+                                  mutable'repeatedScalar05 mutable'repeatedScalar06
+                                  mutable'repeatedScalar07 mutable'repeatedScalar08
+                                  mutable'repeatedScalar09 mutable'repeatedScalar10
+                                  mutable'repeatedScalar11 mutable'repeatedScalar12
+                                  mutable'repeatedScalar13 mutable'repeatedScalar14
+                                  mutable'repeatedScalar15
+                        3210
+                          -> do !(entry :: ExampleMessage'MapScalar01Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar01"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar01")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3218
+                          -> do !(entry :: ExampleMessage'MapScalar02Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar02"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar02")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3226
+                          -> do !(entry :: ExampleMessage'MapScalar03Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar03"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar03")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3234
+                          -> do !(entry :: ExampleMessage'MapScalar04Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar04"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar04")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3242
+                          -> do !(entry :: ExampleMessage'MapScalar05Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar05"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar05")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3250
+                          -> do !(entry :: ExampleMessage'MapScalar06Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar06"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar06")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3258
+                          -> do !(entry :: ExampleMessage'MapScalar07Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar07"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar07")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3266
+                          -> do !(entry :: ExampleMessage'MapScalar08Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar08"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar08")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3274
+                          -> do !(entry :: ExampleMessage'MapScalar09Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar09"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar09")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3282
+                          -> do !(entry :: ExampleMessage'MapScalar10Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar10"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar10")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3290
+                          -> do !(entry :: ExampleMessage'MapScalar11Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar11"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar11")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3298
+                          -> do !(entry :: ExampleMessage'MapScalar12Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar12"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar12")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3306
+                          -> do !(entry :: ExampleMessage'MapScalar13Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar13"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar13")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3314
+                          -> do !(entry :: ExampleMessage'MapScalar14Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar14"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar14")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3322
+                          -> do !(entry :: ExampleMessage'MapScalar15Entry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                 (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                     Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                       (Prelude.fromIntegral
+                                                                                          len)
+                                                                                       Data.ProtoLens.parseMessage)
+                                                                                 "mapScalar15"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapScalar15")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3330
+                          -> do !(entry :: ExampleMessage'MapAnotherEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                                (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                    Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                      (Prelude.fromIntegral
+                                                                                         len)
+                                                                                      Data.ProtoLens.parseMessage)
+                                                                                "mapAnother"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapAnother")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3338
+                          -> do !(entry :: ExampleMessage'MapNestedEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                               (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                   Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                     (Prelude.fromIntegral
+                                                                                        len)
+                                                                                     Data.ProtoLens.parseMessage)
+                                                                               "mapNested"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapNested")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        3346
+                          -> do !(entry :: ExampleMessage'MapEnumEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                                                             (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                                                                 Data.ProtoLens.Encoding.Bytes.isolate
+                                                                                   (Prelude.fromIntegral
+                                                                                      len)
+                                                                                   Data.ProtoLens.parseMessage)
+                                                                             "mapEnum"
+                                (let
+                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
+                                   value
+                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
+                                 in
+                                   loop
+                                     (Lens.Family2.over
+                                        (Data.ProtoLens.Field.field @"mapEnum")
+                                        (\ !t -> Data.Map.insert key value t) x)
+                                     mutable'repeatedAnother mutable'repeatedEnum
+                                     mutable'repeatedNested mutable'repeatedScalar01
+                                     mutable'repeatedScalar02 mutable'repeatedScalar03
+                                     mutable'repeatedScalar04 mutable'repeatedScalar05
+                                     mutable'repeatedScalar06 mutable'repeatedScalar07
+                                     mutable'repeatedScalar08 mutable'repeatedScalar09
+                                     mutable'repeatedScalar10 mutable'repeatedScalar11
+                                     mutable'repeatedScalar12 mutable'repeatedScalar13
+                                     mutable'repeatedScalar14 mutable'repeatedScalar15)
+                        4009
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "oneofScalar01"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar01") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4021
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToFloat
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "oneofScalar02"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar02") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4024
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "oneofScalar03"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar03") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4032
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "oneofScalar04"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar04") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4040
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "oneofScalar05"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar05") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4048
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "oneofScalar06"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar06") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4056
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt32
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "oneofScalar07"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar07") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4064
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt64
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "oneofScalar08"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar08") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4077
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed32 "oneofScalar09"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar09") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4081
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed64 "oneofScalar10"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar10") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4093
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "oneofScalar11"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar11") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4097
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "oneofScalar12"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar12") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4104
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "oneofScalar13"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar13") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4114
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "oneofScalar14"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar14") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4122
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "oneofScalar15"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofScalar15") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4130
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "oneofAnother"
+                                loop
+                                  (Lens.Family2.set
+                                     (Data.ProtoLens.Field.field @"oneofAnother") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4138
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "oneofNested"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"oneofNested") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        4144
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "oneofEnum"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"oneofEnum") y x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'repeatedAnother mutable'repeatedEnum
+                                  mutable'repeatedNested mutable'repeatedScalar01
+                                  mutable'repeatedScalar02 mutable'repeatedScalar03
+                                  mutable'repeatedScalar04 mutable'repeatedScalar05
+                                  mutable'repeatedScalar06 mutable'repeatedScalar07
+                                  mutable'repeatedScalar08 mutable'repeatedScalar09
+                                  mutable'repeatedScalar10 mutable'repeatedScalar11
+                                  mutable'repeatedScalar12 mutable'repeatedScalar13
+                                  mutable'repeatedScalar14 mutable'repeatedScalar15
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'repeatedAnother <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                           Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedEnum <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                        Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedNested <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                          Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar01 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar02 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar03 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar04 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar05 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar06 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar07 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar08 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar09 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar10 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar11 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar12 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar13 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar14 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              mutable'repeatedScalar15 <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                            Data.ProtoLens.Encoding.Growing.new
+              loop
+                Data.ProtoLens.defMessage mutable'repeatedAnother
+                mutable'repeatedEnum mutable'repeatedNested
+                mutable'repeatedScalar01 mutable'repeatedScalar02
+                mutable'repeatedScalar03 mutable'repeatedScalar04
+                mutable'repeatedScalar05 mutable'repeatedScalar06
+                mutable'repeatedScalar07 mutable'repeatedScalar08
+                mutable'repeatedScalar09 mutable'repeatedScalar10
+                mutable'repeatedScalar11 mutable'repeatedScalar12
+                mutable'repeatedScalar13 mutable'repeatedScalar14
+                mutable'repeatedScalar15)
+          "ExampleMessage"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v
+                  = Lens.Family2.view
+                      (Data.ProtoLens.Field.field @"defaultScalar01") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 809)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putFixed64
+                         Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v
+                     = Lens.Family2.view
+                         (Data.ProtoLens.Field.field @"defaultScalar02") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 821)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed32
+                            Data.ProtoLens.Encoding.Bytes.floatToWord _v))
+                ((Data.Monoid.<>)
+                   (let
+                      _v
+                        = Lens.Family2.view
+                            (Data.ProtoLens.Field.field @"defaultScalar03") _x
+                    in
+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                          Data.Monoid.mempty
+                      else
+                          (Data.Monoid.<>)
+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 824)
+                            ((Prelude..)
+                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                   ((Data.Monoid.<>)
+                      (let
+                         _v
+                           = Lens.Family2.view
+                               (Data.ProtoLens.Field.field @"defaultScalar04") _x
+                       in
+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                             Data.Monoid.mempty
+                         else
+                             (Data.Monoid.<>)
+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 832)
+                               ((Prelude..)
+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                      ((Data.Monoid.<>)
+                         (let
+                            _v
+                              = Lens.Family2.view
+                                  (Data.ProtoLens.Field.field @"defaultScalar05") _x
+                          in
+                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                Data.Monoid.mempty
+                            else
+                                (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 840)
+                                  ((Prelude..)
+                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
+                                     _v))
+                         ((Data.Monoid.<>)
+                            (let
+                               _v
+                                 = Lens.Family2.view
+                                     (Data.ProtoLens.Field.field @"defaultScalar06") _x
+                             in
+                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                   Data.Monoid.mempty
+                               else
+                                   (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 848)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
+                            ((Data.Monoid.<>)
+                               (let
+                                  _v
+                                    = Lens.Family2.view
+                                        (Data.ProtoLens.Field.field @"defaultScalar07") _x
+                                in
+                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                      Data.Monoid.mempty
+                                  else
+                                      (Data.Monoid.<>)
+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 856)
+                                        ((Prelude..)
+                                           ((Prelude..)
+                                              Data.ProtoLens.Encoding.Bytes.putVarInt
+                                              Prelude.fromIntegral)
+                                           Data.ProtoLens.Encoding.Bytes.signedInt32ToWord _v))
+                               ((Data.Monoid.<>)
+                                  (let
+                                     _v
+                                       = Lens.Family2.view
+                                           (Data.ProtoLens.Field.field @"defaultScalar08") _x
+                                   in
+                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                         Data.Monoid.mempty
+                                     else
+                                         (Data.Monoid.<>)
+                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 864)
+                                           ((Prelude..)
+                                              ((Prelude..)
+                                                 Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                 Prelude.fromIntegral)
+                                              Data.ProtoLens.Encoding.Bytes.signedInt64ToWord _v))
+                                  ((Data.Monoid.<>)
+                                     (let
+                                        _v
+                                          = Lens.Family2.view
+                                              (Data.ProtoLens.Field.field @"defaultScalar09") _x
+                                      in
+                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                            Data.Monoid.mempty
+                                        else
+                                            (Data.Monoid.<>)
+                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 877)
+                                              (Data.ProtoLens.Encoding.Bytes.putFixed32 _v))
+                                     ((Data.Monoid.<>)
+                                        (let
+                                           _v
+                                             = Lens.Family2.view
+                                                 (Data.ProtoLens.Field.field @"defaultScalar10") _x
+                                         in
+                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                               Data.Monoid.mempty
+                                           else
+                                               (Data.Monoid.<>)
+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 881)
+                                                 (Data.ProtoLens.Encoding.Bytes.putFixed64 _v))
+                                        ((Data.Monoid.<>)
+                                           (let
+                                              _v
+                                                = Lens.Family2.view
+                                                    (Data.ProtoLens.Field.field @"defaultScalar11")
+                                                    _x
+                                            in
+                                              if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                                  Data.Monoid.mempty
+                                              else
+                                                  (Data.Monoid.<>)
+                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 893)
+                                                    ((Prelude..)
+                                                       Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                       Prelude.fromIntegral _v))
+                                           ((Data.Monoid.<>)
+                                              (let
+                                                 _v
+                                                   = Lens.Family2.view
+                                                       (Data.ProtoLens.Field.field
+                                                          @"defaultScalar12")
+                                                       _x
+                                               in
+                                                 if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                                                     Data.Monoid.mempty
+                                                 else
+                                                     (Data.Monoid.<>)
+                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 897)
+                                                       ((Prelude..)
+                                                          Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                          Prelude.fromIntegral _v))
+                                              ((Data.Monoid.<>)
+                                                 (let
+                                                    _v
+                                                      = Lens.Family2.view
+                                                          (Data.ProtoLens.Field.field
+                                                             @"defaultScalar13")
+                                                          _x
+                                                  in
+                                                    if (Prelude.==)
+                                                         _v Data.ProtoLens.fieldDefault then
+                                                        Data.Monoid.mempty
+                                                    else
+                                                        (Data.Monoid.<>)
+                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                             904)
+                                                          ((Prelude..)
+                                                             Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                             (\ b -> if b then 1 else 0) _v))
+                                                 ((Data.Monoid.<>)
+                                                    (let
+                                                       _v
+                                                         = Lens.Family2.view
+                                                             (Data.ProtoLens.Field.field
+                                                                @"defaultScalar14")
+                                                             _x
+                                                     in
+                                                       if (Prelude.==)
+                                                            _v Data.ProtoLens.fieldDefault then
+                                                           Data.Monoid.mempty
+                                                       else
+                                                           (Data.Monoid.<>)
+                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                914)
+                                                             ((Prelude..)
+                                                                (\ bs
+                                                                   -> (Data.Monoid.<>)
+                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                           (Prelude.fromIntegral
+                                                                              (Data.ByteString.length
+                                                                                 bs)))
+                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                           bs))
+                                                                Data.Text.Encoding.encodeUtf8 _v))
+                                                    ((Data.Monoid.<>)
+                                                       (let
+                                                          _v
+                                                            = Lens.Family2.view
+                                                                (Data.ProtoLens.Field.field
+                                                                   @"defaultScalar15")
+                                                                _x
+                                                        in
+                                                          if (Prelude.==)
+                                                               _v Data.ProtoLens.fieldDefault then
+                                                              Data.Monoid.mempty
+                                                          else
+                                                              (Data.Monoid.<>)
+                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                   922)
+                                                                ((\ bs
+                                                                    -> (Data.Monoid.<>)
+                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                            (Prelude.fromIntegral
+                                                                               (Data.ByteString.length
+                                                                                  bs)))
+                                                                         (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                            bs))
+                                                                   _v))
+                                                       ((Data.Monoid.<>)
+                                                          (case
+                                                               Lens.Family2.view
+                                                                 (Data.ProtoLens.Field.field
+                                                                    @"maybe'defaultAnother")
+                                                                 _x
+                                                           of
+                                                             Prelude.Nothing -> Data.Monoid.mempty
+                                                             (Prelude.Just _v)
+                                                               -> (Data.Monoid.<>)
+                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                       930)
+                                                                    ((Prelude..)
+                                                                       (\ bs
+                                                                          -> (Data.Monoid.<>)
+                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                  (Prelude.fromIntegral
+                                                                                     (Data.ByteString.length
+                                                                                        bs)))
+                                                                               (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                  bs))
+                                                                       Data.ProtoLens.encodeMessage
+                                                                       _v))
+                                                          ((Data.Monoid.<>)
+                                                             (case
+                                                                  Lens.Family2.view
+                                                                    (Data.ProtoLens.Field.field
+                                                                       @"maybe'defaultNested")
+                                                                    _x
+                                                              of
+                                                                Prelude.Nothing
+                                                                  -> Data.Monoid.mempty
+                                                                (Prelude.Just _v)
+                                                                  -> (Data.Monoid.<>)
+                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                          938)
+                                                                       ((Prelude..)
+                                                                          (\ bs
+                                                                             -> (Data.Monoid.<>)
+                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                     (Prelude.fromIntegral
+                                                                                        (Data.ByteString.length
+                                                                                           bs)))
+                                                                                  (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                     bs))
+                                                                          Data.ProtoLens.encodeMessage
+                                                                          _v))
+                                                             ((Data.Monoid.<>)
+                                                                (let
+                                                                   _v
+                                                                     = Lens.Family2.view
+                                                                         (Data.ProtoLens.Field.field
+                                                                            @"defaultEnum")
+                                                                         _x
+                                                                 in
+                                                                   if (Prelude.==)
+                                                                        _v
+                                                                        Data.ProtoLens.fieldDefault then
+                                                                       Data.Monoid.mempty
+                                                                   else
+                                                                       (Data.Monoid.<>)
+                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                            944)
+                                                                         ((Prelude..)
+                                                                            ((Prelude..)
+                                                                               Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                               Prelude.fromIntegral)
+                                                                            Prelude.fromEnum _v))
+                                                                ((Data.Monoid.<>)
+                                                                   (case
+                                                                        Lens.Family2.view
+                                                                          (Data.ProtoLens.Field.field
+                                                                             @"maybe'optionalScalar01")
+                                                                          _x
+                                                                    of
+                                                                      Prelude.Nothing
+                                                                        -> Data.Monoid.mempty
+                                                                      (Prelude.Just _v)
+                                                                        -> (Data.Monoid.<>)
+                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                1609)
+                                                                             ((Prelude..)
+                                                                                Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                Data.ProtoLens.Encoding.Bytes.doubleToWord
+                                                                                _v))
+                                                                   ((Data.Monoid.<>)
+                                                                      (case
+                                                                           Lens.Family2.view
+                                                                             (Data.ProtoLens.Field.field
+                                                                                @"maybe'optionalScalar02")
+                                                                             _x
+                                                                       of
+                                                                         Prelude.Nothing
+                                                                           -> Data.Monoid.mempty
+                                                                         (Prelude.Just _v)
+                                                                           -> (Data.Monoid.<>)
+                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                   1621)
+                                                                                ((Prelude..)
+                                                                                   Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                   Data.ProtoLens.Encoding.Bytes.floatToWord
+                                                                                   _v))
+                                                                      ((Data.Monoid.<>)
+                                                                         (case
+                                                                              Lens.Family2.view
+                                                                                (Data.ProtoLens.Field.field
+                                                                                   @"maybe'optionalScalar03")
+                                                                                _x
+                                                                          of
+                                                                            Prelude.Nothing
+                                                                              -> Data.Monoid.mempty
+                                                                            (Prelude.Just _v)
+                                                                              -> (Data.Monoid.<>)
+                                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                      1624)
+                                                                                   ((Prelude..)
+                                                                                      Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                      Prelude.fromIntegral
+                                                                                      _v))
+                                                                         ((Data.Monoid.<>)
+                                                                            (case
+                                                                                 Lens.Family2.view
+                                                                                   (Data.ProtoLens.Field.field
+                                                                                      @"maybe'optionalScalar04")
+                                                                                   _x
+                                                                             of
+                                                                               Prelude.Nothing
+                                                                                 -> Data.Monoid.mempty
+                                                                               (Prelude.Just _v)
+                                                                                 -> (Data.Monoid.<>)
+                                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                         1632)
+                                                                                      ((Prelude..)
+                                                                                         Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                         Prelude.fromIntegral
+                                                                                         _v))
+                                                                            ((Data.Monoid.<>)
+                                                                               (case
+                                                                                    Lens.Family2.view
+                                                                                      (Data.ProtoLens.Field.field
+                                                                                         @"maybe'optionalScalar05")
+                                                                                      _x
+                                                                                of
+                                                                                  Prelude.Nothing
+                                                                                    -> Data.Monoid.mempty
+                                                                                  (Prelude.Just _v)
+                                                                                    -> (Data.Monoid.<>)
+                                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                            1640)
+                                                                                         ((Prelude..)
+                                                                                            Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                            Prelude.fromIntegral
+                                                                                            _v))
+                                                                               ((Data.Monoid.<>)
+                                                                                  (case
+                                                                                       Lens.Family2.view
+                                                                                         (Data.ProtoLens.Field.field
+                                                                                            @"maybe'optionalScalar06")
+                                                                                         _x
+                                                                                   of
+                                                                                     Prelude.Nothing
+                                                                                       -> Data.Monoid.mempty
+                                                                                     (Prelude.Just _v)
+                                                                                       -> (Data.Monoid.<>)
+                                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                               1648)
+                                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                               _v))
+                                                                                  ((Data.Monoid.<>)
+                                                                                     (case
+                                                                                          Lens.Family2.view
+                                                                                            (Data.ProtoLens.Field.field
+                                                                                               @"maybe'optionalScalar07")
+                                                                                            _x
+                                                                                      of
+                                                                                        Prelude.Nothing
+                                                                                          -> Data.Monoid.mempty
+                                                                                        (Prelude.Just _v)
+                                                                                          -> (Data.Monoid.<>)
+                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                  1656)
+                                                                                               ((Prelude..)
+                                                                                                  ((Prelude..)
+                                                                                                     Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                     Prelude.fromIntegral)
+                                                                                                  Data.ProtoLens.Encoding.Bytes.signedInt32ToWord
+                                                                                                  _v))
+                                                                                     ((Data.Monoid.<>)
+                                                                                        (case
+                                                                                             Lens.Family2.view
+                                                                                               (Data.ProtoLens.Field.field
+                                                                                                  @"maybe'optionalScalar08")
+                                                                                               _x
+                                                                                         of
+                                                                                           Prelude.Nothing
+                                                                                             -> Data.Monoid.mempty
+                                                                                           (Prelude.Just _v)
+                                                                                             -> (Data.Monoid.<>)
+                                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                     1664)
+                                                                                                  ((Prelude..)
+                                                                                                     ((Prelude..)
+                                                                                                        Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                        Prelude.fromIntegral)
+                                                                                                     Data.ProtoLens.Encoding.Bytes.signedInt64ToWord
+                                                                                                     _v))
+                                                                                        ((Data.Monoid.<>)
+                                                                                           (case
+                                                                                                Lens.Family2.view
+                                                                                                  (Data.ProtoLens.Field.field
+                                                                                                     @"maybe'optionalScalar09")
+                                                                                                  _x
+                                                                                            of
+                                                                                              Prelude.Nothing
+                                                                                                -> Data.Monoid.mempty
+                                                                                              (Prelude.Just _v)
+                                                                                                -> (Data.Monoid.<>)
+                                                                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                        1677)
+                                                                                                     (Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                        _v))
+                                                                                           ((Data.Monoid.<>)
+                                                                                              (case
+                                                                                                   Lens.Family2.view
+                                                                                                     (Data.ProtoLens.Field.field
+                                                                                                        @"maybe'optionalScalar10")
+                                                                                                     _x
+                                                                                               of
+                                                                                                 Prelude.Nothing
+                                                                                                   -> Data.Monoid.mempty
+                                                                                                 (Prelude.Just _v)
+                                                                                                   -> (Data.Monoid.<>)
+                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                           1681)
+                                                                                                        (Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                           _v))
+                                                                                              ((Data.Monoid.<>)
+                                                                                                 (case
+                                                                                                      Lens.Family2.view
+                                                                                                        (Data.ProtoLens.Field.field
+                                                                                                           @"maybe'optionalScalar11")
+                                                                                                        _x
+                                                                                                  of
+                                                                                                    Prelude.Nothing
+                                                                                                      -> Data.Monoid.mempty
+                                                                                                    (Prelude.Just _v)
+                                                                                                      -> (Data.Monoid.<>)
+                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                              1693)
+                                                                                                           ((Prelude..)
+                                                                                                              Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                              Prelude.fromIntegral
+                                                                                                              _v))
+                                                                                                 ((Data.Monoid.<>)
+                                                                                                    (case
+                                                                                                         Lens.Family2.view
+                                                                                                           (Data.ProtoLens.Field.field
+                                                                                                              @"maybe'optionalScalar12")
+                                                                                                           _x
+                                                                                                     of
+                                                                                                       Prelude.Nothing
+                                                                                                         -> Data.Monoid.mempty
+                                                                                                       (Prelude.Just _v)
+                                                                                                         -> (Data.Monoid.<>)
+                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                 1697)
+                                                                                                              ((Prelude..)
+                                                                                                                 Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                 Prelude.fromIntegral
+                                                                                                                 _v))
+                                                                                                    ((Data.Monoid.<>)
+                                                                                                       (case
+                                                                                                            Lens.Family2.view
+                                                                                                              (Data.ProtoLens.Field.field
+                                                                                                                 @"maybe'optionalScalar13")
+                                                                                                              _x
+                                                                                                        of
+                                                                                                          Prelude.Nothing
+                                                                                                            -> Data.Monoid.mempty
+                                                                                                          (Prelude.Just _v)
+                                                                                                            -> (Data.Monoid.<>)
+                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                    1704)
+                                                                                                                 ((Prelude..)
+                                                                                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                    (\ b
+                                                                                                                       -> if b then
+                                                                                                                              1
+                                                                                                                          else
+                                                                                                                              0)
+                                                                                                                    _v))
+                                                                                                       ((Data.Monoid.<>)
+                                                                                                          (case
+                                                                                                               Lens.Family2.view
+                                                                                                                 (Data.ProtoLens.Field.field
+                                                                                                                    @"maybe'optionalScalar14")
+                                                                                                                 _x
+                                                                                                           of
+                                                                                                             Prelude.Nothing
+                                                                                                               -> Data.Monoid.mempty
+                                                                                                             (Prelude.Just _v)
+                                                                                                               -> (Data.Monoid.<>)
+                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                       1714)
+                                                                                                                    ((Prelude..)
+                                                                                                                       (\ bs
+                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                  (Prelude.fromIntegral
+                                                                                                                                     (Data.ByteString.length
+                                                                                                                                        bs)))
+                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                  bs))
+                                                                                                                       Data.Text.Encoding.encodeUtf8
+                                                                                                                       _v))
+                                                                                                          ((Data.Monoid.<>)
+                                                                                                             (case
+                                                                                                                  Lens.Family2.view
+                                                                                                                    (Data.ProtoLens.Field.field
+                                                                                                                       @"maybe'optionalScalar15")
+                                                                                                                    _x
+                                                                                                              of
+                                                                                                                Prelude.Nothing
+                                                                                                                  -> Data.Monoid.mempty
+                                                                                                                (Prelude.Just _v)
+                                                                                                                  -> (Data.Monoid.<>)
+                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                          1722)
+                                                                                                                       ((\ bs
+                                                                                                                           -> (Data.Monoid.<>)
+                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                   (Prelude.fromIntegral
+                                                                                                                                      (Data.ByteString.length
+                                                                                                                                         bs)))
+                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                   bs))
+                                                                                                                          _v))
+                                                                                                             ((Data.Monoid.<>)
+                                                                                                                (case
+                                                                                                                     Lens.Family2.view
+                                                                                                                       (Data.ProtoLens.Field.field
+                                                                                                                          @"maybe'optionalAnother")
+                                                                                                                       _x
+                                                                                                                 of
+                                                                                                                   Prelude.Nothing
+                                                                                                                     -> Data.Monoid.mempty
+                                                                                                                   (Prelude.Just _v)
+                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                             1730)
+                                                                                                                          ((Prelude..)
+                                                                                                                             (\ bs
+                                                                                                                                -> (Data.Monoid.<>)
+                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                        (Prelude.fromIntegral
+                                                                                                                                           (Data.ByteString.length
+                                                                                                                                              bs)))
+                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                        bs))
+                                                                                                                             Data.ProtoLens.encodeMessage
+                                                                                                                             _v))
+                                                                                                                ((Data.Monoid.<>)
+                                                                                                                   (case
+                                                                                                                        Lens.Family2.view
+                                                                                                                          (Data.ProtoLens.Field.field
+                                                                                                                             @"maybe'optionalNested")
+                                                                                                                          _x
+                                                                                                                    of
+                                                                                                                      Prelude.Nothing
+                                                                                                                        -> Data.Monoid.mempty
+                                                                                                                      (Prelude.Just _v)
+                                                                                                                        -> (Data.Monoid.<>)
+                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                1738)
+                                                                                                                             ((Prelude..)
+                                                                                                                                (\ bs
+                                                                                                                                   -> (Data.Monoid.<>)
+                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                           (Prelude.fromIntegral
+                                                                                                                                              (Data.ByteString.length
+                                                                                                                                                 bs)))
+                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                           bs))
+                                                                                                                                Data.ProtoLens.encodeMessage
+                                                                                                                                _v))
+                                                                                                                   ((Data.Monoid.<>)
+                                                                                                                      (case
+                                                                                                                           Lens.Family2.view
+                                                                                                                             (Data.ProtoLens.Field.field
+                                                                                                                                @"maybe'optionalEnum")
+                                                                                                                             _x
+                                                                                                                       of
+                                                                                                                         Prelude.Nothing
+                                                                                                                           -> Data.Monoid.mempty
+                                                                                                                         (Prelude.Just _v)
+                                                                                                                           -> (Data.Monoid.<>)
+                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                   1744)
+                                                                                                                                ((Prelude..)
+                                                                                                                                   ((Prelude..)
+                                                                                                                                      Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                      Prelude.fromIntegral)
+                                                                                                                                   Prelude.fromEnum
+                                                                                                                                   _v))
+                                                                                                                      ((Data.Monoid.<>)
+                                                                                                                         (let
+                                                                                                                            p = Lens.Family2.view
+                                                                                                                                  (Data.ProtoLens.Field.field
+                                                                                                                                     @"vec'repeatedScalar01")
+                                                                                                                                  _x
+                                                                                                                          in
+                                                                                                                            if Data.Vector.Generic.null
+                                                                                                                                 p then
+                                                                                                                                Data.Monoid.mempty
+                                                                                                                            else
+                                                                                                                                (Data.Monoid.<>)
+                                                                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                     2410)
+                                                                                                                                  ((\ bs
+                                                                                                                                      -> (Data.Monoid.<>)
+                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                              (Prelude.fromIntegral
+                                                                                                                                                 (Data.ByteString.length
+                                                                                                                                                    bs)))
+                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                              bs))
+                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                           ((Prelude..)
+                                                                                                                                              Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                                              Data.ProtoLens.Encoding.Bytes.doubleToWord)
+                                                                                                                                           p))))
+                                                                                                                         ((Data.Monoid.<>)
+                                                                                                                            (let
+                                                                                                                               p = Lens.Family2.view
+                                                                                                                                     (Data.ProtoLens.Field.field
+                                                                                                                                        @"vec'repeatedScalar02")
+                                                                                                                                     _x
+                                                                                                                             in
+                                                                                                                               if Data.Vector.Generic.null
+                                                                                                                                    p then
+                                                                                                                                   Data.Monoid.mempty
+                                                                                                                               else
+                                                                                                                                   (Data.Monoid.<>)
+                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                        2418)
+                                                                                                                                     ((\ bs
+                                                                                                                                         -> (Data.Monoid.<>)
+                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                 (Prelude.fromIntegral
+                                                                                                                                                    (Data.ByteString.length
+                                                                                                                                                       bs)))
+                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                 bs))
+                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                              ((Prelude..)
+                                                                                                                                                 Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                                                                 Data.ProtoLens.Encoding.Bytes.floatToWord)
+                                                                                                                                              p))))
+                                                                                                                            ((Data.Monoid.<>)
+                                                                                                                               (let
+                                                                                                                                  p = Lens.Family2.view
+                                                                                                                                        (Data.ProtoLens.Field.field
+                                                                                                                                           @"vec'repeatedScalar03")
+                                                                                                                                        _x
+                                                                                                                                in
+                                                                                                                                  if Data.Vector.Generic.null
+                                                                                                                                       p then
+                                                                                                                                      Data.Monoid.mempty
+                                                                                                                                  else
+                                                                                                                                      (Data.Monoid.<>)
+                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                           2426)
+                                                                                                                                        ((\ bs
+                                                                                                                                            -> (Data.Monoid.<>)
+                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                    (Prelude.fromIntegral
+                                                                                                                                                       (Data.ByteString.length
+                                                                                                                                                          bs)))
+                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                    bs))
+                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                 ((Prelude..)
+                                                                                                                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                    Prelude.fromIntegral)
+                                                                                                                                                 p))))
+                                                                                                                               ((Data.Monoid.<>)
+                                                                                                                                  (let
+                                                                                                                                     p = Lens.Family2.view
+                                                                                                                                           (Data.ProtoLens.Field.field
+                                                                                                                                              @"vec'repeatedScalar04")
+                                                                                                                                           _x
+                                                                                                                                   in
+                                                                                                                                     if Data.Vector.Generic.null
+                                                                                                                                          p then
+                                                                                                                                         Data.Monoid.mempty
+                                                                                                                                     else
+                                                                                                                                         (Data.Monoid.<>)
+                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                              2434)
+                                                                                                                                           ((\ bs
+                                                                                                                                               -> (Data.Monoid.<>)
+                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                       (Prelude.fromIntegral
+                                                                                                                                                          (Data.ByteString.length
+                                                                                                                                                             bs)))
+                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                       bs))
+                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                    ((Prelude..)
+                                                                                                                                                       Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                       Prelude.fromIntegral)
+                                                                                                                                                    p))))
+                                                                                                                                  ((Data.Monoid.<>)
+                                                                                                                                     (let
+                                                                                                                                        p = Lens.Family2.view
+                                                                                                                                              (Data.ProtoLens.Field.field
+                                                                                                                                                 @"vec'repeatedScalar05")
+                                                                                                                                              _x
+                                                                                                                                      in
+                                                                                                                                        if Data.Vector.Generic.null
+                                                                                                                                             p then
+                                                                                                                                            Data.Monoid.mempty
+                                                                                                                                        else
+                                                                                                                                            (Data.Monoid.<>)
+                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                 2442)
+                                                                                                                                              ((\ bs
+                                                                                                                                                  -> (Data.Monoid.<>)
+                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                          (Prelude.fromIntegral
+                                                                                                                                                             (Data.ByteString.length
+                                                                                                                                                                bs)))
+                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                          bs))
+                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                       ((Prelude..)
+                                                                                                                                                          Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                          Prelude.fromIntegral)
+                                                                                                                                                       p))))
+                                                                                                                                     ((Data.Monoid.<>)
+                                                                                                                                        (let
+                                                                                                                                           p = Lens.Family2.view
+                                                                                                                                                 (Data.ProtoLens.Field.field
+                                                                                                                                                    @"vec'repeatedScalar06")
+                                                                                                                                                 _x
+                                                                                                                                         in
+                                                                                                                                           if Data.Vector.Generic.null
+                                                                                                                                                p then
+                                                                                                                                               Data.Monoid.mempty
+                                                                                                                                           else
+                                                                                                                                               (Data.Monoid.<>)
+                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                    2450)
+                                                                                                                                                 ((\ bs
+                                                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                             (Prelude.fromIntegral
+                                                                                                                                                                (Data.ByteString.length
+                                                                                                                                                                   bs)))
+                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                             bs))
+                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                          Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                          p))))
+                                                                                                                                        ((Data.Monoid.<>)
+                                                                                                                                           (let
+                                                                                                                                              p = Lens.Family2.view
+                                                                                                                                                    (Data.ProtoLens.Field.field
+                                                                                                                                                       @"vec'repeatedScalar07")
+                                                                                                                                                    _x
+                                                                                                                                            in
+                                                                                                                                              if Data.Vector.Generic.null
+                                                                                                                                                   p then
+                                                                                                                                                  Data.Monoid.mempty
+                                                                                                                                              else
+                                                                                                                                                  (Data.Monoid.<>)
+                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                       2458)
+                                                                                                                                                    ((\ bs
+                                                                                                                                                        -> (Data.Monoid.<>)
+                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                (Prelude.fromIntegral
+                                                                                                                                                                   (Data.ByteString.length
+                                                                                                                                                                      bs)))
+                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                bs))
+                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                             ((Prelude..)
+                                                                                                                                                                ((Prelude..)
+                                                                                                                                                                   Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                   Prelude.fromIntegral)
+                                                                                                                                                                Data.ProtoLens.Encoding.Bytes.signedInt32ToWord)
+                                                                                                                                                             p))))
+                                                                                                                                           ((Data.Monoid.<>)
+                                                                                                                                              (let
+                                                                                                                                                 p = Lens.Family2.view
+                                                                                                                                                       (Data.ProtoLens.Field.field
+                                                                                                                                                          @"vec'repeatedScalar08")
+                                                                                                                                                       _x
+                                                                                                                                               in
+                                                                                                                                                 if Data.Vector.Generic.null
+                                                                                                                                                      p then
+                                                                                                                                                     Data.Monoid.mempty
+                                                                                                                                                 else
+                                                                                                                                                     (Data.Monoid.<>)
+                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                          2466)
+                                                                                                                                                       ((\ bs
+                                                                                                                                                           -> (Data.Monoid.<>)
+                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                   (Prelude.fromIntegral
+                                                                                                                                                                      (Data.ByteString.length
+                                                                                                                                                                         bs)))
+                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                   bs))
+                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                ((Prelude..)
+                                                                                                                                                                   ((Prelude..)
+                                                                                                                                                                      Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                      Prelude.fromIntegral)
+                                                                                                                                                                   Data.ProtoLens.Encoding.Bytes.signedInt64ToWord)
+                                                                                                                                                                p))))
+                                                                                                                                              ((Data.Monoid.<>)
+                                                                                                                                                 (let
+                                                                                                                                                    p = Lens.Family2.view
+                                                                                                                                                          (Data.ProtoLens.Field.field
+                                                                                                                                                             @"vec'repeatedScalar09")
+                                                                                                                                                          _x
+                                                                                                                                                  in
+                                                                                                                                                    if Data.Vector.Generic.null
+                                                                                                                                                         p then
+                                                                                                                                                        Data.Monoid.mempty
+                                                                                                                                                    else
+                                                                                                                                                        (Data.Monoid.<>)
+                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                             2474)
+                                                                                                                                                          ((\ bs
+                                                                                                                                                              -> (Data.Monoid.<>)
+                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                      (Prelude.fromIntegral
+                                                                                                                                                                         (Data.ByteString.length
+                                                                                                                                                                            bs)))
+                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                      bs))
+                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                   Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                                                                                   p))))
+                                                                                                                                                 ((Data.Monoid.<>)
+                                                                                                                                                    (let
+                                                                                                                                                       p = Lens.Family2.view
+                                                                                                                                                             (Data.ProtoLens.Field.field
+                                                                                                                                                                @"vec'repeatedScalar10")
+                                                                                                                                                             _x
+                                                                                                                                                     in
+                                                                                                                                                       if Data.Vector.Generic.null
+                                                                                                                                                            p then
+                                                                                                                                                           Data.Monoid.mempty
+                                                                                                                                                       else
+                                                                                                                                                           (Data.Monoid.<>)
+                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                2482)
+                                                                                                                                                             ((\ bs
+                                                                                                                                                                 -> (Data.Monoid.<>)
+                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                         (Prelude.fromIntegral
+                                                                                                                                                                            (Data.ByteString.length
+                                                                                                                                                                               bs)))
+                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                         bs))
+                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                      Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                                                                      p))))
+                                                                                                                                                    ((Data.Monoid.<>)
+                                                                                                                                                       (let
+                                                                                                                                                          p = Lens.Family2.view
+                                                                                                                                                                (Data.ProtoLens.Field.field
+                                                                                                                                                                   @"vec'repeatedScalar11")
+                                                                                                                                                                _x
+                                                                                                                                                        in
+                                                                                                                                                          if Data.Vector.Generic.null
+                                                                                                                                                               p then
+                                                                                                                                                              Data.Monoid.mempty
+                                                                                                                                                          else
+                                                                                                                                                              (Data.Monoid.<>)
+                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                   2490)
+                                                                                                                                                                ((\ bs
+                                                                                                                                                                    -> (Data.Monoid.<>)
+                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                            (Prelude.fromIntegral
+                                                                                                                                                                               (Data.ByteString.length
+                                                                                                                                                                                  bs)))
+                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                            bs))
+                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                         ((Prelude..)
+                                                                                                                                                                            Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                                                                                            Prelude.fromIntegral)
+                                                                                                                                                                         p))))
+                                                                                                                                                       ((Data.Monoid.<>)
+                                                                                                                                                          (let
+                                                                                                                                                             p = Lens.Family2.view
+                                                                                                                                                                   (Data.ProtoLens.Field.field
+                                                                                                                                                                      @"vec'repeatedScalar12")
+                                                                                                                                                                   _x
+                                                                                                                                                           in
+                                                                                                                                                             if Data.Vector.Generic.null
+                                                                                                                                                                  p then
+                                                                                                                                                                 Data.Monoid.mempty
+                                                                                                                                                             else
+                                                                                                                                                                 (Data.Monoid.<>)
+                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                      2498)
+                                                                                                                                                                   ((\ bs
+                                                                                                                                                                       -> (Data.Monoid.<>)
+                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                               (Prelude.fromIntegral
+                                                                                                                                                                                  (Data.ByteString.length
+                                                                                                                                                                                     bs)))
+                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                               bs))
+                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                            ((Prelude..)
+                                                                                                                                                                               Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                                                                               Prelude.fromIntegral)
+                                                                                                                                                                            p))))
+                                                                                                                                                          ((Data.Monoid.<>)
+                                                                                                                                                             (let
+                                                                                                                                                                p = Lens.Family2.view
+                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                         @"vec'repeatedScalar13")
+                                                                                                                                                                      _x
+                                                                                                                                                              in
+                                                                                                                                                                if Data.Vector.Generic.null
+                                                                                                                                                                     p then
+                                                                                                                                                                    Data.Monoid.mempty
+                                                                                                                                                                else
+                                                                                                                                                                    (Data.Monoid.<>)
+                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                         2506)
+                                                                                                                                                                      ((\ bs
+                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                  (Prelude.fromIntegral
+                                                                                                                                                                                     (Data.ByteString.length
+                                                                                                                                                                                        bs)))
+                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                  bs))
+                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                  (\ b
+                                                                                                                                                                                     -> if b then
+                                                                                                                                                                                            1
+                                                                                                                                                                                        else
+                                                                                                                                                                                            0))
+                                                                                                                                                                               p))))
+                                                                                                                                                             ((Data.Monoid.<>)
+                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                   (\ _v
+                                                                                                                                                                      -> (Data.Monoid.<>)
+                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                              2514)
+                                                                                                                                                                           ((Prelude..)
+                                                                                                                                                                              (\ bs
+                                                                                                                                                                                 -> (Data.Monoid.<>)
+                                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                         (Prelude.fromIntegral
+                                                                                                                                                                                            (Data.ByteString.length
+                                                                                                                                                                                               bs)))
+                                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                         bs))
+                                                                                                                                                                              Data.Text.Encoding.encodeUtf8
+                                                                                                                                                                              _v))
+                                                                                                                                                                   (Lens.Family2.view
+                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                         @"vec'repeatedScalar14")
+                                                                                                                                                                      _x))
+                                                                                                                                                                ((Data.Monoid.<>)
+                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                      (\ _v
+                                                                                                                                                                         -> (Data.Monoid.<>)
+                                                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                 2522)
+                                                                                                                                                                              ((\ bs
+                                                                                                                                                                                  -> (Data.Monoid.<>)
+                                                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                          (Prelude.fromIntegral
+                                                                                                                                                                                             (Data.ByteString.length
+                                                                                                                                                                                                bs)))
+                                                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                          bs))
+                                                                                                                                                                                 _v))
+                                                                                                                                                                      (Lens.Family2.view
+                                                                                                                                                                         (Data.ProtoLens.Field.field
+                                                                                                                                                                            @"vec'repeatedScalar15")
+                                                                                                                                                                         _x))
+                                                                                                                                                                   ((Data.Monoid.<>)
+                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                         (\ _v
+                                                                                                                                                                            -> (Data.Monoid.<>)
+                                                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                    2530)
+                                                                                                                                                                                 ((Prelude..)
+                                                                                                                                                                                    (\ bs
+                                                                                                                                                                                       -> (Data.Monoid.<>)
+                                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                               (Prelude.fromIntegral
+                                                                                                                                                                                                  (Data.ByteString.length
+                                                                                                                                                                                                     bs)))
+                                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                               bs))
+                                                                                                                                                                                    Data.ProtoLens.encodeMessage
+                                                                                                                                                                                    _v))
+                                                                                                                                                                         (Lens.Family2.view
+                                                                                                                                                                            (Data.ProtoLens.Field.field
+                                                                                                                                                                               @"vec'repeatedAnother")
+                                                                                                                                                                            _x))
+                                                                                                                                                                      ((Data.Monoid.<>)
+                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                            (\ _v
+                                                                                                                                                                               -> (Data.Monoid.<>)
+                                                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                       2538)
+                                                                                                                                                                                    ((Prelude..)
+                                                                                                                                                                                       (\ bs
+                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                  (Prelude.fromIntegral
+                                                                                                                                                                                                     (Data.ByteString.length
+                                                                                                                                                                                                        bs)))
+                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                  bs))
+                                                                                                                                                                                       Data.ProtoLens.encodeMessage
+                                                                                                                                                                                       _v))
+                                                                                                                                                                            (Lens.Family2.view
+                                                                                                                                                                               (Data.ProtoLens.Field.field
+                                                                                                                                                                                  @"vec'repeatedNested")
+                                                                                                                                                                               _x))
+                                                                                                                                                                         ((Data.Monoid.<>)
+                                                                                                                                                                            (let
+                                                                                                                                                                               p = Lens.Family2.view
+                                                                                                                                                                                     (Data.ProtoLens.Field.field
+                                                                                                                                                                                        @"vec'repeatedEnum")
+                                                                                                                                                                                     _x
+                                                                                                                                                                             in
+                                                                                                                                                                               if Data.Vector.Generic.null
+                                                                                                                                                                                    p then
+                                                                                                                                                                                   Data.Monoid.mempty
+                                                                                                                                                                               else
+                                                                                                                                                                                   (Data.Monoid.<>)
+                                                                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                        2546)
+                                                                                                                                                                                     ((\ bs
+                                                                                                                                                                                         -> (Data.Monoid.<>)
+                                                                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                 (Prelude.fromIntegral
+                                                                                                                                                                                                    (Data.ByteString.length
+                                                                                                                                                                                                       bs)))
+                                                                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                 bs))
+                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.runBuilder
+                                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                                                                                                                                                                                              ((Prelude..)
+                                                                                                                                                                                                 ((Prelude..)
+                                                                                                                                                                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                    Prelude.fromIntegral)
+                                                                                                                                                                                                 Prelude.fromEnum)
+                                                                                                                                                                                              p))))
+                                                                                                                                                                            ((Data.Monoid.<>)
+                                                                                                                                                                               (Data.Monoid.mconcat
+                                                                                                                                                                                  (Prelude.map
+                                                                                                                                                                                     (\ _v
+                                                                                                                                                                                        -> (Data.Monoid.<>)
+                                                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                3210)
+                                                                                                                                                                                             ((Prelude..)
+                                                                                                                                                                                                (\ bs
+                                                                                                                                                                                                   -> (Data.Monoid.<>)
+                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                           (Prelude.fromIntegral
+                                                                                                                                                                                                              (Data.ByteString.length
+                                                                                                                                                                                                                 bs)))
+                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                           bs))
+                                                                                                                                                                                                Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                (Lens.Family2.set
+                                                                                                                                                                                                   (Data.ProtoLens.Field.field
+                                                                                                                                                                                                      @"key")
+                                                                                                                                                                                                   (Prelude.fst
+                                                                                                                                                                                                      _v)
+                                                                                                                                                                                                   (Lens.Family2.set
+                                                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                                                         @"value")
+                                                                                                                                                                                                      (Prelude.snd
+                                                                                                                                                                                                         _v)
+                                                                                                                                                                                                      (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                         ExampleMessage'MapScalar01Entry)))))
+                                                                                                                                                                                     (Data.Map.toList
+                                                                                                                                                                                        (Lens.Family2.view
+                                                                                                                                                                                           (Data.ProtoLens.Field.field
+                                                                                                                                                                                              @"mapScalar01")
+                                                                                                                                                                                           _x))))
+                                                                                                                                                                               ((Data.Monoid.<>)
+                                                                                                                                                                                  (Data.Monoid.mconcat
+                                                                                                                                                                                     (Prelude.map
+                                                                                                                                                                                        (\ _v
+                                                                                                                                                                                           -> (Data.Monoid.<>)
+                                                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                   3218)
+                                                                                                                                                                                                ((Prelude..)
+                                                                                                                                                                                                   (\ bs
+                                                                                                                                                                                                      -> (Data.Monoid.<>)
+                                                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                              (Prelude.fromIntegral
+                                                                                                                                                                                                                 (Data.ByteString.length
+                                                                                                                                                                                                                    bs)))
+                                                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                              bs))
+                                                                                                                                                                                                   Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                   (Lens.Family2.set
+                                                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                                                         @"key")
+                                                                                                                                                                                                      (Prelude.fst
+                                                                                                                                                                                                         _v)
+                                                                                                                                                                                                      (Lens.Family2.set
+                                                                                                                                                                                                         (Data.ProtoLens.Field.field
+                                                                                                                                                                                                            @"value")
+                                                                                                                                                                                                         (Prelude.snd
+                                                                                                                                                                                                            _v)
+                                                                                                                                                                                                         (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                            ExampleMessage'MapScalar02Entry)))))
+                                                                                                                                                                                        (Data.Map.toList
+                                                                                                                                                                                           (Lens.Family2.view
+                                                                                                                                                                                              (Data.ProtoLens.Field.field
+                                                                                                                                                                                                 @"mapScalar02")
+                                                                                                                                                                                              _x))))
+                                                                                                                                                                                  ((Data.Monoid.<>)
+                                                                                                                                                                                     (Data.Monoid.mconcat
+                                                                                                                                                                                        (Prelude.map
+                                                                                                                                                                                           (\ _v
+                                                                                                                                                                                              -> (Data.Monoid.<>)
+                                                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                      3226)
+                                                                                                                                                                                                   ((Prelude..)
+                                                                                                                                                                                                      (\ bs
+                                                                                                                                                                                                         -> (Data.Monoid.<>)
+                                                                                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                 (Prelude.fromIntegral
+                                                                                                                                                                                                                    (Data.ByteString.length
+                                                                                                                                                                                                                       bs)))
+                                                                                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                 bs))
+                                                                                                                                                                                                      Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                      (Lens.Family2.set
+                                                                                                                                                                                                         (Data.ProtoLens.Field.field
+                                                                                                                                                                                                            @"key")
+                                                                                                                                                                                                         (Prelude.fst
+                                                                                                                                                                                                            _v)
+                                                                                                                                                                                                         (Lens.Family2.set
+                                                                                                                                                                                                            (Data.ProtoLens.Field.field
+                                                                                                                                                                                                               @"value")
+                                                                                                                                                                                                            (Prelude.snd
+                                                                                                                                                                                                               _v)
+                                                                                                                                                                                                            (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                               ExampleMessage'MapScalar03Entry)))))
+                                                                                                                                                                                           (Data.Map.toList
+                                                                                                                                                                                              (Lens.Family2.view
+                                                                                                                                                                                                 (Data.ProtoLens.Field.field
+                                                                                                                                                                                                    @"mapScalar03")
+                                                                                                                                                                                                 _x))))
+                                                                                                                                                                                     ((Data.Monoid.<>)
+                                                                                                                                                                                        (Data.Monoid.mconcat
+                                                                                                                                                                                           (Prelude.map
+                                                                                                                                                                                              (\ _v
+                                                                                                                                                                                                 -> (Data.Monoid.<>)
+                                                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                         3234)
+                                                                                                                                                                                                      ((Prelude..)
+                                                                                                                                                                                                         (\ bs
+                                                                                                                                                                                                            -> (Data.Monoid.<>)
+                                                                                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                    (Prelude.fromIntegral
+                                                                                                                                                                                                                       (Data.ByteString.length
+                                                                                                                                                                                                                          bs)))
+                                                                                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                    bs))
+                                                                                                                                                                                                         Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                         (Lens.Family2.set
+                                                                                                                                                                                                            (Data.ProtoLens.Field.field
+                                                                                                                                                                                                               @"key")
+                                                                                                                                                                                                            (Prelude.fst
+                                                                                                                                                                                                               _v)
+                                                                                                                                                                                                            (Lens.Family2.set
+                                                                                                                                                                                                               (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                  @"value")
+                                                                                                                                                                                                               (Prelude.snd
+                                                                                                                                                                                                                  _v)
+                                                                                                                                                                                                               (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                  ExampleMessage'MapScalar04Entry)))))
+                                                                                                                                                                                              (Data.Map.toList
+                                                                                                                                                                                                 (Lens.Family2.view
+                                                                                                                                                                                                    (Data.ProtoLens.Field.field
+                                                                                                                                                                                                       @"mapScalar04")
+                                                                                                                                                                                                    _x))))
+                                                                                                                                                                                        ((Data.Monoid.<>)
+                                                                                                                                                                                           (Data.Monoid.mconcat
+                                                                                                                                                                                              (Prelude.map
+                                                                                                                                                                                                 (\ _v
+                                                                                                                                                                                                    -> (Data.Monoid.<>)
+                                                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                            3242)
+                                                                                                                                                                                                         ((Prelude..)
+                                                                                                                                                                                                            (\ bs
+                                                                                                                                                                                                               -> (Data.Monoid.<>)
+                                                                                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                       (Prelude.fromIntegral
+                                                                                                                                                                                                                          (Data.ByteString.length
+                                                                                                                                                                                                                             bs)))
+                                                                                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                       bs))
+                                                                                                                                                                                                            Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                            (Lens.Family2.set
+                                                                                                                                                                                                               (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                  @"key")
+                                                                                                                                                                                                               (Prelude.fst
+                                                                                                                                                                                                                  _v)
+                                                                                                                                                                                                               (Lens.Family2.set
+                                                                                                                                                                                                                  (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                     @"value")
+                                                                                                                                                                                                                  (Prelude.snd
+                                                                                                                                                                                                                     _v)
+                                                                                                                                                                                                                  (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                     ExampleMessage'MapScalar05Entry)))))
+                                                                                                                                                                                                 (Data.Map.toList
+                                                                                                                                                                                                    (Lens.Family2.view
+                                                                                                                                                                                                       (Data.ProtoLens.Field.field
+                                                                                                                                                                                                          @"mapScalar05")
+                                                                                                                                                                                                       _x))))
+                                                                                                                                                                                           ((Data.Monoid.<>)
+                                                                                                                                                                                              (Data.Monoid.mconcat
+                                                                                                                                                                                                 (Prelude.map
+                                                                                                                                                                                                    (\ _v
+                                                                                                                                                                                                       -> (Data.Monoid.<>)
+                                                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                               3250)
+                                                                                                                                                                                                            ((Prelude..)
+                                                                                                                                                                                                               (\ bs
+                                                                                                                                                                                                                  -> (Data.Monoid.<>)
+                                                                                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                          (Prelude.fromIntegral
+                                                                                                                                                                                                                             (Data.ByteString.length
+                                                                                                                                                                                                                                bs)))
+                                                                                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                          bs))
+                                                                                                                                                                                                               Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                               (Lens.Family2.set
+                                                                                                                                                                                                                  (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                     @"key")
+                                                                                                                                                                                                                  (Prelude.fst
+                                                                                                                                                                                                                     _v)
+                                                                                                                                                                                                                  (Lens.Family2.set
+                                                                                                                                                                                                                     (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                        @"value")
+                                                                                                                                                                                                                     (Prelude.snd
+                                                                                                                                                                                                                        _v)
+                                                                                                                                                                                                                     (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                        ExampleMessage'MapScalar06Entry)))))
+                                                                                                                                                                                                    (Data.Map.toList
+                                                                                                                                                                                                       (Lens.Family2.view
+                                                                                                                                                                                                          (Data.ProtoLens.Field.field
+                                                                                                                                                                                                             @"mapScalar06")
+                                                                                                                                                                                                          _x))))
+                                                                                                                                                                                              ((Data.Monoid.<>)
+                                                                                                                                                                                                 (Data.Monoid.mconcat
+                                                                                                                                                                                                    (Prelude.map
+                                                                                                                                                                                                       (\ _v
+                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                  3258)
+                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                  (\ bs
+                                                                                                                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                             (Prelude.fromIntegral
+                                                                                                                                                                                                                                (Data.ByteString.length
+                                                                                                                                                                                                                                   bs)))
+                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                             bs))
+                                                                                                                                                                                                                  Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                  (Lens.Family2.set
+                                                                                                                                                                                                                     (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                        @"key")
+                                                                                                                                                                                                                     (Prelude.fst
+                                                                                                                                                                                                                        _v)
+                                                                                                                                                                                                                     (Lens.Family2.set
+                                                                                                                                                                                                                        (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                           @"value")
+                                                                                                                                                                                                                        (Prelude.snd
+                                                                                                                                                                                                                           _v)
+                                                                                                                                                                                                                        (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                           ExampleMessage'MapScalar07Entry)))))
+                                                                                                                                                                                                       (Data.Map.toList
+                                                                                                                                                                                                          (Lens.Family2.view
+                                                                                                                                                                                                             (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                @"mapScalar07")
+                                                                                                                                                                                                             _x))))
+                                                                                                                                                                                                 ((Data.Monoid.<>)
+                                                                                                                                                                                                    (Data.Monoid.mconcat
+                                                                                                                                                                                                       (Prelude.map
+                                                                                                                                                                                                          (\ _v
+                                                                                                                                                                                                             -> (Data.Monoid.<>)
+                                                                                                                                                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                     3266)
+                                                                                                                                                                                                                  ((Prelude..)
+                                                                                                                                                                                                                     (\ bs
+                                                                                                                                                                                                                        -> (Data.Monoid.<>)
+                                                                                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                (Prelude.fromIntegral
+                                                                                                                                                                                                                                   (Data.ByteString.length
+                                                                                                                                                                                                                                      bs)))
+                                                                                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                bs))
+                                                                                                                                                                                                                     Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                     (Lens.Family2.set
+                                                                                                                                                                                                                        (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                           @"key")
+                                                                                                                                                                                                                        (Prelude.fst
+                                                                                                                                                                                                                           _v)
+                                                                                                                                                                                                                        (Lens.Family2.set
+                                                                                                                                                                                                                           (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                              @"value")
+                                                                                                                                                                                                                           (Prelude.snd
+                                                                                                                                                                                                                              _v)
+                                                                                                                                                                                                                           (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                              ExampleMessage'MapScalar08Entry)))))
+                                                                                                                                                                                                          (Data.Map.toList
+                                                                                                                                                                                                             (Lens.Family2.view
+                                                                                                                                                                                                                (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                   @"mapScalar08")
+                                                                                                                                                                                                                _x))))
+                                                                                                                                                                                                    ((Data.Monoid.<>)
+                                                                                                                                                                                                       (Data.Monoid.mconcat
+                                                                                                                                                                                                          (Prelude.map
+                                                                                                                                                                                                             (\ _v
+                                                                                                                                                                                                                -> (Data.Monoid.<>)
+                                                                                                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                        3274)
+                                                                                                                                                                                                                     ((Prelude..)
+                                                                                                                                                                                                                        (\ bs
+                                                                                                                                                                                                                           -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                   (Prelude.fromIntegral
+                                                                                                                                                                                                                                      (Data.ByteString.length
+                                                                                                                                                                                                                                         bs)))
+                                                                                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                   bs))
+                                                                                                                                                                                                                        Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                        (Lens.Family2.set
+                                                                                                                                                                                                                           (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                              @"key")
+                                                                                                                                                                                                                           (Prelude.fst
+                                                                                                                                                                                                                              _v)
+                                                                                                                                                                                                                           (Lens.Family2.set
+                                                                                                                                                                                                                              (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                 @"value")
+                                                                                                                                                                                                                              (Prelude.snd
+                                                                                                                                                                                                                                 _v)
+                                                                                                                                                                                                                              (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                 ExampleMessage'MapScalar09Entry)))))
+                                                                                                                                                                                                             (Data.Map.toList
+                                                                                                                                                                                                                (Lens.Family2.view
+                                                                                                                                                                                                                   (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                      @"mapScalar09")
+                                                                                                                                                                                                                   _x))))
+                                                                                                                                                                                                       ((Data.Monoid.<>)
+                                                                                                                                                                                                          (Data.Monoid.mconcat
+                                                                                                                                                                                                             (Prelude.map
+                                                                                                                                                                                                                (\ _v
+                                                                                                                                                                                                                   -> (Data.Monoid.<>)
+                                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                           3282)
+                                                                                                                                                                                                                        ((Prelude..)
+                                                                                                                                                                                                                           (\ bs
+                                                                                                                                                                                                                              -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                      (Prelude.fromIntegral
+                                                                                                                                                                                                                                         (Data.ByteString.length
+                                                                                                                                                                                                                                            bs)))
+                                                                                                                                                                                                                                   (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                      bs))
+                                                                                                                                                                                                                           Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                           (Lens.Family2.set
+                                                                                                                                                                                                                              (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                 @"key")
+                                                                                                                                                                                                                              (Prelude.fst
+                                                                                                                                                                                                                                 _v)
+                                                                                                                                                                                                                              (Lens.Family2.set
+                                                                                                                                                                                                                                 (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                    @"value")
+                                                                                                                                                                                                                                 (Prelude.snd
+                                                                                                                                                                                                                                    _v)
+                                                                                                                                                                                                                                 (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                    ExampleMessage'MapScalar10Entry)))))
+                                                                                                                                                                                                                (Data.Map.toList
+                                                                                                                                                                                                                   (Lens.Family2.view
+                                                                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                         @"mapScalar10")
+                                                                                                                                                                                                                      _x))))
+                                                                                                                                                                                                          ((Data.Monoid.<>)
+                                                                                                                                                                                                             (Data.Monoid.mconcat
+                                                                                                                                                                                                                (Prelude.map
+                                                                                                                                                                                                                   (\ _v
+                                                                                                                                                                                                                      -> (Data.Monoid.<>)
+                                                                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                              3290)
+                                                                                                                                                                                                                           ((Prelude..)
+                                                                                                                                                                                                                              (\ bs
+                                                                                                                                                                                                                                 -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                         (Prelude.fromIntegral
+                                                                                                                                                                                                                                            (Data.ByteString.length
+                                                                                                                                                                                                                                               bs)))
+                                                                                                                                                                                                                                      (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                         bs))
+                                                                                                                                                                                                                              Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                              (Lens.Family2.set
+                                                                                                                                                                                                                                 (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                    @"key")
+                                                                                                                                                                                                                                 (Prelude.fst
+                                                                                                                                                                                                                                    _v)
+                                                                                                                                                                                                                                 (Lens.Family2.set
+                                                                                                                                                                                                                                    (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                       @"value")
+                                                                                                                                                                                                                                    (Prelude.snd
+                                                                                                                                                                                                                                       _v)
+                                                                                                                                                                                                                                    (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                       ExampleMessage'MapScalar11Entry)))))
+                                                                                                                                                                                                                   (Data.Map.toList
+                                                                                                                                                                                                                      (Lens.Family2.view
+                                                                                                                                                                                                                         (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                            @"mapScalar11")
+                                                                                                                                                                                                                         _x))))
+                                                                                                                                                                                                             ((Data.Monoid.<>)
+                                                                                                                                                                                                                (Data.Monoid.mconcat
+                                                                                                                                                                                                                   (Prelude.map
+                                                                                                                                                                                                                      (\ _v
+                                                                                                                                                                                                                         -> (Data.Monoid.<>)
+                                                                                                                                                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                 3298)
+                                                                                                                                                                                                                              ((Prelude..)
+                                                                                                                                                                                                                                 (\ bs
+                                                                                                                                                                                                                                    -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                            (Prelude.fromIntegral
+                                                                                                                                                                                                                                               (Data.ByteString.length
+                                                                                                                                                                                                                                                  bs)))
+                                                                                                                                                                                                                                         (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                            bs))
+                                                                                                                                                                                                                                 Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                 (Lens.Family2.set
+                                                                                                                                                                                                                                    (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                       @"key")
+                                                                                                                                                                                                                                    (Prelude.fst
+                                                                                                                                                                                                                                       _v)
+                                                                                                                                                                                                                                    (Lens.Family2.set
+                                                                                                                                                                                                                                       (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                          @"value")
+                                                                                                                                                                                                                                       (Prelude.snd
+                                                                                                                                                                                                                                          _v)
+                                                                                                                                                                                                                                       (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                          ExampleMessage'MapScalar12Entry)))))
+                                                                                                                                                                                                                      (Data.Map.toList
+                                                                                                                                                                                                                         (Lens.Family2.view
+                                                                                                                                                                                                                            (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                               @"mapScalar12")
+                                                                                                                                                                                                                            _x))))
+                                                                                                                                                                                                                ((Data.Monoid.<>)
+                                                                                                                                                                                                                   (Data.Monoid.mconcat
+                                                                                                                                                                                                                      (Prelude.map
+                                                                                                                                                                                                                         (\ _v
+                                                                                                                                                                                                                            -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                    3306)
+                                                                                                                                                                                                                                 ((Prelude..)
+                                                                                                                                                                                                                                    (\ bs
+                                                                                                                                                                                                                                       -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                               (Prelude.fromIntegral
+                                                                                                                                                                                                                                                  (Data.ByteString.length
+                                                                                                                                                                                                                                                     bs)))
+                                                                                                                                                                                                                                            (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                               bs))
+                                                                                                                                                                                                                                    Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                    (Lens.Family2.set
+                                                                                                                                                                                                                                       (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                          @"key")
+                                                                                                                                                                                                                                       (Prelude.fst
+                                                                                                                                                                                                                                          _v)
+                                                                                                                                                                                                                                       (Lens.Family2.set
+                                                                                                                                                                                                                                          (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                             @"value")
+                                                                                                                                                                                                                                          (Prelude.snd
+                                                                                                                                                                                                                                             _v)
+                                                                                                                                                                                                                                          (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                             ExampleMessage'MapScalar13Entry)))))
+                                                                                                                                                                                                                         (Data.Map.toList
+                                                                                                                                                                                                                            (Lens.Family2.view
+                                                                                                                                                                                                                               (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                  @"mapScalar13")
+                                                                                                                                                                                                                               _x))))
+                                                                                                                                                                                                                   ((Data.Monoid.<>)
+                                                                                                                                                                                                                      (Data.Monoid.mconcat
+                                                                                                                                                                                                                         (Prelude.map
+                                                                                                                                                                                                                            (\ _v
+                                                                                                                                                                                                                               -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                       3314)
+                                                                                                                                                                                                                                    ((Prelude..)
+                                                                                                                                                                                                                                       (\ bs
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  (Prelude.fromIntegral
+                                                                                                                                                                                                                                                     (Data.ByteString.length
+                                                                                                                                                                                                                                                        bs)))
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                  bs))
+                                                                                                                                                                                                                                       Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                       (Lens.Family2.set
+                                                                                                                                                                                                                                          (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                             @"key")
+                                                                                                                                                                                                                                          (Prelude.fst
+                                                                                                                                                                                                                                             _v)
+                                                                                                                                                                                                                                          (Lens.Family2.set
+                                                                                                                                                                                                                                             (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                @"value")
+                                                                                                                                                                                                                                             (Prelude.snd
+                                                                                                                                                                                                                                                _v)
+                                                                                                                                                                                                                                             (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                                ExampleMessage'MapScalar14Entry)))))
+                                                                                                                                                                                                                            (Data.Map.toList
+                                                                                                                                                                                                                               (Lens.Family2.view
+                                                                                                                                                                                                                                  (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                     @"mapScalar14")
+                                                                                                                                                                                                                                  _x))))
+                                                                                                                                                                                                                      ((Data.Monoid.<>)
+                                                                                                                                                                                                                         (Data.Monoid.mconcat
+                                                                                                                                                                                                                            (Prelude.map
+                                                                                                                                                                                                                               (\ _v
+                                                                                                                                                                                                                                  -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                          3322)
+                                                                                                                                                                                                                                       ((Prelude..)
+                                                                                                                                                                                                                                          (\ bs
+                                                                                                                                                                                                                                             -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                     (Prelude.fromIntegral
+                                                                                                                                                                                                                                                        (Data.ByteString.length
+                                                                                                                                                                                                                                                           bs)))
+                                                                                                                                                                                                                                                  (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                     bs))
+                                                                                                                                                                                                                                          Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                          (Lens.Family2.set
+                                                                                                                                                                                                                                             (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                @"key")
+                                                                                                                                                                                                                                             (Prelude.fst
+                                                                                                                                                                                                                                                _v)
+                                                                                                                                                                                                                                             (Lens.Family2.set
+                                                                                                                                                                                                                                                (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                   @"value")
+                                                                                                                                                                                                                                                (Prelude.snd
+                                                                                                                                                                                                                                                   _v)
+                                                                                                                                                                                                                                                (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                                   ExampleMessage'MapScalar15Entry)))))
+                                                                                                                                                                                                                               (Data.Map.toList
+                                                                                                                                                                                                                                  (Lens.Family2.view
+                                                                                                                                                                                                                                     (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                        @"mapScalar15")
+                                                                                                                                                                                                                                     _x))))
+                                                                                                                                                                                                                         ((Data.Monoid.<>)
+                                                                                                                                                                                                                            (Data.Monoid.mconcat
+                                                                                                                                                                                                                               (Prelude.map
+                                                                                                                                                                                                                                  (\ _v
+                                                                                                                                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                             3330)
+                                                                                                                                                                                                                                          ((Prelude..)
+                                                                                                                                                                                                                                             (\ bs
+                                                                                                                                                                                                                                                -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                        (Prelude.fromIntegral
+                                                                                                                                                                                                                                                           (Data.ByteString.length
+                                                                                                                                                                                                                                                              bs)))
+                                                                                                                                                                                                                                                     (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                        bs))
+                                                                                                                                                                                                                                             Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                             (Lens.Family2.set
+                                                                                                                                                                                                                                                (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                   @"key")
+                                                                                                                                                                                                                                                (Prelude.fst
+                                                                                                                                                                                                                                                   _v)
+                                                                                                                                                                                                                                                (Lens.Family2.set
+                                                                                                                                                                                                                                                   (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                      @"value")
+                                                                                                                                                                                                                                                   (Prelude.snd
+                                                                                                                                                                                                                                                      _v)
+                                                                                                                                                                                                                                                   (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                                      ExampleMessage'MapAnotherEntry)))))
+                                                                                                                                                                                                                                  (Data.Map.toList
+                                                                                                                                                                                                                                     (Lens.Family2.view
+                                                                                                                                                                                                                                        (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                           @"mapAnother")
+                                                                                                                                                                                                                                        _x))))
+                                                                                                                                                                                                                            ((Data.Monoid.<>)
+                                                                                                                                                                                                                               (Data.Monoid.mconcat
+                                                                                                                                                                                                                                  (Prelude.map
+                                                                                                                                                                                                                                     (\ _v
+                                                                                                                                                                                                                                        -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                3338)
+                                                                                                                                                                                                                                             ((Prelude..)
+                                                                                                                                                                                                                                                (\ bs
+                                                                                                                                                                                                                                                   -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                           (Prelude.fromIntegral
+                                                                                                                                                                                                                                                              (Data.ByteString.length
+                                                                                                                                                                                                                                                                 bs)))
+                                                                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                           bs))
+                                                                                                                                                                                                                                                Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                                (Lens.Family2.set
+                                                                                                                                                                                                                                                   (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                      @"key")
+                                                                                                                                                                                                                                                   (Prelude.fst
+                                                                                                                                                                                                                                                      _v)
+                                                                                                                                                                                                                                                   (Lens.Family2.set
+                                                                                                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                         @"value")
+                                                                                                                                                                                                                                                      (Prelude.snd
+                                                                                                                                                                                                                                                         _v)
+                                                                                                                                                                                                                                                      (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                                         ExampleMessage'MapNestedEntry)))))
+                                                                                                                                                                                                                                     (Data.Map.toList
+                                                                                                                                                                                                                                        (Lens.Family2.view
+                                                                                                                                                                                                                                           (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                              @"mapNested")
+                                                                                                                                                                                                                                           _x))))
+                                                                                                                                                                                                                               ((Data.Monoid.<>)
+                                                                                                                                                                                                                                  (Data.Monoid.mconcat
+                                                                                                                                                                                                                                     (Prelude.map
+                                                                                                                                                                                                                                        (\ _v
+                                                                                                                                                                                                                                           -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                   3346)
+                                                                                                                                                                                                                                                ((Prelude..)
+                                                                                                                                                                                                                                                   (\ bs
+                                                                                                                                                                                                                                                      -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                              (Prelude.fromIntegral
+                                                                                                                                                                                                                                                                 (Data.ByteString.length
+                                                                                                                                                                                                                                                                    bs)))
+                                                                                                                                                                                                                                                           (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                              bs))
+                                                                                                                                                                                                                                                   Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                                   (Lens.Family2.set
+                                                                                                                                                                                                                                                      (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                         @"key")
+                                                                                                                                                                                                                                                      (Prelude.fst
+                                                                                                                                                                                                                                                         _v)
+                                                                                                                                                                                                                                                      (Lens.Family2.set
+                                                                                                                                                                                                                                                         (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                            @"value")
+                                                                                                                                                                                                                                                         (Prelude.snd
+                                                                                                                                                                                                                                                            _v)
+                                                                                                                                                                                                                                                         (Data.ProtoLens.defMessage ::
+                                                                                                                                                                                                                                                            ExampleMessage'MapEnumEntry)))))
+                                                                                                                                                                                                                                        (Data.Map.toList
+                                                                                                                                                                                                                                           (Lens.Family2.view
+                                                                                                                                                                                                                                              (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                                 @"mapEnum")
+                                                                                                                                                                                                                                              _x))))
+                                                                                                                                                                                                                                  ((Data.Monoid.<>)
+                                                                                                                                                                                                                                     (case
+                                                                                                                                                                                                                                          Lens.Family2.view
+                                                                                                                                                                                                                                            (Data.ProtoLens.Field.field
+                                                                                                                                                                                                                                               @"maybe'exampleOneOf")
+                                                                                                                                                                                                                                            _x
+                                                                                                                                                                                                                                      of
+                                                                                                                                                                                                                                        Prelude.Nothing
+                                                                                                                                                                                                                                          -> Data.Monoid.mempty
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar01 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4009)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.doubleToWord
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar02 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4021)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.floatToWord
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar03 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4024)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  Prelude.fromIntegral
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar04 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4032)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  Prelude.fromIntegral
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar05 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4040)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  Prelude.fromIntegral
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar06 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4048)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar07 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4056)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  ((Prelude..)
+                                                                                                                                                                                                                                                     Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                     Prelude.fromIntegral)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.signedInt32ToWord
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar08 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4064)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  ((Prelude..)
+                                                                                                                                                                                                                                                     Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                     Prelude.fromIntegral)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.signedInt64ToWord
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar09 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4077)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar10 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4081)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar11 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4093)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putFixed32
+                                                                                                                                                                                                                                                  Prelude.fromIntegral
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar12 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4097)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putFixed64
+                                                                                                                                                                                                                                                  Prelude.fromIntegral
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar13 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4104)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  (\ b
+                                                                                                                                                                                                                                                     -> if b then
+                                                                                                                                                                                                                                                            1
+                                                                                                                                                                                                                                                        else
+                                                                                                                                                                                                                                                            0)
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar14 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4114)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  (\ bs
+                                                                                                                                                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                             (Prelude.fromIntegral
+                                                                                                                                                                                                                                                                (Data.ByteString.length
+                                                                                                                                                                                                                                                                   bs)))
+                                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                             bs))
+                                                                                                                                                                                                                                                  Data.Text.Encoding.encodeUtf8
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofScalar15 v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4122)
+                                                                                                                                                                                                                                               ((\ bs
+                                                                                                                                                                                                                                                   -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                           (Prelude.fromIntegral
+                                                                                                                                                                                                                                                              (Data.ByteString.length
+                                                                                                                                                                                                                                                                 bs)))
+                                                                                                                                                                                                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                           bs))
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofAnother v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4130)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  (\ bs
+                                                                                                                                                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                             (Prelude.fromIntegral
+                                                                                                                                                                                                                                                                (Data.ByteString.length
+                                                                                                                                                                                                                                                                   bs)))
+                                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                             bs))
+                                                                                                                                                                                                                                                  Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofNested v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4138)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  (\ bs
+                                                                                                                                                                                                                                                     -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                             (Prelude.fromIntegral
+                                                                                                                                                                                                                                                                (Data.ByteString.length
+                                                                                                                                                                                                                                                                   bs)))
+                                                                                                                                                                                                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
+                                                                                                                                                                                                                                                             bs))
+                                                                                                                                                                                                                                                  Data.ProtoLens.encodeMessage
+                                                                                                                                                                                                                                                  v)
+                                                                                                                                                                                                                                        (Prelude.Just (ExampleMessage'OneofEnum v))
+                                                                                                                                                                                                                                          -> (Data.Monoid.<>)
+                                                                                                                                                                                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                  4144)
+                                                                                                                                                                                                                                               ((Prelude..)
+                                                                                                                                                                                                                                                  ((Prelude..)
+                                                                                                                                                                                                                                                     Data.ProtoLens.Encoding.Bytes.putVarInt
+                                                                                                                                                                                                                                                     Prelude.fromIntegral)
+                                                                                                                                                                                                                                                  Prelude.fromEnum
+                                                                                                                                                                                                                                                  v))
+                                                                                                                                                                                                                                     (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                                                                                                                                                                                                                                        (Lens.Family2.view
+                                                                                                                                                                                                                                           Data.ProtoLens.unknownFields
+                                                                                                                                                                                                                                           _x))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+instance Control.DeepSeq.NFData ExampleMessage where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'defaultScalar01 x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'defaultScalar02 x__)
+                   (Control.DeepSeq.deepseq
+                      (_ExampleMessage'defaultScalar03 x__)
+                      (Control.DeepSeq.deepseq
+                         (_ExampleMessage'defaultScalar04 x__)
+                         (Control.DeepSeq.deepseq
+                            (_ExampleMessage'defaultScalar05 x__)
+                            (Control.DeepSeq.deepseq
+                               (_ExampleMessage'defaultScalar06 x__)
+                               (Control.DeepSeq.deepseq
+                                  (_ExampleMessage'defaultScalar07 x__)
+                                  (Control.DeepSeq.deepseq
+                                     (_ExampleMessage'defaultScalar08 x__)
+                                     (Control.DeepSeq.deepseq
+                                        (_ExampleMessage'defaultScalar09 x__)
+                                        (Control.DeepSeq.deepseq
+                                           (_ExampleMessage'defaultScalar10 x__)
+                                           (Control.DeepSeq.deepseq
+                                              (_ExampleMessage'defaultScalar11 x__)
+                                              (Control.DeepSeq.deepseq
+                                                 (_ExampleMessage'defaultScalar12 x__)
+                                                 (Control.DeepSeq.deepseq
+                                                    (_ExampleMessage'defaultScalar13 x__)
+                                                    (Control.DeepSeq.deepseq
+                                                       (_ExampleMessage'defaultScalar14 x__)
+                                                       (Control.DeepSeq.deepseq
+                                                          (_ExampleMessage'defaultScalar15 x__)
+                                                          (Control.DeepSeq.deepseq
+                                                             (_ExampleMessage'defaultAnother x__)
+                                                             (Control.DeepSeq.deepseq
+                                                                (_ExampleMessage'defaultNested x__)
+                                                                (Control.DeepSeq.deepseq
+                                                                   (_ExampleMessage'defaultEnum x__)
+                                                                   (Control.DeepSeq.deepseq
+                                                                      (_ExampleMessage'optionalScalar01
+                                                                         x__)
+                                                                      (Control.DeepSeq.deepseq
+                                                                         (_ExampleMessage'optionalScalar02
+                                                                            x__)
+                                                                         (Control.DeepSeq.deepseq
+                                                                            (_ExampleMessage'optionalScalar03
+                                                                               x__)
+                                                                            (Control.DeepSeq.deepseq
+                                                                               (_ExampleMessage'optionalScalar04
+                                                                                  x__)
+                                                                               (Control.DeepSeq.deepseq
+                                                                                  (_ExampleMessage'optionalScalar05
+                                                                                     x__)
+                                                                                  (Control.DeepSeq.deepseq
+                                                                                     (_ExampleMessage'optionalScalar06
+                                                                                        x__)
+                                                                                     (Control.DeepSeq.deepseq
+                                                                                        (_ExampleMessage'optionalScalar07
+                                                                                           x__)
+                                                                                        (Control.DeepSeq.deepseq
+                                                                                           (_ExampleMessage'optionalScalar08
+                                                                                              x__)
+                                                                                           (Control.DeepSeq.deepseq
+                                                                                              (_ExampleMessage'optionalScalar09
+                                                                                                 x__)
+                                                                                              (Control.DeepSeq.deepseq
+                                                                                                 (_ExampleMessage'optionalScalar10
+                                                                                                    x__)
+                                                                                                 (Control.DeepSeq.deepseq
+                                                                                                    (_ExampleMessage'optionalScalar11
+                                                                                                       x__)
+                                                                                                    (Control.DeepSeq.deepseq
+                                                                                                       (_ExampleMessage'optionalScalar12
+                                                                                                          x__)
+                                                                                                       (Control.DeepSeq.deepseq
+                                                                                                          (_ExampleMessage'optionalScalar13
+                                                                                                             x__)
+                                                                                                          (Control.DeepSeq.deepseq
+                                                                                                             (_ExampleMessage'optionalScalar14
+                                                                                                                x__)
+                                                                                                             (Control.DeepSeq.deepseq
+                                                                                                                (_ExampleMessage'optionalScalar15
+                                                                                                                   x__)
+                                                                                                                (Control.DeepSeq.deepseq
+                                                                                                                   (_ExampleMessage'optionalAnother
+                                                                                                                      x__)
+                                                                                                                   (Control.DeepSeq.deepseq
+                                                                                                                      (_ExampleMessage'optionalNested
+                                                                                                                         x__)
+                                                                                                                      (Control.DeepSeq.deepseq
+                                                                                                                         (_ExampleMessage'optionalEnum
+                                                                                                                            x__)
+                                                                                                                         (Control.DeepSeq.deepseq
+                                                                                                                            (_ExampleMessage'repeatedScalar01
+                                                                                                                               x__)
+                                                                                                                            (Control.DeepSeq.deepseq
+                                                                                                                               (_ExampleMessage'repeatedScalar02
+                                                                                                                                  x__)
+                                                                                                                               (Control.DeepSeq.deepseq
+                                                                                                                                  (_ExampleMessage'repeatedScalar03
+                                                                                                                                     x__)
+                                                                                                                                  (Control.DeepSeq.deepseq
+                                                                                                                                     (_ExampleMessage'repeatedScalar04
+                                                                                                                                        x__)
+                                                                                                                                     (Control.DeepSeq.deepseq
+                                                                                                                                        (_ExampleMessage'repeatedScalar05
+                                                                                                                                           x__)
+                                                                                                                                        (Control.DeepSeq.deepseq
+                                                                                                                                           (_ExampleMessage'repeatedScalar06
+                                                                                                                                              x__)
+                                                                                                                                           (Control.DeepSeq.deepseq
+                                                                                                                                              (_ExampleMessage'repeatedScalar07
+                                                                                                                                                 x__)
+                                                                                                                                              (Control.DeepSeq.deepseq
+                                                                                                                                                 (_ExampleMessage'repeatedScalar08
+                                                                                                                                                    x__)
+                                                                                                                                                 (Control.DeepSeq.deepseq
+                                                                                                                                                    (_ExampleMessage'repeatedScalar09
+                                                                                                                                                       x__)
+                                                                                                                                                    (Control.DeepSeq.deepseq
+                                                                                                                                                       (_ExampleMessage'repeatedScalar10
+                                                                                                                                                          x__)
+                                                                                                                                                       (Control.DeepSeq.deepseq
+                                                                                                                                                          (_ExampleMessage'repeatedScalar11
+                                                                                                                                                             x__)
+                                                                                                                                                          (Control.DeepSeq.deepseq
+                                                                                                                                                             (_ExampleMessage'repeatedScalar12
+                                                                                                                                                                x__)
+                                                                                                                                                             (Control.DeepSeq.deepseq
+                                                                                                                                                                (_ExampleMessage'repeatedScalar13
+                                                                                                                                                                   x__)
+                                                                                                                                                                (Control.DeepSeq.deepseq
+                                                                                                                                                                   (_ExampleMessage'repeatedScalar14
+                                                                                                                                                                      x__)
+                                                                                                                                                                   (Control.DeepSeq.deepseq
+                                                                                                                                                                      (_ExampleMessage'repeatedScalar15
+                                                                                                                                                                         x__)
+                                                                                                                                                                      (Control.DeepSeq.deepseq
+                                                                                                                                                                         (_ExampleMessage'repeatedAnother
+                                                                                                                                                                            x__)
+                                                                                                                                                                         (Control.DeepSeq.deepseq
+                                                                                                                                                                            (_ExampleMessage'repeatedNested
+                                                                                                                                                                               x__)
+                                                                                                                                                                            (Control.DeepSeq.deepseq
+                                                                                                                                                                               (_ExampleMessage'repeatedEnum
+                                                                                                                                                                                  x__)
+                                                                                                                                                                               (Control.DeepSeq.deepseq
+                                                                                                                                                                                  (_ExampleMessage'mapScalar01
+                                                                                                                                                                                     x__)
+                                                                                                                                                                                  (Control.DeepSeq.deepseq
+                                                                                                                                                                                     (_ExampleMessage'mapScalar02
+                                                                                                                                                                                        x__)
+                                                                                                                                                                                     (Control.DeepSeq.deepseq
+                                                                                                                                                                                        (_ExampleMessage'mapScalar03
+                                                                                                                                                                                           x__)
+                                                                                                                                                                                        (Control.DeepSeq.deepseq
+                                                                                                                                                                                           (_ExampleMessage'mapScalar04
+                                                                                                                                                                                              x__)
+                                                                                                                                                                                           (Control.DeepSeq.deepseq
+                                                                                                                                                                                              (_ExampleMessage'mapScalar05
+                                                                                                                                                                                                 x__)
+                                                                                                                                                                                              (Control.DeepSeq.deepseq
+                                                                                                                                                                                                 (_ExampleMessage'mapScalar06
+                                                                                                                                                                                                    x__)
+                                                                                                                                                                                                 (Control.DeepSeq.deepseq
+                                                                                                                                                                                                    (_ExampleMessage'mapScalar07
+                                                                                                                                                                                                       x__)
+                                                                                                                                                                                                    (Control.DeepSeq.deepseq
+                                                                                                                                                                                                       (_ExampleMessage'mapScalar08
+                                                                                                                                                                                                          x__)
+                                                                                                                                                                                                       (Control.DeepSeq.deepseq
+                                                                                                                                                                                                          (_ExampleMessage'mapScalar09
+                                                                                                                                                                                                             x__)
+                                                                                                                                                                                                          (Control.DeepSeq.deepseq
+                                                                                                                                                                                                             (_ExampleMessage'mapScalar10
+                                                                                                                                                                                                                x__)
+                                                                                                                                                                                                             (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                (_ExampleMessage'mapScalar11
+                                                                                                                                                                                                                   x__)
+                                                                                                                                                                                                                (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                   (_ExampleMessage'mapScalar12
+                                                                                                                                                                                                                      x__)
+                                                                                                                                                                                                                   (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                      (_ExampleMessage'mapScalar13
+                                                                                                                                                                                                                         x__)
+                                                                                                                                                                                                                      (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                         (_ExampleMessage'mapScalar14
+                                                                                                                                                                                                                            x__)
+                                                                                                                                                                                                                         (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                            (_ExampleMessage'mapScalar15
+                                                                                                                                                                                                                               x__)
+                                                                                                                                                                                                                            (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                               (_ExampleMessage'mapAnother
+                                                                                                                                                                                                                                  x__)
+                                                                                                                                                                                                                               (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                                  (_ExampleMessage'mapNested
+                                                                                                                                                                                                                                     x__)
+                                                                                                                                                                                                                                  (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                                     (_ExampleMessage'mapEnum
+                                                                                                                                                                                                                                        x__)
+                                                                                                                                                                                                                                     (Control.DeepSeq.deepseq
+                                                                                                                                                                                                                                        (_ExampleMessage'exampleOneOf
+                                                                                                                                                                                                                                           x__)
+                                                                                                                                                                                                                                        ())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+instance Control.DeepSeq.NFData ExampleMessage'ExampleOneOf where
+  rnf (ExampleMessage'OneofScalar01 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar02 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar03 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar04 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar05 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar06 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar07 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar08 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar09 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar10 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar11 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar12 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar13 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar14 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofScalar15 x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofAnother x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofNested x__) = Control.DeepSeq.rnf x__
+  rnf (ExampleMessage'OneofEnum x__) = Control.DeepSeq.rnf x__
+_ExampleMessage'OneofScalar01 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Prelude.Double
+_ExampleMessage'OneofScalar01
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar01
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar01 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar02 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Prelude.Float
+_ExampleMessage'OneofScalar02
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar02
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar02 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar03 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Int.Int32
+_ExampleMessage'OneofScalar03
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar03
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar03 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar04 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Int.Int64
+_ExampleMessage'OneofScalar04
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar04
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar04 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar05 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Word.Word32
+_ExampleMessage'OneofScalar05
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar05
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar05 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar06 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Word.Word64
+_ExampleMessage'OneofScalar06
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar06
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar06 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar07 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Int.Int32
+_ExampleMessage'OneofScalar07
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar07
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar07 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar08 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Int.Int64
+_ExampleMessage'OneofScalar08
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar08
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar08 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar09 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Word.Word32
+_ExampleMessage'OneofScalar09
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar09
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar09 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar10 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Word.Word64
+_ExampleMessage'OneofScalar10
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar10
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar10 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar11 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Int.Int32
+_ExampleMessage'OneofScalar11
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar11
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar11 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar12 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Int.Int64
+_ExampleMessage'OneofScalar12
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar12
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar12 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar13 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Prelude.Bool
+_ExampleMessage'OneofScalar13
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar13
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar13 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar14 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.Text.Text
+_ExampleMessage'OneofScalar14
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar14
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar14 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofScalar15 ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf Data.ByteString.ByteString
+_ExampleMessage'OneofScalar15
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofScalar15
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofScalar15 p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofAnother ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf AnotherMessage
+_ExampleMessage'OneofAnother
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofAnother
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofAnother p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofNested ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf ExampleMessage'NestedMessage
+_ExampleMessage'OneofNested
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofNested
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofNested p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+_ExampleMessage'OneofEnum ::
+  Data.ProtoLens.Prism.Prism' ExampleMessage'ExampleOneOf ExampleEnum
+_ExampleMessage'OneofEnum
+  = Data.ProtoLens.Prism.prism'
+      ExampleMessage'OneofEnum
+      (\ p__
+         -> case p__ of
+              (ExampleMessage'OneofEnum p__val) -> Prelude.Just p__val
+              _otherwise -> Prelude.Nothing)
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapAnotherEntry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapAnotherEntry AnotherMessage@
+         * 'Proto.Spec_Fields.maybe'value' @:: Lens' ExampleMessage'MapAnotherEntry (Prelude.Maybe AnotherMessage)@ -}
+data ExampleMessage'MapAnotherEntry
+  = ExampleMessage'MapAnotherEntry'_constructor {_ExampleMessage'MapAnotherEntry'key :: !Data.Text.Text,
+                                                 _ExampleMessage'MapAnotherEntry'value :: !(Prelude.Maybe AnotherMessage),
+                                                 _ExampleMessage'MapAnotherEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapAnotherEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapAnotherEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapAnotherEntry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapAnotherEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapAnotherEntry "value" AnotherMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapAnotherEntry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapAnotherEntry'value = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapAnotherEntry "maybe'value" (Prelude.Maybe AnotherMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapAnotherEntry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapAnotherEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapAnotherEntry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapAnotherEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\SIMapAnotherEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2%\n\
+      \\ENQvalue\CAN\STX \SOH(\v2\SI.AnotherMessageR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapAnotherEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor AnotherMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapAnotherEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapAnotherEntry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapAnotherEntry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapAnotherEntry'_constructor
+        {_ExampleMessage'MapAnotherEntry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapAnotherEntry'value = Prelude.Nothing,
+         _ExampleMessage'MapAnotherEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapAnotherEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapAnotherEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapAnotherEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapAnotherEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapAnotherEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapAnotherEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapAnotherEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapEnumEntry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapEnumEntry ExampleEnum@ -}
+data ExampleMessage'MapEnumEntry
+  = ExampleMessage'MapEnumEntry'_constructor {_ExampleMessage'MapEnumEntry'key :: !Data.Text.Text,
+                                              _ExampleMessage'MapEnumEntry'value :: !ExampleEnum,
+                                              _ExampleMessage'MapEnumEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapEnumEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapEnumEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapEnumEntry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapEnumEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapEnumEntry "value" ExampleEnum where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapEnumEntry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapEnumEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapEnumEntry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapEnumEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\fMapEnumEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\"\n\
+      \\ENQvalue\CAN\STX \SOH(\SO2\f.ExampleEnumR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapEnumEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleEnum)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapEnumEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapEnumEntry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapEnumEntry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapEnumEntry'_constructor
+        {_ExampleMessage'MapEnumEntry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapEnumEntry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapEnumEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapEnumEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapEnumEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.toEnum
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapEnumEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            ((Prelude..)
+                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                            Prelude.fromEnum _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapEnumEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapEnumEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapEnumEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapEnumEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapNestedEntry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapNestedEntry ExampleMessage'NestedMessage@
+         * 'Proto.Spec_Fields.maybe'value' @:: Lens' ExampleMessage'MapNestedEntry (Prelude.Maybe ExampleMessage'NestedMessage)@ -}
+data ExampleMessage'MapNestedEntry
+  = ExampleMessage'MapNestedEntry'_constructor {_ExampleMessage'MapNestedEntry'key :: !Data.Text.Text,
+                                                _ExampleMessage'MapNestedEntry'value :: !(Prelude.Maybe ExampleMessage'NestedMessage),
+                                                _ExampleMessage'MapNestedEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapNestedEntry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapNestedEntry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapNestedEntry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapNestedEntry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapNestedEntry "value" ExampleMessage'NestedMessage where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapNestedEntry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapNestedEntry'value = y__}))
+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapNestedEntry "maybe'value" (Prelude.Maybe ExampleMessage'NestedMessage) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapNestedEntry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapNestedEntry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapNestedEntry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapNestedEntry"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOMapNestedEntry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC23\n\
+      \\ENQvalue\CAN\STX \SOH(\v2\GS.ExampleMessage.NestedMessageR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapNestedEntry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor ExampleMessage'NestedMessage)
+              (Data.ProtoLens.OptionalField
+                 (Data.ProtoLens.Field.field @"maybe'value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapNestedEntry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapNestedEntry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapNestedEntry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapNestedEntry'_constructor
+        {_ExampleMessage'MapNestedEntry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapNestedEntry'value = Prelude.Nothing,
+         _ExampleMessage'MapNestedEntry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapNestedEntry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapNestedEntry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.isolate
+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapNestedEntry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (case
+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
+                 of
+                   Prelude.Nothing -> Data.Monoid.mempty
+                   (Prelude.Just _v)
+                     -> (Data.Monoid.<>)
+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                          ((Prelude..)
+                             (\ bs
+                                -> (Data.Monoid.<>)
+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                             Data.ProtoLens.encodeMessage _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapNestedEntry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapNestedEntry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapNestedEntry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapNestedEntry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar01Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar01Entry Prelude.Double@ -}
+data ExampleMessage'MapScalar01Entry
+  = ExampleMessage'MapScalar01Entry'_constructor {_ExampleMessage'MapScalar01Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar01Entry'value :: !Prelude.Double,
+                                                  _ExampleMessage'MapScalar01Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar01Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar01Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar01Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar01Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar01Entry "value" Prelude.Double where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar01Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar01Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar01Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar01Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar01Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar01Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar01Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar01Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar01Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar01Entry'_constructor
+        {_ExampleMessage'MapScalar01Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar01Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar01Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar01Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar01Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        17
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar01Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 17)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed64
+                            Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar01Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar01Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar01Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar01Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar02Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar02Entry Prelude.Float@ -}
+data ExampleMessage'MapScalar02Entry
+  = ExampleMessage'MapScalar02Entry'_constructor {_ExampleMessage'MapScalar02Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar02Entry'value :: !Prelude.Float,
+                                                  _ExampleMessage'MapScalar02Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar02Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar02Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar02Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar02Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar02Entry "value" Prelude.Float where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar02Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar02Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar02Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar02Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar02Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\STXR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar02Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar02Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar02Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar02Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar02Entry'_constructor
+        {_ExampleMessage'MapScalar02Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar02Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar02Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar02Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar02Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        21
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToFloat
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar02Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 21)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed32
+                            Data.ProtoLens.Encoding.Bytes.floatToWord _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar02Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar02Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar02Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar02Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar03Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar03Entry Data.Int.Int32@ -}
+data ExampleMessage'MapScalar03Entry
+  = ExampleMessage'MapScalar03Entry'_constructor {_ExampleMessage'MapScalar03Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar03Entry'value :: !Data.Int.Int32,
+                                                  _ExampleMessage'MapScalar03Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar03Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar03Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar03Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar03Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar03Entry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar03Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar03Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar03Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar03Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar03Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar03Entry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar03Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar03Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar03Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar03Entry'_constructor
+        {_ExampleMessage'MapScalar03Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar03Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar03Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar03Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar03Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar03Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar03Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar03Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar03Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar03Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar04Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar04Entry Data.Int.Int64@ -}
+data ExampleMessage'MapScalar04Entry
+  = ExampleMessage'MapScalar04Entry'_constructor {_ExampleMessage'MapScalar04Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar04Entry'value :: !Data.Int.Int64,
+                                                  _ExampleMessage'MapScalar04Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar04Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar04Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar04Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar04Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar04Entry "value" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar04Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar04Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar04Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar04Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar04Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ETXR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar04Entry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar04Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar04Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar04Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar04Entry'_constructor
+        {_ExampleMessage'MapScalar04Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar04Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar04Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar04Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar04Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar04Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar04Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar04Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar04Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar04Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar05Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar05Entry Data.Word.Word32@ -}
+data ExampleMessage'MapScalar05Entry
+  = ExampleMessage'MapScalar05Entry'_constructor {_ExampleMessage'MapScalar05Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar05Entry'value :: !Data.Word.Word32,
+                                                  _ExampleMessage'MapScalar05Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar05Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar05Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar05Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar05Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar05Entry "value" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar05Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar05Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar05Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar05Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar05Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\rR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar05Entry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar05Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar05Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar05Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar05Entry'_constructor
+        {_ExampleMessage'MapScalar05Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar05Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar05Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar05Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar05Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar05Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar05Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar05Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar05Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar05Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar06Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar06Entry Data.Word.Word64@ -}
+data ExampleMessage'MapScalar06Entry
+  = ExampleMessage'MapScalar06Entry'_constructor {_ExampleMessage'MapScalar06Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar06Entry'value :: !Data.Word.Word64,
+                                                  _ExampleMessage'MapScalar06Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar06Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar06Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar06Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar06Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar06Entry "value" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar06Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar06Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar06Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar06Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar06Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\EOTR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar06Entry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar06Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar06Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar06Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar06Entry'_constructor
+        {_ExampleMessage'MapScalar06Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar06Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar06Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar06Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar06Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar06Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar06Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar06Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar06Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar06Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar07Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar07Entry Data.Int.Int32@ -}
+data ExampleMessage'MapScalar07Entry
+  = ExampleMessage'MapScalar07Entry'_constructor {_ExampleMessage'MapScalar07Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar07Entry'value :: !Data.Int.Int32,
+                                                  _ExampleMessage'MapScalar07Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar07Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar07Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar07Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar07Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar07Entry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar07Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar07Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar07Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar07Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar07Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\DC1R\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar07Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar07Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar07Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar07Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar07Entry'_constructor
+        {_ExampleMessage'MapScalar07Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar07Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar07Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar07Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar07Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt32
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar07Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            ((Prelude..)
+                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                            Data.ProtoLens.Encoding.Bytes.signedInt32ToWord _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar07Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar07Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar07Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar07Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar08Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar08Entry Data.Int.Int64@ -}
+data ExampleMessage'MapScalar08Entry
+  = ExampleMessage'MapScalar08Entry'_constructor {_ExampleMessage'MapScalar08Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar08Entry'value :: !Data.Int.Int64,
+                                                  _ExampleMessage'MapScalar08Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar08Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar08Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar08Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar08Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar08Entry "value" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar08Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar08Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar08Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar08Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar08Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\DC2R\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar08Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SInt64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar08Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar08Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar08Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar08Entry'_constructor
+        {_ExampleMessage'MapScalar08Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar08Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar08Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar08Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar08Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Data.ProtoLens.Encoding.Bytes.wordToSignedInt64
+                                          (Prelude.fmap
+                                             Prelude.fromIntegral
+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar08Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            ((Prelude..)
+                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
+                            Data.ProtoLens.Encoding.Bytes.signedInt64ToWord _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar08Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar08Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar08Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar08Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar09Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar09Entry Data.Word.Word32@ -}
+data ExampleMessage'MapScalar09Entry
+  = ExampleMessage'MapScalar09Entry'_constructor {_ExampleMessage'MapScalar09Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar09Entry'value :: !Data.Word.Word32,
+                                                  _ExampleMessage'MapScalar09Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar09Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar09Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar09Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar09Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar09Entry "value" Data.Word.Word32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar09Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar09Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar09Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar09Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar09Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\aR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar09Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar09Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar09Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar09Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar09Entry'_constructor
+        {_ExampleMessage'MapScalar09Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar09Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar09Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar09Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar09Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        21
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed32 "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar09Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 21)
+                         (Data.ProtoLens.Encoding.Bytes.putFixed32 _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar09Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar09Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar09Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar09Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar10Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar10Entry Data.Word.Word64@ -}
+data ExampleMessage'MapScalar10Entry
+  = ExampleMessage'MapScalar10Entry'_constructor {_ExampleMessage'MapScalar10Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar10Entry'value :: !Data.Word.Word64,
+                                                  _ExampleMessage'MapScalar10Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar10Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar10Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar10Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar10Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar10Entry "value" Data.Word.Word64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar10Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar10Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar10Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar10Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar10Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\ACKR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar10Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Fixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar10Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar10Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar10Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar10Entry'_constructor
+        {_ExampleMessage'MapScalar10Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar10Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar10Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar10Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar10Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        17
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       Data.ProtoLens.Encoding.Bytes.getFixed64 "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar10Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 17)
+                         (Data.ProtoLens.Encoding.Bytes.putFixed64 _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar10Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar10Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar10Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar10Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar11Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar11Entry Data.Int.Int32@ -}
+data ExampleMessage'MapScalar11Entry
+  = ExampleMessage'MapScalar11Entry'_constructor {_ExampleMessage'MapScalar11Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar11Entry'value :: !Data.Int.Int32,
+                                                  _ExampleMessage'MapScalar11Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar11Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar11Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar11Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar11Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar11Entry "value" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar11Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar11Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar11Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar11Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar11Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\SIR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar11Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar11Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar11Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar11Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar11Entry'_constructor
+        {_ExampleMessage'MapScalar11Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar11Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar11Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar11Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar11Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        21
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar11Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 21)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed32 Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar11Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar11Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar11Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar11Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar12Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar12Entry Data.Int.Int64@ -}
+data ExampleMessage'MapScalar12Entry
+  = ExampleMessage'MapScalar12Entry'_constructor {_ExampleMessage'MapScalar12Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar12Entry'value :: !Data.Int.Int64,
+                                                  _ExampleMessage'MapScalar12Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar12Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar12Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar12Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar12Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar12Entry "value" Data.Int.Int64 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar12Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar12Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar12Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar12Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar12Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\DLER\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar12Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.SFixed64Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar12Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar12Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar12Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar12Entry'_constructor
+        {_ExampleMessage'MapScalar12Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar12Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar12Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar12Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar12Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        17
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar12Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 17)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putFixed64 Prelude.fromIntegral _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar12Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar12Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar12Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar12Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar13Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar13Entry Prelude.Bool@ -}
+data ExampleMessage'MapScalar13Entry
+  = ExampleMessage'MapScalar13Entry'_constructor {_ExampleMessage'MapScalar13Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar13Entry'value :: !Prelude.Bool,
+                                                  _ExampleMessage'MapScalar13Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar13Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar13Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar13Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar13Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar13Entry "value" Prelude.Bool where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar13Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar13Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar13Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar13Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar13Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\bR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar13Entry
+        value__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "value"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar13Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar13Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar13Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar13Entry'_constructor
+        {_ExampleMessage'MapScalar13Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar13Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar13Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar13Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar13Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        16
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar13Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
+                         ((Prelude..)
+                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
+                            _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar13Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar13Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar13Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar13Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar14Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar14Entry Data.Text.Text@ -}
+data ExampleMessage'MapScalar14Entry
+  = ExampleMessage'MapScalar14Entry'_constructor {_ExampleMessage'MapScalar14Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar14Entry'value :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar14Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar14Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar14Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar14Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar14Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar14Entry "value" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar14Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar14Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar14Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar14Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar14Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar14Entry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar14Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar14Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar14Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar14Entry'_constructor
+        {_ExampleMessage'MapScalar14Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar14Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar14Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar14Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar14Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar14Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((Prelude..)
+                            (\ bs
+                               -> (Data.Monoid.<>)
+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            Data.Text.Encoding.encodeUtf8 _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar14Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar14Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar14Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar14Entry'value x__) ()))
+{- | Fields :
+     
+         * 'Proto.Spec_Fields.key' @:: Lens' ExampleMessage'MapScalar15Entry Data.Text.Text@
+         * 'Proto.Spec_Fields.value' @:: Lens' ExampleMessage'MapScalar15Entry Data.ByteString.ByteString@ -}
+data ExampleMessage'MapScalar15Entry
+  = ExampleMessage'MapScalar15Entry'_constructor {_ExampleMessage'MapScalar15Entry'key :: !Data.Text.Text,
+                                                  _ExampleMessage'MapScalar15Entry'value :: !Data.ByteString.ByteString,
+                                                  _ExampleMessage'MapScalar15Entry'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'MapScalar15Entry where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar15Entry "key" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar15Entry'key
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar15Entry'key = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField ExampleMessage'MapScalar15Entry "value" Data.ByteString.ByteString where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _ExampleMessage'MapScalar15Entry'value
+           (\ x__ y__ -> x__ {_ExampleMessage'MapScalar15Entry'value = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message ExampleMessage'MapScalar15Entry where
+  messageName _ = Data.Text.pack "ExampleMessage.MapScalar15Entry"
+  packedMessageDescriptor _
+    = "\n\
+      \\DLEMapScalar15Entry\DC2\DLE\n\
+      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+      \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue:\STX8\SOH"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        key__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "key"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar15Entry
+        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 (Data.ProtoLens.Field.field @"value")) ::
+              Data.ProtoLens.FieldDescriptor ExampleMessage'MapScalar15Entry
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, key__field_descriptor),
+           (Data.ProtoLens.Tag 2, value__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'MapScalar15Entry'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'MapScalar15Entry'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'MapScalar15Entry'_constructor
+        {_ExampleMessage'MapScalar15Entry'key = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar15Entry'value = Data.ProtoLens.fieldDefault,
+         _ExampleMessage'MapScalar15Entry'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'MapScalar15Entry
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'MapScalar15Entry
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "key"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
+                        18
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getBytes
+                                             (Prelude.fromIntegral len))
+                                       "value"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "MapScalar15Entry"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (let
+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
+                 in
+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                       Data.Monoid.mempty
+                   else
+                       (Data.Monoid.<>)
+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                         ((\ bs
+                             -> (Data.Monoid.<>)
+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                            _v))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData ExampleMessage'MapScalar15Entry where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'MapScalar15Entry'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_ExampleMessage'MapScalar15Entry'key x__)
+                (Control.DeepSeq.deepseq
+                   (_ExampleMessage'MapScalar15Entry'value x__) ()))
+{- | Fields :
+      -}
+data ExampleMessage'NestedMessage
+  = ExampleMessage'NestedMessage'_constructor {_ExampleMessage'NestedMessage'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show ExampleMessage'NestedMessage where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Message ExampleMessage'NestedMessage where
+  messageName _ = Data.Text.pack "ExampleMessage.NestedMessage"
+  packedMessageDescriptor _
+    = "\n\
+      \\rNestedMessage"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag = let in Data.Map.fromList []
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _ExampleMessage'NestedMessage'_unknownFields
+        (\ x__ y__
+           -> x__ {_ExampleMessage'NestedMessage'_unknownFields = y__})
+  defMessage
+    = ExampleMessage'NestedMessage'_constructor
+        {_ExampleMessage'NestedMessage'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          ExampleMessage'NestedMessage
+          -> Data.ProtoLens.Encoding.Bytes.Parser ExampleMessage'NestedMessage
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "NestedMessage"
+  buildMessage
+    = \ _x
+        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
+             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
+instance Control.DeepSeq.NFData ExampleMessage'NestedMessage where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_ExampleMessage'NestedMessage'_unknownFields x__) ()
+data ExampleService = ExampleService {}
+instance Data.ProtoLens.Service.Types.Service ExampleService where
+  type ServiceName ExampleService = "ExampleService"
+  type ServicePackage ExampleService = ""
+  type ServiceMethods ExampleService = '["acceptAnother",
+                                         "acceptNested",
+                                         "returnAnother",
+                                         "returnNested"]
+  packedServiceDescriptor _
+    = "\n\
+      \\SOExampleService\DC2(\n\
+      \\rAcceptAnother\DC2\SI.AnotherMessage\SUB\ACK.Empty\DC25\n\
+      \\fAcceptNested\DC2\GS.ExampleMessage.NestedMessage\SUB\ACK.Empty\DC2(\n\
+      \\rReturnAnother\DC2\ACK.Empty\SUB\SI.AnotherMessage\DC25\n\
+      \\fReturnNested\DC2\ACK.Empty\SUB\GS.ExampleMessage.NestedMessage"
+instance Data.ProtoLens.Service.Types.HasMethodImpl ExampleService "acceptAnother" where
+  type MethodName ExampleService "acceptAnother" = "AcceptAnother"
+  type MethodInput ExampleService "acceptAnother" = AnotherMessage
+  type MethodOutput ExampleService "acceptAnother" = Empty
+  type MethodStreamingType ExampleService "acceptAnother" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl ExampleService "acceptNested" where
+  type MethodName ExampleService "acceptNested" = "AcceptNested"
+  type MethodInput ExampleService "acceptNested" = ExampleMessage'NestedMessage
+  type MethodOutput ExampleService "acceptNested" = Empty
+  type MethodStreamingType ExampleService "acceptNested" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl ExampleService "returnAnother" where
+  type MethodName ExampleService "returnAnother" = "ReturnAnother"
+  type MethodInput ExampleService "returnAnother" = Empty
+  type MethodOutput ExampleService "returnAnother" = AnotherMessage
+  type MethodStreamingType ExampleService "returnAnother" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl ExampleService "returnNested" where
+  type MethodName ExampleService "returnNested" = "ReturnNested"
+  type MethodInput ExampleService "returnNested" = Empty
+  type MethodOutput ExampleService "returnNested" = ExampleMessage'NestedMessage
+  type MethodStreamingType ExampleService "returnNested" = 'Data.ProtoLens.Service.Types.NonStreaming
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\n\
+    \spec.proto\"\228\&0\n\
+    \\SOExampleMessage\DC2(\n\
+    \\SIdefaultScalar01\CANe \SOH(\SOHR\SIdefaultScalar01\DC2(\n\
+    \\SIdefaultScalar02\CANf \SOH(\STXR\SIdefaultScalar02\DC2(\n\
+    \\SIdefaultScalar03\CANg \SOH(\ENQR\SIdefaultScalar03\DC2(\n\
+    \\SIdefaultScalar04\CANh \SOH(\ETXR\SIdefaultScalar04\DC2(\n\
+    \\SIdefaultScalar05\CANi \SOH(\rR\SIdefaultScalar05\DC2(\n\
+    \\SIdefaultScalar06\CANj \SOH(\EOTR\SIdefaultScalar06\DC2(\n\
+    \\SIdefaultScalar07\CANk \SOH(\DC1R\SIdefaultScalar07\DC2(\n\
+    \\SIdefaultScalar08\CANl \SOH(\DC2R\SIdefaultScalar08\DC2(\n\
+    \\SIdefaultScalar09\CANm \SOH(\aR\SIdefaultScalar09\DC2(\n\
+    \\SIdefaultScalar10\CANn \SOH(\ACKR\SIdefaultScalar10\DC2(\n\
+    \\SIdefaultScalar11\CANo \SOH(\SIR\SIdefaultScalar11\DC2(\n\
+    \\SIdefaultScalar12\CANp \SOH(\DLER\SIdefaultScalar12\DC2(\n\
+    \\SIdefaultScalar13\CANq \SOH(\bR\SIdefaultScalar13\DC2(\n\
+    \\SIdefaultScalar14\CANr \SOH(\tR\SIdefaultScalar14\DC2(\n\
+    \\SIdefaultScalar15\CANs \SOH(\fR\SIdefaultScalar15\DC27\n\
+    \\SOdefaultAnother\CANt \SOH(\v2\SI.AnotherMessageR\SOdefaultAnother\DC2C\n\
+    \\rdefaultNested\CANu \SOH(\v2\GS.ExampleMessage.NestedMessageR\rdefaultNested\DC2.\n\
+    \\vdefaultEnum\CANv \SOH(\SO2\f.ExampleEnumR\vdefaultEnum\DC20\n\
+    \\DLEoptionalScalar01\CAN\201\SOH \SOH(\SOHH\SOHR\DLEoptionalScalar01\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar02\CAN\202\SOH \SOH(\STXH\STXR\DLEoptionalScalar02\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar03\CAN\203\SOH \SOH(\ENQH\ETXR\DLEoptionalScalar03\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar04\CAN\204\SOH \SOH(\ETXH\EOTR\DLEoptionalScalar04\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar05\CAN\205\SOH \SOH(\rH\ENQR\DLEoptionalScalar05\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar06\CAN\206\SOH \SOH(\EOTH\ACKR\DLEoptionalScalar06\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar07\CAN\207\SOH \SOH(\DC1H\aR\DLEoptionalScalar07\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar08\CAN\208\SOH \SOH(\DC2H\bR\DLEoptionalScalar08\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar09\CAN\209\SOH \SOH(\aH\tR\DLEoptionalScalar09\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar10\CAN\210\SOH \SOH(\ACKH\n\
+    \R\DLEoptionalScalar10\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar11\CAN\211\SOH \SOH(\SIH\vR\DLEoptionalScalar11\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar12\CAN\212\SOH \SOH(\DLEH\fR\DLEoptionalScalar12\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar13\CAN\213\SOH \SOH(\bH\rR\DLEoptionalScalar13\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar14\CAN\214\SOH \SOH(\tH\SOR\DLEoptionalScalar14\136\SOH\SOH\DC20\n\
+    \\DLEoptionalScalar15\CAN\215\SOH \SOH(\fH\SIR\DLEoptionalScalar15\136\SOH\SOH\DC2?\n\
+    \\SIoptionalAnother\CAN\216\SOH \SOH(\v2\SI.AnotherMessageH\DLER\SIoptionalAnother\136\SOH\SOH\DC2K\n\
+    \\SOoptionalNested\CAN\217\SOH \SOH(\v2\GS.ExampleMessage.NestedMessageH\DC1R\SOoptionalNested\136\SOH\SOH\DC26\n\
+    \\foptionalEnum\CAN\218\SOH \SOH(\SO2\f.ExampleEnumH\DC2R\foptionalEnum\136\SOH\SOH\DC2+\n\
+    \\DLErepeatedScalar01\CAN\173\STX \ETX(\SOHR\DLErepeatedScalar01\DC2+\n\
+    \\DLErepeatedScalar02\CAN\174\STX \ETX(\STXR\DLErepeatedScalar02\DC2+\n\
+    \\DLErepeatedScalar03\CAN\175\STX \ETX(\ENQR\DLErepeatedScalar03\DC2+\n\
+    \\DLErepeatedScalar04\CAN\176\STX \ETX(\ETXR\DLErepeatedScalar04\DC2+\n\
+    \\DLErepeatedScalar05\CAN\177\STX \ETX(\rR\DLErepeatedScalar05\DC2+\n\
+    \\DLErepeatedScalar06\CAN\178\STX \ETX(\EOTR\DLErepeatedScalar06\DC2+\n\
+    \\DLErepeatedScalar07\CAN\179\STX \ETX(\DC1R\DLErepeatedScalar07\DC2+\n\
+    \\DLErepeatedScalar08\CAN\180\STX \ETX(\DC2R\DLErepeatedScalar08\DC2+\n\
+    \\DLErepeatedScalar09\CAN\181\STX \ETX(\aR\DLErepeatedScalar09\DC2+\n\
+    \\DLErepeatedScalar10\CAN\182\STX \ETX(\ACKR\DLErepeatedScalar10\DC2+\n\
+    \\DLErepeatedScalar11\CAN\183\STX \ETX(\SIR\DLErepeatedScalar11\DC2+\n\
+    \\DLErepeatedScalar12\CAN\184\STX \ETX(\DLER\DLErepeatedScalar12\DC2+\n\
+    \\DLErepeatedScalar13\CAN\185\STX \ETX(\bR\DLErepeatedScalar13\DC2+\n\
+    \\DLErepeatedScalar14\CAN\186\STX \ETX(\tR\DLErepeatedScalar14\DC2+\n\
+    \\DLErepeatedScalar15\CAN\187\STX \ETX(\fR\DLErepeatedScalar15\DC2:\n\
+    \\SIrepeatedAnother\CAN\188\STX \ETX(\v2\SI.AnotherMessageR\SIrepeatedAnother\DC2F\n\
+    \\SOrepeatedNested\CAN\189\STX \ETX(\v2\GS.ExampleMessage.NestedMessageR\SOrepeatedNested\DC21\n\
+    \\frepeatedEnum\CAN\190\STX \ETX(\SO2\f.ExampleEnumR\frepeatedEnum\DC2C\n\
+    \\vmapScalar01\CAN\145\ETX \ETX(\v2 .ExampleMessage.MapScalar01EntryR\vmapScalar01\DC2C\n\
+    \\vmapScalar02\CAN\146\ETX \ETX(\v2 .ExampleMessage.MapScalar02EntryR\vmapScalar02\DC2C\n\
+    \\vmapScalar03\CAN\147\ETX \ETX(\v2 .ExampleMessage.MapScalar03EntryR\vmapScalar03\DC2C\n\
+    \\vmapScalar04\CAN\148\ETX \ETX(\v2 .ExampleMessage.MapScalar04EntryR\vmapScalar04\DC2C\n\
+    \\vmapScalar05\CAN\149\ETX \ETX(\v2 .ExampleMessage.MapScalar05EntryR\vmapScalar05\DC2C\n\
+    \\vmapScalar06\CAN\150\ETX \ETX(\v2 .ExampleMessage.MapScalar06EntryR\vmapScalar06\DC2C\n\
+    \\vmapScalar07\CAN\151\ETX \ETX(\v2 .ExampleMessage.MapScalar07EntryR\vmapScalar07\DC2C\n\
+    \\vmapScalar08\CAN\152\ETX \ETX(\v2 .ExampleMessage.MapScalar08EntryR\vmapScalar08\DC2C\n\
+    \\vmapScalar09\CAN\153\ETX \ETX(\v2 .ExampleMessage.MapScalar09EntryR\vmapScalar09\DC2C\n\
+    \\vmapScalar10\CAN\154\ETX \ETX(\v2 .ExampleMessage.MapScalar10EntryR\vmapScalar10\DC2C\n\
+    \\vmapScalar11\CAN\155\ETX \ETX(\v2 .ExampleMessage.MapScalar11EntryR\vmapScalar11\DC2C\n\
+    \\vmapScalar12\CAN\156\ETX \ETX(\v2 .ExampleMessage.MapScalar12EntryR\vmapScalar12\DC2C\n\
+    \\vmapScalar13\CAN\157\ETX \ETX(\v2 .ExampleMessage.MapScalar13EntryR\vmapScalar13\DC2C\n\
+    \\vmapScalar14\CAN\158\ETX \ETX(\v2 .ExampleMessage.MapScalar14EntryR\vmapScalar14\DC2C\n\
+    \\vmapScalar15\CAN\159\ETX \ETX(\v2 .ExampleMessage.MapScalar15EntryR\vmapScalar15\DC2@\n\
+    \\n\
+    \mapAnother\CAN\160\ETX \ETX(\v2\US.ExampleMessage.MapAnotherEntryR\n\
+    \mapAnother\DC2=\n\
+    \\tmapNested\CAN\161\ETX \ETX(\v2\RS.ExampleMessage.MapNestedEntryR\tmapNested\DC27\n\
+    \\amapEnum\CAN\162\ETX \ETX(\v2\FS.ExampleMessage.MapEnumEntryR\amapEnum\DC2'\n\
+    \\roneofScalar01\CAN\245\ETX \SOH(\SOHH\NULR\roneofScalar01\DC2'\n\
+    \\roneofScalar02\CAN\246\ETX \SOH(\STXH\NULR\roneofScalar02\DC2'\n\
+    \\roneofScalar03\CAN\247\ETX \SOH(\ENQH\NULR\roneofScalar03\DC2'\n\
+    \\roneofScalar04\CAN\248\ETX \SOH(\ETXH\NULR\roneofScalar04\DC2'\n\
+    \\roneofScalar05\CAN\249\ETX \SOH(\rH\NULR\roneofScalar05\DC2'\n\
+    \\roneofScalar06\CAN\250\ETX \SOH(\EOTH\NULR\roneofScalar06\DC2'\n\
+    \\roneofScalar07\CAN\251\ETX \SOH(\DC1H\NULR\roneofScalar07\DC2'\n\
+    \\roneofScalar08\CAN\252\ETX \SOH(\DC2H\NULR\roneofScalar08\DC2'\n\
+    \\roneofScalar09\CAN\253\ETX \SOH(\aH\NULR\roneofScalar09\DC2'\n\
+    \\roneofScalar10\CAN\254\ETX \SOH(\ACKH\NULR\roneofScalar10\DC2'\n\
+    \\roneofScalar11\CAN\255\ETX \SOH(\SIH\NULR\roneofScalar11\DC2'\n\
+    \\roneofScalar12\CAN\128\EOT \SOH(\DLEH\NULR\roneofScalar12\DC2'\n\
+    \\roneofScalar13\CAN\129\EOT \SOH(\bH\NULR\roneofScalar13\DC2'\n\
+    \\roneofScalar14\CAN\130\EOT \SOH(\tH\NULR\roneofScalar14\DC2'\n\
+    \\roneofScalar15\CAN\131\EOT \SOH(\fH\NULR\roneofScalar15\DC26\n\
+    \\foneofAnother\CAN\132\EOT \SOH(\v2\SI.AnotherMessageH\NULR\foneofAnother\DC2B\n\
+    \\voneofNested\CAN\133\EOT \SOH(\v2\GS.ExampleMessage.NestedMessageH\NULR\voneofNested\DC2-\n\
+    \\toneofEnum\CAN\134\EOT \SOH(\SO2\f.ExampleEnumH\NULR\toneofEnum\SUB\SI\n\
+    \\rNestedMessage\SUB>\n\
+    \\DLEMapScalar01Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\SOHR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar02Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\STXR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar03Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ENQR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar04Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ETXR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar05Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\rR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar06Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\EOTR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar07Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\DC1R\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar08Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\DC2R\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar09Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\aR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar10Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\ACKR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar11Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\SIR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar12Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\DLER\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar13Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\bR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar14Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH\SUB>\n\
+    \\DLEMapScalar15Entry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
+    \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue:\STX8\SOH\SUBN\n\
+    \\SIMapAnotherEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2%\n\
+    \\ENQvalue\CAN\STX \SOH(\v2\SI.AnotherMessageR\ENQvalue:\STX8\SOH\SUB[\n\
+    \\SOMapNestedEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC23\n\
+    \\ENQvalue\CAN\STX \SOH(\v2\GS.ExampleMessage.NestedMessageR\ENQvalue:\STX8\SOH\SUBH\n\
+    \\fMapEnumEntry\DC2\DLE\n\
+    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\"\n\
+    \\ENQvalue\CAN\STX \SOH(\SO2\f.ExampleEnumR\ENQvalue:\STX8\SOHB\SO\n\
+    \\fexampleOneOfB\DC3\n\
+    \\DC1_optionalScalar01B\DC3\n\
+    \\DC1_optionalScalar02B\DC3\n\
+    \\DC1_optionalScalar03B\DC3\n\
+    \\DC1_optionalScalar04B\DC3\n\
+    \\DC1_optionalScalar05B\DC3\n\
+    \\DC1_optionalScalar06B\DC3\n\
+    \\DC1_optionalScalar07B\DC3\n\
+    \\DC1_optionalScalar08B\DC3\n\
+    \\DC1_optionalScalar09B\DC3\n\
+    \\DC1_optionalScalar10B\DC3\n\
+    \\DC1_optionalScalar11B\DC3\n\
+    \\DC1_optionalScalar12B\DC3\n\
+    \\DC1_optionalScalar13B\DC3\n\
+    \\DC1_optionalScalar14B\DC3\n\
+    \\DC1_optionalScalar15B\DC2\n\
+    \\DLE_optionalAnotherB\DC1\n\
+    \\SI_optionalNestedB\SI\n\
+    \\r_optionalEnum\"\DLE\n\
+    \\SOAnotherMessage\"\a\n\
+    \\ENQEmpty*1\n\
+    \\vExampleEnum\DC2\n\
+    \\n\
+    \\ACKENUM_A\DLE\NUL\DC2\n\
+    \\n\
+    \\ACKENUM_B\DLE\SOH\DC2\n\
+    \\n\
+    \\ACKENUM_C\DLE\STX2\210\SOH\n\
+    \\SOExampleService\DC2(\n\
+    \\rAcceptAnother\DC2\SI.AnotherMessage\SUB\ACK.Empty\DC25\n\
+    \\fAcceptNested\DC2\GS.ExampleMessage.NestedMessage\SUB\ACK.Empty\DC2(\n\
+    \\rReturnAnother\DC2\ACK.Empty\SUB\SI.AnotherMessage\DC25\n\
+    \\fReturnNested\DC2\ACK.Empty\SUB\GS.ExampleMessage.NestedMessageJ\210\&7\n\
+    \\a\DC2\ENQ\NUL\NUL\152\SOH\SOH\n\
+    \\b\n\
+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
+    \\193\b\n\
+    \\STX\EOT\NUL\DC2\ENQ \NUL\132\SOH\SOH2\179\b\n\
+    \ Definition that exercises most of the spec.\n\
+    \\n\
+    \ Notes:\n\
+    \\n\
+    \ - We combine all field labels with all field types.\n\
+    \   https://protobuf.dev/programming-guides/proto3/#field-labels\n\
+    \   https://protobuf.dev/programming-guides/proto3/#scalar\n\
+    \\n\
+    \ - It is not possible to nest labels; we can't have a list of lists, a map\n\
+    \   of optional values, etc.\n\
+    \\n\
+    \ - Maps can only have (some) scalar types as keys. For our purposes it\n\
+    \   suffices to test with _one_ scalar type.\n\
+    \   https://protobuf.dev/programming-guides/proto3/#maps\n\
+    \\n\
+    \ - The spec says that `oneof` is allowed to contain optional fields, but\n\
+    \   `protoc` disagrees (\"Fields in oneofs must not have labels (required /\n\
+    \   optional / repeated)\"). It also disallows maps (\"Map fields are not allowed\n\
+    \   in oneofs\"), but that actually _is_ conform the spec, albeit a bit\n\
+    \   implicitly.\n\
+    \   https://protobuf.dev/programming-guides/proto3/#using-oneof\n\
+    \\n\
+    \ - Groups are deprecated; we don't test them.\n\
+    \   https://protobuf.dev/programming-guides/encoding/#groups\n\
+    \\n\
+    \ - Only message types can be used as rpc inputs or outputs; not scalars or\n\
+    \   enums.\n\
+    \\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX \b\SYN\n\
+    \\f\n\
+    \\EOT\EOT\NUL\ETX\NUL\DC2\EOT!\STX\"\ETX\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\ETX\NUL\SOH\DC2\ETX!\n\
+    \\ETB\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX$\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX$\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX$\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX$#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX%\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX%\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX%\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX%#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\STX\DC2\ETX&\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX&\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX&\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX&#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\ETX\DC2\ETX'\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX'\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX'\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX'#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\EOT\DC2\ETX(\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EOT\ENQ\DC2\ETX(\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EOT\SOH\DC2\ETX(\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EOT\ETX\DC2\ETX(#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\ENQ\DC2\ETX)\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ENQ\ENQ\DC2\ETX)\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ENQ\SOH\DC2\ETX)\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ENQ\ETX\DC2\ETX)#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\ACK\DC2\ETX*\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ACK\ENQ\DC2\ETX*\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ACK\SOH\DC2\ETX*\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ACK\ETX\DC2\ETX*#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\a\DC2\ETX+\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\a\ENQ\DC2\ETX+\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\a\SOH\DC2\ETX+\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\a\ETX\DC2\ETX+#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\b\DC2\ETX,\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\b\ENQ\DC2\ETX,\STX\t\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\b\SOH\DC2\ETX,\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\b\ETX\DC2\ETX,#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\t\DC2\ETX-\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\t\ENQ\DC2\ETX-\STX\t\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\t\SOH\DC2\ETX-\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\t\ETX\DC2\ETX-#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\n\
+    \\DC2\ETX.\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\n\
+    \\ENQ\DC2\ETX.\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\n\
+    \\SOH\DC2\ETX.\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\n\
+    \\ETX\DC2\ETX.#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\v\DC2\ETX/\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\v\ENQ\DC2\ETX/\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\v\SOH\DC2\ETX/\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\v\ETX\DC2\ETX/#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\f\DC2\ETX0\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\f\ENQ\DC2\ETX0\STX\ACK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\f\SOH\DC2\ETX0\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\f\ETX\DC2\ETX0#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\r\DC2\ETX1\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\r\ENQ\DC2\ETX1\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\r\SOH\DC2\ETX1\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\r\ETX\DC2\ETX1#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SO\DC2\ETX2\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SO\ENQ\DC2\ETX2\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SO\SOH\DC2\ETX2\DC1 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SO\ETX\DC2\ETX2#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SI\DC2\ETX3\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SI\ACK\DC2\ETX3\STX\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SI\SOH\DC2\ETX3\DC1\US\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SI\ETX\DC2\ETX3#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\DLE\DC2\ETX4\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DLE\ACK\DC2\ETX4\STX\SI\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DLE\SOH\DC2\ETX4\DC1\RS\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DLE\ETX\DC2\ETX4#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\DC1\DC2\ETX5\STX'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC1\ACK\DC2\ETX5\STX\r\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC1\SOH\DC2\ETX5\DC1\FS\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC1\ETX\DC2\ETX5#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\DC2\DC2\ETX7\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC2\EOT\DC2\ETX7\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC2\ENQ\DC2\ETX7\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC2\SOH\DC2\ETX7\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC2\ETX\DC2\ETX7-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\DC3\DC2\ETX8\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC3\EOT\DC2\ETX8\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC3\ENQ\DC2\ETX8\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC3\SOH\DC2\ETX8\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC3\ETX\DC2\ETX8-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\DC4\DC2\ETX9\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC4\EOT\DC2\ETX9\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC4\ENQ\DC2\ETX9\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC4\SOH\DC2\ETX9\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\DC4\ETX\DC2\ETX9-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NAK\DC2\ETX:\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NAK\EOT\DC2\ETX:\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NAK\ENQ\DC2\ETX:\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NAK\SOH\DC2\ETX:\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NAK\ETX\DC2\ETX:-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SYN\DC2\ETX;\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SYN\EOT\DC2\ETX;\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SYN\ENQ\DC2\ETX;\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SYN\SOH\DC2\ETX;\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SYN\ETX\DC2\ETX;-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\ETB\DC2\ETX<\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETB\EOT\DC2\ETX<\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETB\ENQ\DC2\ETX<\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETB\SOH\DC2\ETX<\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ETB\ETX\DC2\ETX<-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\CAN\DC2\ETX=\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\CAN\EOT\DC2\ETX=\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\CAN\ENQ\DC2\ETX=\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\CAN\SOH\DC2\ETX=\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\CAN\ETX\DC2\ETX=-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\EM\DC2\ETX>\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EM\EOT\DC2\ETX>\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EM\ENQ\DC2\ETX>\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EM\SOH\DC2\ETX>\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\EM\ETX\DC2\ETX>-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SUB\DC2\ETX?\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SUB\EOT\DC2\ETX?\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SUB\ENQ\DC2\ETX?\v\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SUB\SOH\DC2\ETX?\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SUB\ETX\DC2\ETX?-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\ESC\DC2\ETX@\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ESC\EOT\DC2\ETX@\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ESC\ENQ\DC2\ETX@\v\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ESC\SOH\DC2\ETX@\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\ESC\ETX\DC2\ETX@-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\FS\DC2\ETXA\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\FS\EOT\DC2\ETXA\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\FS\ENQ\DC2\ETXA\v\DC3\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\FS\SOH\DC2\ETXA\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\FS\ETX\DC2\ETXA-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\GS\DC2\ETXB\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\GS\EOT\DC2\ETXB\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\GS\ENQ\DC2\ETXB\v\DC3\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\GS\SOH\DC2\ETXB\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\GS\ETX\DC2\ETXB-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\RS\DC2\ETXC\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\RS\EOT\DC2\ETXC\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\RS\ENQ\DC2\ETXC\v\SI\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\RS\SOH\DC2\ETXC\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\RS\ETX\DC2\ETXC-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\US\DC2\ETXD\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\US\EOT\DC2\ETXD\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\US\ENQ\DC2\ETXD\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\US\SOH\DC2\ETXD\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\US\ETX\DC2\ETXD-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX \DC2\ETXE\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX \EOT\DC2\ETXE\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX \ENQ\DC2\ETXE\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX \SOH\DC2\ETXE\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX \ETX\DC2\ETXE-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX!\DC2\ETXF\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX!\EOT\DC2\ETXF\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX!\ACK\DC2\ETXF\v\EM\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX!\SOH\DC2\ETXF\SUB)\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX!\ETX\DC2\ETXF-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\"\DC2\ETXG\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\"\EOT\DC2\ETXG\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\"\ACK\DC2\ETXG\v\CAN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\"\SOH\DC2\ETXG\SUB(\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\"\ETX\DC2\ETXG-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX#\DC2\ETXH\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX#\EOT\DC2\ETXH\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX#\ACK\DC2\ETXH\v\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX#\SOH\DC2\ETXH\SUB&\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX#\ETX\DC2\ETXH-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX$\DC2\ETXJ\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX$\EOT\DC2\ETXJ\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX$\ENQ\DC2\ETXJ\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX$\SOH\DC2\ETXJ\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX$\ETX\DC2\ETXJ-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX%\DC2\ETXK\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX%\EOT\DC2\ETXK\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX%\ENQ\DC2\ETXK\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX%\SOH\DC2\ETXK\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX%\ETX\DC2\ETXK-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX&\DC2\ETXL\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX&\EOT\DC2\ETXL\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX&\ENQ\DC2\ETXL\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX&\SOH\DC2\ETXL\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX&\ETX\DC2\ETXL-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX'\DC2\ETXM\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX'\EOT\DC2\ETXM\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX'\ENQ\DC2\ETXM\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX'\SOH\DC2\ETXM\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX'\ETX\DC2\ETXM-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX(\DC2\ETXN\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX(\EOT\DC2\ETXN\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX(\ENQ\DC2\ETXN\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX(\SOH\DC2\ETXN\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX(\ETX\DC2\ETXN-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX)\DC2\ETXO\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX)\EOT\DC2\ETXO\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX)\ENQ\DC2\ETXO\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX)\SOH\DC2\ETXO\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX)\ETX\DC2\ETXO-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX*\DC2\ETXP\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX*\EOT\DC2\ETXP\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX*\ENQ\DC2\ETXP\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX*\SOH\DC2\ETXP\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX*\ETX\DC2\ETXP-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX+\DC2\ETXQ\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX+\EOT\DC2\ETXQ\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX+\ENQ\DC2\ETXQ\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX+\SOH\DC2\ETXQ\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX+\ETX\DC2\ETXQ-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX,\DC2\ETXR\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX,\EOT\DC2\ETXR\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX,\ENQ\DC2\ETXR\v\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX,\SOH\DC2\ETXR\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX,\ETX\DC2\ETXR-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX-\DC2\ETXS\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX-\EOT\DC2\ETXS\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX-\ENQ\DC2\ETXS\v\DC2\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX-\SOH\DC2\ETXS\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX-\ETX\DC2\ETXS-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX.\DC2\ETXT\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX.\EOT\DC2\ETXT\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX.\ENQ\DC2\ETXT\v\DC3\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX.\SOH\DC2\ETXT\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX.\ETX\DC2\ETXT-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX/\DC2\ETXU\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX/\EOT\DC2\ETXU\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX/\ENQ\DC2\ETXU\v\DC3\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX/\SOH\DC2\ETXU\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX/\ETX\DC2\ETXU-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX0\DC2\ETXV\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX0\EOT\DC2\ETXV\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX0\ENQ\DC2\ETXV\v\SI\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX0\SOH\DC2\ETXV\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX0\ETX\DC2\ETXV-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX1\DC2\ETXW\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX1\EOT\DC2\ETXW\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX1\ENQ\DC2\ETXW\v\DC1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX1\SOH\DC2\ETXW\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX1\ETX\DC2\ETXW-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX2\DC2\ETXX\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX2\EOT\DC2\ETXX\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX2\ENQ\DC2\ETXX\v\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX2\SOH\DC2\ETXX\SUB*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX2\ETX\DC2\ETXX-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX3\DC2\ETXY\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX3\EOT\DC2\ETXY\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX3\ACK\DC2\ETXY\v\EM\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX3\SOH\DC2\ETXY\SUB)\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX3\ETX\DC2\ETXY-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX4\DC2\ETXZ\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX4\EOT\DC2\ETXZ\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX4\ACK\DC2\ETXZ\v\CAN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX4\SOH\DC2\ETXZ\SUB(\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX4\ETX\DC2\ETXZ-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX5\DC2\ETX[\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX5\EOT\DC2\ETX[\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX5\ACK\DC2\ETX[\v\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX5\SOH\DC2\ETX[\SUB&\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX5\ETX\DC2\ETX[-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX6\DC2\ETX]\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX6\ACK\DC2\ETX]\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX6\SOH\DC2\ETX]\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX6\ETX\DC2\ETX]-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX7\DC2\ETX^\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX7\ACK\DC2\ETX^\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX7\SOH\DC2\ETX^\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX7\ETX\DC2\ETX^-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX8\DC2\ETX_\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX8\ACK\DC2\ETX_\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX8\SOH\DC2\ETX_\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX8\ETX\DC2\ETX_-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX9\DC2\ETX`\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX9\ACK\DC2\ETX`\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX9\SOH\DC2\ETX`\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX9\ETX\DC2\ETX`-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX:\DC2\ETXa\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX:\ACK\DC2\ETXa\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX:\SOH\DC2\ETXa\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX:\ETX\DC2\ETXa-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX;\DC2\ETXb\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX;\ACK\DC2\ETXb\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX;\SOH\DC2\ETXb\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX;\ETX\DC2\ETXb-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX<\DC2\ETXc\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX<\ACK\DC2\ETXc\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX<\SOH\DC2\ETXc\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX<\ETX\DC2\ETXc-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX=\DC2\ETXd\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX=\ACK\DC2\ETXd\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX=\SOH\DC2\ETXd\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX=\ETX\DC2\ETXd-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX>\DC2\ETXe\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX>\ACK\DC2\ETXe\STX\ETB\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX>\SOH\DC2\ETXe\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX>\ETX\DC2\ETXe-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX?\DC2\ETXf\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX?\ACK\DC2\ETXf\STX\ETB\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX?\SOH\DC2\ETXf\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX?\ETX\DC2\ETXf-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX@\DC2\ETXg\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX@\ACK\DC2\ETXg\STX\CAN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX@\SOH\DC2\ETXg\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX@\ETX\DC2\ETXg-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXA\DC2\ETXh\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXA\ACK\DC2\ETXh\STX\CAN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXA\SOH\DC2\ETXh\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXA\ETX\DC2\ETXh-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXB\DC2\ETXi\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXB\ACK\DC2\ETXi\STX\DC4\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXB\SOH\DC2\ETXi\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXB\ETX\DC2\ETXi-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXC\DC2\ETXj\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXC\ACK\DC2\ETXj\STX\SYN\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXC\SOH\DC2\ETXj\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXC\ETX\DC2\ETXj-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXD\DC2\ETXk\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXD\ACK\DC2\ETXk\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXD\SOH\DC2\ETXk\US*\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXD\ETX\DC2\ETXk-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXE\DC2\ETXl\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXE\ACK\DC2\ETXl\STX\RS\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXE\SOH\DC2\ETXl\US)\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXE\ETX\DC2\ETXl-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXF\DC2\ETXm\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXF\ACK\DC2\ETXm\STX\GS\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXF\SOH\DC2\ETXm\US(\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXF\ETX\DC2\ETXm-0\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXG\DC2\ETXn\STX1\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXG\ACK\DC2\ETXn\STX\ESC\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXG\SOH\DC2\ETXn\US&\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXG\ETX\DC2\ETXn-0\n\
+    \\r\n\
+    \\EOT\EOT\NUL\b\NUL\DC2\ENQp\STX\131\SOH\ETX\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\b\NUL\SOH\DC2\ETXp\b\DC4\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXH\DC2\ETXq\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXH\ENQ\DC2\ETXq\EOT\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXH\SOH\DC2\ETXq\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXH\ETX\DC2\ETXq#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXI\DC2\ETXr\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXI\ENQ\DC2\ETXr\EOT\t\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXI\SOH\DC2\ETXr\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXI\ETX\DC2\ETXr#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXJ\DC2\ETXs\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXJ\ENQ\DC2\ETXs\EOT\t\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXJ\SOH\DC2\ETXs\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXJ\ETX\DC2\ETXs#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXK\DC2\ETXt\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXK\ENQ\DC2\ETXt\EOT\t\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXK\SOH\DC2\ETXt\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXK\ETX\DC2\ETXt#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXL\DC2\ETXu\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXL\ENQ\DC2\ETXu\EOT\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXL\SOH\DC2\ETXu\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXL\ETX\DC2\ETXu#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXM\DC2\ETXv\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXM\ENQ\DC2\ETXv\EOT\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXM\SOH\DC2\ETXv\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXM\ETX\DC2\ETXv#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXN\DC2\ETXw\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXN\ENQ\DC2\ETXw\EOT\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXN\SOH\DC2\ETXw\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXN\ETX\DC2\ETXw#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXO\DC2\ETXx\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXO\ENQ\DC2\ETXx\EOT\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXO\SOH\DC2\ETXx\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXO\ETX\DC2\ETXx#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXP\DC2\ETXy\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXP\ENQ\DC2\ETXy\EOT\v\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXP\SOH\DC2\ETXy\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXP\ETX\DC2\ETXy#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXQ\DC2\ETXz\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXQ\ENQ\DC2\ETXz\EOT\v\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXQ\SOH\DC2\ETXz\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXQ\ETX\DC2\ETXz#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXR\DC2\ETX{\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXR\ENQ\DC2\ETX{\EOT\f\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXR\SOH\DC2\ETX{\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXR\ETX\DC2\ETX{#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXS\DC2\ETX|\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXS\ENQ\DC2\ETX|\EOT\f\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXS\SOH\DC2\ETX|\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXS\ETX\DC2\ETX|#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXT\DC2\ETX}\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXT\ENQ\DC2\ETX}\EOT\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXT\SOH\DC2\ETX}\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXT\ETX\DC2\ETX}#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXU\DC2\ETX~\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXU\ENQ\DC2\ETX~\EOT\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXU\SOH\DC2\ETX~\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXU\ETX\DC2\ETX~#&\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STXV\DC2\ETX\DEL\EOT'\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXV\ENQ\DC2\ETX\DEL\EOT\t\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXV\SOH\DC2\ETX\DEL\DC3 \n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STXV\ETX\DC2\ETX\DEL#&\n\
+    \\f\n\
+    \\EOT\EOT\NUL\STXW\DC2\EOT\128\SOH\EOT'\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXW\ACK\DC2\EOT\128\SOH\EOT\DC2\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXW\SOH\DC2\EOT\128\SOH\DC3\US\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXW\ETX\DC2\EOT\128\SOH#&\n\
+    \\f\n\
+    \\EOT\EOT\NUL\STXX\DC2\EOT\129\SOH\EOT'\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXX\ACK\DC2\EOT\129\SOH\EOT\DC1\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXX\SOH\DC2\EOT\129\SOH\DC3\RS\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXX\ETX\DC2\EOT\129\SOH#&\n\
+    \\f\n\
+    \\EOT\EOT\NUL\STXY\DC2\EOT\130\SOH\EOT'\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXY\ACK\DC2\EOT\130\SOH\EOT\SI\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXY\SOH\DC2\EOT\130\SOH\DC3\FS\n\
+    \\r\n\
+    \\ENQ\EOT\NUL\STXY\ETX\DC2\EOT\130\SOH#&\n\
+    \\f\n\
+    \\STX\ENQ\NUL\DC2\ACK\134\SOH\NUL\138\SOH\SOH\n\
+    \\v\n\
+    \\ETX\ENQ\NUL\SOH\DC2\EOT\134\SOH\ENQ\DLE\n\
+    \\f\n\
+    \\EOT\ENQ\NUL\STX\NUL\DC2\EOT\135\SOH\STX\r\n\
+    \\r\n\
+    \\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\EOT\135\SOH\STX\b\n\
+    \\r\n\
+    \\ENQ\ENQ\NUL\STX\NUL\STX\DC2\EOT\135\SOH\v\f\n\
+    \\f\n\
+    \\EOT\ENQ\NUL\STX\SOH\DC2\EOT\136\SOH\STX\r\n\
+    \\r\n\
+    \\ENQ\ENQ\NUL\STX\SOH\SOH\DC2\EOT\136\SOH\STX\b\n\
+    \\r\n\
+    \\ENQ\ENQ\NUL\STX\SOH\STX\DC2\EOT\136\SOH\v\f\n\
+    \\f\n\
+    \\EOT\ENQ\NUL\STX\STX\DC2\EOT\137\SOH\STX\r\n\
+    \\r\n\
+    \\ENQ\ENQ\NUL\STX\STX\SOH\DC2\EOT\137\SOH\STX\b\n\
+    \\r\n\
+    \\ENQ\ENQ\NUL\STX\STX\STX\DC2\EOT\137\SOH\v\f\n\
+    \\f\n\
+    \\STX\EOT\SOH\DC2\ACK\140\SOH\NUL\141\SOH\SOH\n\
+    \\v\n\
+    \\ETX\EOT\SOH\SOH\DC2\EOT\140\SOH\b\SYN\n\
+    \\f\n\
+    \\STX\ACK\NUL\DC2\ACK\143\SOH\NUL\149\SOH\SOH\n\
+    \\v\n\
+    \\ETX\ACK\NUL\SOH\DC2\EOT\143\SOH\b\SYN\n\
+    \\f\n\
+    \\EOT\ACK\NUL\STX\NUL\DC2\EOT\144\SOH\STX4\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\EOT\144\SOH\ACK\DC3\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\EOT\144\SOH\DC4\"\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\EOT\144\SOH-2\n\
+    \\f\n\
+    \\EOT\ACK\NUL\STX\SOH\DC2\EOT\145\SOH\STXA\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\SOH\SOH\DC2\EOT\145\SOH\ACK\DC2\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\SOH\STX\DC2\EOT\145\SOH\DC3/\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\SOH\ETX\DC2\EOT\145\SOH:?\n\
+    \\f\n\
+    \\EOT\ACK\NUL\STX\STX\DC2\EOT\147\SOH\STX4\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\STX\SOH\DC2\EOT\147\SOH\ACK\DC3\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\STX\STX\DC2\EOT\147\SOH\DC4\EM\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\STX\ETX\DC2\EOT\147\SOH$2\n\
+    \\f\n\
+    \\EOT\ACK\NUL\STX\ETX\DC2\EOT\148\SOH\STXA\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\ETX\SOH\DC2\EOT\148\SOH\ACK\DC2\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\ETX\STX\DC2\EOT\148\SOH\DC3\CAN\n\
+    \\r\n\
+    \\ENQ\ACK\NUL\STX\ETX\ETX\DC2\EOT\148\SOH#?\n\
+    \\f\n\
+    \\STX\EOT\STX\DC2\ACK\151\SOH\NUL\152\SOH\SOH\n\
+    \\v\n\
+    \\ETX\EOT\STX\SOH\DC2\EOT\151\SOH\b\rb\ACKproto3"
diff --git a/proto/Proto/Test.hs b/proto/Proto/Test.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/Test.hs
@@ -0,0 +1,228 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from test.proto by the proto-lens-protoc program. -}
+{-# 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.Test (
+        TestService(..), UnimplementedService(..), ReconnectService(..),
+        LoadBalancerStatsService(..), HookService(..),
+        XdsUpdateHealthService(..), XdsUpdateClientConfigureService(..)
+    ) 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
+import qualified Proto.Empty
+import qualified Proto.Messages
+data TestService = TestService {}
+instance Data.ProtoLens.Service.Types.Service TestService where
+  type ServiceName TestService = "TestService"
+  type ServicePackage TestService = "grpc.testing"
+  type ServiceMethods TestService = '["cacheableUnaryCall",
+                                      "emptyCall",
+                                      "fullDuplexCall",
+                                      "halfDuplexCall",
+                                      "streamingInputCall",
+                                      "streamingOutputCall",
+                                      "unaryCall",
+                                      "unimplementedCall"]
+  packedServiceDescriptor _
+    = "\n\
+      \\vTestService\DC25\n\
+      \\tEmptyCall\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty\DC2F\n\
+      \\tUnaryCall\DC2\ESC.grpc.testing.SimpleRequest\SUB\FS.grpc.testing.SimpleResponse\DC2O\n\
+      \\DC2CacheableUnaryCall\DC2\ESC.grpc.testing.SimpleRequest\SUB\FS.grpc.testing.SimpleResponse\DC2l\n\
+      \\DC3StreamingOutputCall\DC2(.grpc.testing.StreamingOutputCallRequest\SUB).grpc.testing.StreamingOutputCallResponse0\SOH\DC2i\n\
+      \\DC2StreamingInputCall\DC2'.grpc.testing.StreamingInputCallRequest\SUB(.grpc.testing.StreamingInputCallResponse(\SOH\DC2i\n\
+      \\SOFullDuplexCall\DC2(.grpc.testing.StreamingOutputCallRequest\SUB).grpc.testing.StreamingOutputCallResponse(\SOH0\SOH\DC2i\n\
+      \\SO\&HalfDuplexCall\DC2(.grpc.testing.StreamingOutputCallRequest\SUB).grpc.testing.StreamingOutputCallResponse(\SOH0\SOH\DC2=\n\
+      \\DC1UnimplementedCall\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty"
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "emptyCall" where
+  type MethodName TestService "emptyCall" = "EmptyCall"
+  type MethodInput TestService "emptyCall" = Proto.Empty.Empty
+  type MethodOutput TestService "emptyCall" = Proto.Empty.Empty
+  type MethodStreamingType TestService "emptyCall" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "unaryCall" where
+  type MethodName TestService "unaryCall" = "UnaryCall"
+  type MethodInput TestService "unaryCall" = Proto.Messages.SimpleRequest
+  type MethodOutput TestService "unaryCall" = Proto.Messages.SimpleResponse
+  type MethodStreamingType TestService "unaryCall" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "cacheableUnaryCall" where
+  type MethodName TestService "cacheableUnaryCall" = "CacheableUnaryCall"
+  type MethodInput TestService "cacheableUnaryCall" = Proto.Messages.SimpleRequest
+  type MethodOutput TestService "cacheableUnaryCall" = Proto.Messages.SimpleResponse
+  type MethodStreamingType TestService "cacheableUnaryCall" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "streamingOutputCall" where
+  type MethodName TestService "streamingOutputCall" = "StreamingOutputCall"
+  type MethodInput TestService "streamingOutputCall" = Proto.Messages.StreamingOutputCallRequest
+  type MethodOutput TestService "streamingOutputCall" = Proto.Messages.StreamingOutputCallResponse
+  type MethodStreamingType TestService "streamingOutputCall" = 'Data.ProtoLens.Service.Types.ServerStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "streamingInputCall" where
+  type MethodName TestService "streamingInputCall" = "StreamingInputCall"
+  type MethodInput TestService "streamingInputCall" = Proto.Messages.StreamingInputCallRequest
+  type MethodOutput TestService "streamingInputCall" = Proto.Messages.StreamingInputCallResponse
+  type MethodStreamingType TestService "streamingInputCall" = 'Data.ProtoLens.Service.Types.ClientStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "fullDuplexCall" where
+  type MethodName TestService "fullDuplexCall" = "FullDuplexCall"
+  type MethodInput TestService "fullDuplexCall" = Proto.Messages.StreamingOutputCallRequest
+  type MethodOutput TestService "fullDuplexCall" = Proto.Messages.StreamingOutputCallResponse
+  type MethodStreamingType TestService "fullDuplexCall" = 'Data.ProtoLens.Service.Types.BiDiStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "halfDuplexCall" where
+  type MethodName TestService "halfDuplexCall" = "HalfDuplexCall"
+  type MethodInput TestService "halfDuplexCall" = Proto.Messages.StreamingOutputCallRequest
+  type MethodOutput TestService "halfDuplexCall" = Proto.Messages.StreamingOutputCallResponse
+  type MethodStreamingType TestService "halfDuplexCall" = 'Data.ProtoLens.Service.Types.BiDiStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestService "unimplementedCall" where
+  type MethodName TestService "unimplementedCall" = "UnimplementedCall"
+  type MethodInput TestService "unimplementedCall" = Proto.Empty.Empty
+  type MethodOutput TestService "unimplementedCall" = Proto.Empty.Empty
+  type MethodStreamingType TestService "unimplementedCall" = 'Data.ProtoLens.Service.Types.NonStreaming
+data UnimplementedService = UnimplementedService {}
+instance Data.ProtoLens.Service.Types.Service UnimplementedService where
+  type ServiceName UnimplementedService = "UnimplementedService"
+  type ServicePackage UnimplementedService = "grpc.testing"
+  type ServiceMethods UnimplementedService = '["unimplementedCall"]
+  packedServiceDescriptor _
+    = "\n\
+      \\DC4UnimplementedService\DC2=\n\
+      \\DC1UnimplementedCall\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty"
+instance Data.ProtoLens.Service.Types.HasMethodImpl UnimplementedService "unimplementedCall" where
+  type MethodName UnimplementedService "unimplementedCall" = "UnimplementedCall"
+  type MethodInput UnimplementedService "unimplementedCall" = Proto.Empty.Empty
+  type MethodOutput UnimplementedService "unimplementedCall" = Proto.Empty.Empty
+  type MethodStreamingType UnimplementedService "unimplementedCall" = 'Data.ProtoLens.Service.Types.NonStreaming
+data ReconnectService = ReconnectService {}
+instance Data.ProtoLens.Service.Types.Service ReconnectService where
+  type ServiceName ReconnectService = "ReconnectService"
+  type ServicePackage ReconnectService = "grpc.testing"
+  type ServiceMethods ReconnectService = '["start", "stop"]
+  packedServiceDescriptor _
+    = "\n\
+      \\DLEReconnectService\DC2;\n\
+      \\ENQStart\DC2\GS.grpc.testing.ReconnectParams\SUB\DC3.grpc.testing.Empty\DC28\n\
+      \\EOTStop\DC2\DC3.grpc.testing.Empty\SUB\ESC.grpc.testing.ReconnectInfo"
+instance Data.ProtoLens.Service.Types.HasMethodImpl ReconnectService "start" where
+  type MethodName ReconnectService "start" = "Start"
+  type MethodInput ReconnectService "start" = Proto.Messages.ReconnectParams
+  type MethodOutput ReconnectService "start" = Proto.Empty.Empty
+  type MethodStreamingType ReconnectService "start" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl ReconnectService "stop" where
+  type MethodName ReconnectService "stop" = "Stop"
+  type MethodInput ReconnectService "stop" = Proto.Empty.Empty
+  type MethodOutput ReconnectService "stop" = Proto.Messages.ReconnectInfo
+  type MethodStreamingType ReconnectService "stop" = 'Data.ProtoLens.Service.Types.NonStreaming
+data LoadBalancerStatsService = LoadBalancerStatsService {}
+instance Data.ProtoLens.Service.Types.Service LoadBalancerStatsService where
+  type ServiceName LoadBalancerStatsService = "LoadBalancerStatsService"
+  type ServicePackage LoadBalancerStatsService = "grpc.testing"
+  type ServiceMethods LoadBalancerStatsService = '["getClientAccumulatedStats",
+                                                   "getClientStats"]
+  packedServiceDescriptor _
+    = "\n\
+      \\CANLoadBalancerStatsService\DC2c\n\
+      \\SOGetClientStats\DC2&.grpc.testing.LoadBalancerStatsRequest\SUB'.grpc.testing.LoadBalancerStatsResponse\"\NUL\DC2\132\SOH\n\
+      \\EMGetClientAccumulatedStats\DC21.grpc.testing.LoadBalancerAccumulatedStatsRequest\SUB2.grpc.testing.LoadBalancerAccumulatedStatsResponse\"\NUL"
+instance Data.ProtoLens.Service.Types.HasMethodImpl LoadBalancerStatsService "getClientStats" where
+  type MethodName LoadBalancerStatsService "getClientStats" = "GetClientStats"
+  type MethodInput LoadBalancerStatsService "getClientStats" = Proto.Messages.LoadBalancerStatsRequest
+  type MethodOutput LoadBalancerStatsService "getClientStats" = Proto.Messages.LoadBalancerStatsResponse
+  type MethodStreamingType LoadBalancerStatsService "getClientStats" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl LoadBalancerStatsService "getClientAccumulatedStats" where
+  type MethodName LoadBalancerStatsService "getClientAccumulatedStats" = "GetClientAccumulatedStats"
+  type MethodInput LoadBalancerStatsService "getClientAccumulatedStats" = Proto.Messages.LoadBalancerAccumulatedStatsRequest
+  type MethodOutput LoadBalancerStatsService "getClientAccumulatedStats" = Proto.Messages.LoadBalancerAccumulatedStatsResponse
+  type MethodStreamingType LoadBalancerStatsService "getClientAccumulatedStats" = 'Data.ProtoLens.Service.Types.NonStreaming
+data HookService = HookService {}
+instance Data.ProtoLens.Service.Types.Service HookService where
+  type ServiceName HookService = "HookService"
+  type ServicePackage HookService = "grpc.testing"
+  type ServiceMethods HookService = '["clearReturnStatus",
+                                      "hook",
+                                      "setReturnStatus"]
+  packedServiceDescriptor _
+    = "\n\
+      \\vHookService\DC20\n\
+      \\EOTHook\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty\DC2L\n\
+      \\SISetReturnStatus\DC2$.grpc.testing.SetReturnStatusRequest\SUB\DC3.grpc.testing.Empty\DC2=\n\
+      \\DC1ClearReturnStatus\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty"
+instance Data.ProtoLens.Service.Types.HasMethodImpl HookService "hook" where
+  type MethodName HookService "hook" = "Hook"
+  type MethodInput HookService "hook" = Proto.Empty.Empty
+  type MethodOutput HookService "hook" = Proto.Empty.Empty
+  type MethodStreamingType HookService "hook" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl HookService "setReturnStatus" where
+  type MethodName HookService "setReturnStatus" = "SetReturnStatus"
+  type MethodInput HookService "setReturnStatus" = Proto.Messages.SetReturnStatusRequest
+  type MethodOutput HookService "setReturnStatus" = Proto.Empty.Empty
+  type MethodStreamingType HookService "setReturnStatus" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl HookService "clearReturnStatus" where
+  type MethodName HookService "clearReturnStatus" = "ClearReturnStatus"
+  type MethodInput HookService "clearReturnStatus" = Proto.Empty.Empty
+  type MethodOutput HookService "clearReturnStatus" = Proto.Empty.Empty
+  type MethodStreamingType HookService "clearReturnStatus" = 'Data.ProtoLens.Service.Types.NonStreaming
+data XdsUpdateHealthService = XdsUpdateHealthService {}
+instance Data.ProtoLens.Service.Types.Service XdsUpdateHealthService where
+  type ServiceName XdsUpdateHealthService = "XdsUpdateHealthService"
+  type ServicePackage XdsUpdateHealthService = "grpc.testing"
+  type ServiceMethods XdsUpdateHealthService = '["sendHookRequest",
+                                                 "setNotServing",
+                                                 "setServing"]
+  packedServiceDescriptor _
+    = "\n\
+      \\SYNXdsUpdateHealthService\DC26\n\
+      \\n\
+      \SetServing\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty\DC29\n\
+      \\rSetNotServing\DC2\DC3.grpc.testing.Empty\SUB\DC3.grpc.testing.Empty\DC2H\n\
+      \\SISendHookRequest\DC2\EM.grpc.testing.HookRequest\SUB\SUB.grpc.testing.HookResponse"
+instance Data.ProtoLens.Service.Types.HasMethodImpl XdsUpdateHealthService "setServing" where
+  type MethodName XdsUpdateHealthService "setServing" = "SetServing"
+  type MethodInput XdsUpdateHealthService "setServing" = Proto.Empty.Empty
+  type MethodOutput XdsUpdateHealthService "setServing" = Proto.Empty.Empty
+  type MethodStreamingType XdsUpdateHealthService "setServing" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl XdsUpdateHealthService "setNotServing" where
+  type MethodName XdsUpdateHealthService "setNotServing" = "SetNotServing"
+  type MethodInput XdsUpdateHealthService "setNotServing" = Proto.Empty.Empty
+  type MethodOutput XdsUpdateHealthService "setNotServing" = Proto.Empty.Empty
+  type MethodStreamingType XdsUpdateHealthService "setNotServing" = 'Data.ProtoLens.Service.Types.NonStreaming
+instance Data.ProtoLens.Service.Types.HasMethodImpl XdsUpdateHealthService "sendHookRequest" where
+  type MethodName XdsUpdateHealthService "sendHookRequest" = "SendHookRequest"
+  type MethodInput XdsUpdateHealthService "sendHookRequest" = Proto.Messages.HookRequest
+  type MethodOutput XdsUpdateHealthService "sendHookRequest" = Proto.Messages.HookResponse
+  type MethodStreamingType XdsUpdateHealthService "sendHookRequest" = 'Data.ProtoLens.Service.Types.NonStreaming
+data XdsUpdateClientConfigureService
+  = XdsUpdateClientConfigureService {}
+instance Data.ProtoLens.Service.Types.Service XdsUpdateClientConfigureService where
+  type ServiceName XdsUpdateClientConfigureService = "XdsUpdateClientConfigureService"
+  type ServicePackage XdsUpdateClientConfigureService = "grpc.testing"
+  type ServiceMethods XdsUpdateClientConfigureService = '["configure"]
+  packedServiceDescriptor _
+    = "\n\
+      \\USXdsUpdateClientConfigureService\DC2X\n\
+      \\tConfigure\DC2$.grpc.testing.ClientConfigureRequest\SUB%.grpc.testing.ClientConfigureResponse"
+instance Data.ProtoLens.Service.Types.HasMethodImpl XdsUpdateClientConfigureService "configure" where
+  type MethodName XdsUpdateClientConfigureService "configure" = "Configure"
+  type MethodInput XdsUpdateClientConfigureService "configure" = Proto.Messages.ClientConfigureRequest
+  type MethodOutput XdsUpdateClientConfigureService "configure" = Proto.Messages.ClientConfigureResponse
+  type MethodStreamingType XdsUpdateClientConfigureService "configure" = 'Data.ProtoLens.Service.Types.NonStreaming
diff --git a/proto/Proto/TestAny.hs b/proto/Proto/TestAny.hs
new file mode 100644
--- /dev/null
+++ b/proto/Proto/TestAny.hs
@@ -0,0 +1,512 @@
+{-# OPTIONS_GHC -Wno-prepositive-qualified-module -Wno-identities #-}
+{- This file was auto-generated from test-any.proto by the proto-lens-protoc program. -}
+{-# 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.TestAny (
+        TestAnyService(..), A(), B(), TestAnyMsg()
+    ) 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
+import qualified Proto.Google.Protobuf.Any
+{- | Fields :
+     
+         * 'Proto.TestAny_Fields.a' @:: Lens' A Data.Int.Int32@ -}
+data A
+  = A'_constructor {_A'a :: !Data.Int.Int32,
+                    _A'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show A where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField A "a" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens _A'a (\ x__ y__ -> x__ {_A'a = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message A where
+  messageName _ = Data.Text.pack "A"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOHA\DC2\f\n\
+      \\SOHa\CAN\SOH \SOH(\ENQR\SOHa"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        a__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "a"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"a")) ::
+              Data.ProtoLens.FieldDescriptor A
+      in Data.Map.fromList [(Data.ProtoLens.Tag 1, a__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _A'_unknownFields (\ x__ y__ -> x__ {_A'_unknownFields = y__})
+  defMessage
+    = A'_constructor
+        {_A'a = Data.ProtoLens.fieldDefault, _A'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: A -> Data.ProtoLens.Encoding.Bytes.Parser A
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "a"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"a") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "A"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"a") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData A where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_A'_unknownFields x__) (Control.DeepSeq.deepseq (_A'a x__) ())
+{- | Fields :
+     
+         * 'Proto.TestAny_Fields.b' @:: Lens' B Data.Int.Int32@ -}
+data B
+  = B'_constructor {_B'b :: !Data.Int.Int32,
+                    _B'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show B where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField B "b" Data.Int.Int32 where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens _B'b (\ x__ y__ -> x__ {_B'b = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message B where
+  messageName _ = Data.Text.pack "B"
+  packedMessageDescriptor _
+    = "\n\
+      \\SOHB\DC2\f\n\
+      \\SOHb\CAN\SOH \SOH(\ENQR\SOHb"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        b__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "b"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"b")) ::
+              Data.ProtoLens.FieldDescriptor B
+      in Data.Map.fromList [(Data.ProtoLens.Tag 1, b__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _B'_unknownFields (\ x__ y__ -> x__ {_B'_unknownFields = y__})
+  defMessage
+    = B'_constructor
+        {_B'b = Data.ProtoLens.fieldDefault, _B'_unknownFields = []}
+  parseMessage
+    = let
+        loop :: B -> Data.ProtoLens.Encoding.Bytes.Parser B
+        loop x
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (Prelude.fmap
+                                          Prelude.fromIntegral
+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
+                                       "b"
+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"b") y x)
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do loop Data.ProtoLens.defMessage) "B"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"b") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
+                      ((Prelude..)
+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
+             (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
+instance Control.DeepSeq.NFData B where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_B'_unknownFields x__) (Control.DeepSeq.deepseq (_B'b x__) ())
+{- | Fields :
+     
+         * 'Proto.TestAny_Fields.message' @:: Lens' TestAnyMsg Data.Text.Text@
+         * 'Proto.TestAny_Fields.details' @:: Lens' TestAnyMsg [Proto.Google.Protobuf.Any.Any]@
+         * 'Proto.TestAny_Fields.vec'details' @:: Lens' TestAnyMsg (Data.Vector.Vector Proto.Google.Protobuf.Any.Any)@ -}
+data TestAnyMsg
+  = TestAnyMsg'_constructor {_TestAnyMsg'message :: !Data.Text.Text,
+                             _TestAnyMsg'details :: !(Data.Vector.Vector Proto.Google.Protobuf.Any.Any),
+                             _TestAnyMsg'_unknownFields :: !Data.ProtoLens.FieldSet}
+  deriving stock (Prelude.Eq, Prelude.Ord)
+instance Prelude.Show TestAnyMsg where
+  showsPrec _ __x __s
+    = Prelude.showChar
+        '{'
+        (Prelude.showString
+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
+instance Data.ProtoLens.Field.HasField TestAnyMsg "message" Data.Text.Text where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestAnyMsg'message (\ x__ y__ -> x__ {_TestAnyMsg'message = y__}))
+        Prelude.id
+instance Data.ProtoLens.Field.HasField TestAnyMsg "details" [Proto.Google.Protobuf.Any.Any] where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestAnyMsg'details (\ x__ y__ -> x__ {_TestAnyMsg'details = y__}))
+        (Lens.Family2.Unchecked.lens
+           Data.Vector.Generic.toList
+           (\ _ y__ -> Data.Vector.Generic.fromList y__))
+instance Data.ProtoLens.Field.HasField TestAnyMsg "vec'details" (Data.Vector.Vector Proto.Google.Protobuf.Any.Any) where
+  fieldOf _
+    = (Prelude..)
+        (Lens.Family2.Unchecked.lens
+           _TestAnyMsg'details (\ x__ y__ -> x__ {_TestAnyMsg'details = y__}))
+        Prelude.id
+instance Data.ProtoLens.Message TestAnyMsg where
+  messageName _ = Data.Text.pack "TestAnyMsg"
+  packedMessageDescriptor _
+    = "\n\
+      \\n\
+      \TestAnyMsg\DC2\CAN\n\
+      \\amessage\CAN\SOH \SOH(\tR\amessage\DC2.\n\
+      \\adetails\CAN\STX \ETX(\v2\DC4.google.protobuf.AnyR\adetails"
+  packedFileDescriptor _ = packedFileDescriptor
+  fieldsByTag
+    = let
+        message__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "message"
+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
+              (Data.ProtoLens.PlainField
+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"message")) ::
+              Data.ProtoLens.FieldDescriptor TestAnyMsg
+        details__field_descriptor
+          = Data.ProtoLens.FieldDescriptor
+              "details"
+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
+                 Data.ProtoLens.FieldTypeDescriptor Proto.Google.Protobuf.Any.Any)
+              (Data.ProtoLens.RepeatedField
+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"details")) ::
+              Data.ProtoLens.FieldDescriptor TestAnyMsg
+      in
+        Data.Map.fromList
+          [(Data.ProtoLens.Tag 1, message__field_descriptor),
+           (Data.ProtoLens.Tag 2, details__field_descriptor)]
+  unknownFields
+    = Lens.Family2.Unchecked.lens
+        _TestAnyMsg'_unknownFields
+        (\ x__ y__ -> x__ {_TestAnyMsg'_unknownFields = y__})
+  defMessage
+    = TestAnyMsg'_constructor
+        {_TestAnyMsg'message = Data.ProtoLens.fieldDefault,
+         _TestAnyMsg'details = Data.Vector.Generic.empty,
+         _TestAnyMsg'_unknownFields = []}
+  parseMessage
+    = let
+        loop ::
+          TestAnyMsg
+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Google.Protobuf.Any.Any
+             -> Data.ProtoLens.Encoding.Bytes.Parser TestAnyMsg
+        loop x mutable'details
+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
+               if end then
+                   do frozen'details <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze
+                                             mutable'details)
+                      (let missing = []
+                       in
+                         if Prelude.null missing then
+                             Prelude.return ()
+                         else
+                             Prelude.fail
+                               ((Prelude.++)
+                                  "Missing required fields: "
+                                  (Prelude.show (missing :: [Prelude.String]))))
+                      Prelude.return
+                        (Lens.Family2.over
+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
+                           (Lens.Family2.set
+                              (Data.ProtoLens.Field.field @"vec'details") frozen'details x))
+               else
+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                      case tag of
+                        10
+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                           Data.ProtoLens.Encoding.Bytes.getText
+                                             (Prelude.fromIntegral len))
+                                       "message"
+                                loop
+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"message") y x)
+                                  mutable'details
+                        18
+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
+                                            Data.ProtoLens.Encoding.Bytes.isolate
+                                              (Prelude.fromIntegral len)
+                                              Data.ProtoLens.parseMessage)
+                                        "details"
+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                       (Data.ProtoLens.Encoding.Growing.append mutable'details y)
+                                loop x v
+                        wire
+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
+                                        wire
+                                loop
+                                  (Lens.Family2.over
+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
+                                  mutable'details
+      in
+        (Data.ProtoLens.Encoding.Bytes.<?>)
+          (do mutable'details <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
+                                   Data.ProtoLens.Encoding.Growing.new
+              loop Data.ProtoLens.defMessage mutable'details)
+          "TestAnyMsg"
+  buildMessage
+    = \ _x
+        -> (Data.Monoid.<>)
+             (let
+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"message") _x
+              in
+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
+                    Data.Monoid.mempty
+                else
+                    (Data.Monoid.<>)
+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
+                      ((Prelude..)
+                         (\ bs
+                            -> (Data.Monoid.<>)
+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                         Data.Text.Encoding.encodeUtf8 _v))
+             ((Data.Monoid.<>)
+                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
+                   (\ _v
+                      -> (Data.Monoid.<>)
+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
+                           ((Prelude..)
+                              (\ bs
+                                 -> (Data.Monoid.<>)
+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
+                              Data.ProtoLens.encodeMessage _v))
+                   (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'details") _x))
+                (Data.ProtoLens.Encoding.Wire.buildFieldSet
+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
+instance Control.DeepSeq.NFData TestAnyMsg where
+  rnf
+    = \ x__
+        -> Control.DeepSeq.deepseq
+             (_TestAnyMsg'_unknownFields x__)
+             (Control.DeepSeq.deepseq
+                (_TestAnyMsg'message x__)
+                (Control.DeepSeq.deepseq (_TestAnyMsg'details x__) ()))
+data TestAnyService = TestAnyService {}
+instance Data.ProtoLens.Service.Types.Service TestAnyService where
+  type ServiceName TestAnyService = "TestAnyService"
+  type ServicePackage TestAnyService = ""
+  type ServiceMethods TestAnyService = '["reverse"]
+  packedServiceDescriptor _
+    = "\n\
+      \\SOTestAnyService\DC2#\n\
+      \\aReverse\DC2\v.TestAnyMsg\SUB\v.TestAnyMsg"
+instance Data.ProtoLens.Service.Types.HasMethodImpl TestAnyService "reverse" where
+  type MethodName TestAnyService "reverse" = "Reverse"
+  type MethodInput TestAnyService "reverse" = TestAnyMsg
+  type MethodOutput TestAnyService "reverse" = TestAnyMsg
+  type MethodStreamingType TestAnyService "reverse" = 'Data.ProtoLens.Service.Types.NonStreaming
+packedFileDescriptor :: Data.ByteString.ByteString
+packedFileDescriptor
+  = "\n\
+    \\SOtest-any.proto\SUB\EMgoogle/protobuf/any.proto\"V\n\
+    \\n\
+    \TestAnyMsg\DC2\CAN\n\
+    \\amessage\CAN\SOH \SOH(\tR\amessage\DC2.\n\
+    \\adetails\CAN\STX \ETX(\v2\DC4.google.protobuf.AnyR\adetails\"\DC1\n\
+    \\SOHA\DC2\f\n\
+    \\SOHa\CAN\SOH \SOH(\ENQR\SOHa\"\DC1\n\
+    \\SOHB\DC2\f\n\
+    \\SOHb\CAN\SOH \SOH(\ENQR\SOHb25\n\
+    \\SOTestAnyService\DC2#\n\
+    \\aReverse\DC2\v.TestAnyMsg\SUB\v.TestAnyMsgJ\158\ETX\n\
+    \\ACK\DC2\EOT\NUL\NUL\DC3\SOH\n\
+    \\b\n\
+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
+    \\t\n\
+    \\STX\ETX\NUL\DC2\ETX\STX\NUL#\n\
+    \\n\
+    \\n\
+    \\STX\ACK\NUL\DC2\EOT\EOT\NUL\ACK\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\ACK\NUL\SOH\DC2\ETX\EOT\b\SYN\n\
+    \\v\n\
+    \\EOT\ACK\NUL\STX\NUL\DC2\ETX\ENQ\STX0\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX\ENQ\ACK\r\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX\ENQ\SI\EM\n\
+    \\f\n\
+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX\ENQ$.\n\
+    \\n\
+    \\n\
+    \\STX\EOT\NUL\DC2\EOT\b\NUL\v\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\NUL\SOH\DC2\ETX\b\b\DC2\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\t\STX\NAK\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\t\STX\b\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\t\t\DLE\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\t\DC3\DC4\n\
+    \\v\n\
+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\n\
+    \\STX+\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\EOT\DC2\ETX\n\
+    \\STX\n\
+    \\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX\n\
+    \\v\RS\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\n\
+    \\US&\n\
+    \\f\n\
+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\n\
+    \)*\n\
+    \\n\
+    \\n\
+    \\STX\EOT\SOH\DC2\EOT\r\NUL\SI\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\SOH\SOH\DC2\ETX\r\b\t\n\
+    \\v\n\
+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\SO\STX\SO\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\SO\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\SO\b\t\n\
+    \\f\n\
+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\SO\f\r\n\
+    \\n\
+    \\n\
+    \\STX\EOT\STX\DC2\EOT\DC1\NUL\DC3\SOH\n\
+    \\n\
+    \\n\
+    \\ETX\EOT\STX\SOH\DC2\ETX\DC1\b\t\n\
+    \\v\n\
+    \\EOT\EOT\STX\STX\NUL\DC2\ETX\DC2\STX\SO\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX\DC2\STX\a\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\DC2\b\t\n\
+    \\f\n\
+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\DC2\f\rb\ACKproto3"
diff --git a/src/Network/GRPC/Client.hs b/src/Network/GRPC/Client.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client.hs
@@ -0,0 +1,197 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Network.GRPC.Client (
+    -- * Connecting to the server
+    Connection -- opaque
+  , Server(..)
+  , ConnParams(..)
+  , withConnection
+
+    -- ** Reconnection policy
+  , ReconnectPolicy(..)
+  , ReconnectTo(..)
+  , exponentialBackoff
+
+    -- ** Connection parameters
+  , Scheme(..)
+  , Address(..)
+
+    -- ** Secure connection (TLS)
+  , ServerValidation(..)
+  , Util.TLS.CertificateStoreSpec
+  , Util.TLS.certStoreFromSystem
+  , Util.TLS.certStoreFromCerts
+  , Util.TLS.certStoreFromPath
+
+    -- * Make RPCs
+  , Call -- opaque
+  , withRPC
+
+    -- ** Parameters
+  , CallParams -- opaque
+  , callTimeout
+  , callRequestMetadata
+
+    -- ** Timeouts
+  , Timeout(..)
+  , TimeoutValue(TimeoutValue, getTimeoutValue)
+  , TimeoutUnit(..)
+  , timeoutToMicro
+
+    -- * Ongoing calls
+    --
+    -- $openRequest
+  , sendInput
+  , recvOutput
+  , recvResponseMetadata
+
+    -- ** Protocol specific wrappers
+  , sendNextInput
+  , sendFinalInput
+  , sendEndOfInput
+  , recvResponseInitialMetadata
+  , recvNextOutput
+  , recvFinalOutput
+  , recvTrailers
+
+    -- ** Low-level\/specialized API
+  , ResponseHeaders_(..)
+  , ResponseHeaders
+  , ResponseHeaders'
+  , ProperTrailers_(..)
+  , ProperTrailers
+  , ProperTrailers'
+  , TrailersOnly_(..)
+  , TrailersOnly
+  , TrailersOnly'
+  , recvNextOutputElem
+  , recvInitialResponse
+  , recvOutputWithMeta
+  , sendInputWithMeta
+
+    -- * Communication patterns
+  , rpc
+  , rpcWith
+
+    -- * Exceptions
+  , ServerDisconnected(..)
+  , CallSetupFailure(..)
+  , InvalidTrailers(..)
+  ) where
+
+import Network.GRPC.Client.Call
+import Network.GRPC.Client.Connection
+import Network.GRPC.Client.Session (CallSetupFailure(..), InvalidTrailers(..))
+import Network.GRPC.Client.StreamType (rpc, rpcWith)
+import Network.GRPC.Spec
+import Network.GRPC.Util.HTTP2.Stream (ServerDisconnected(..))
+import Network.GRPC.Util.TLS qualified as Util.TLS
+
+{-------------------------------------------------------------------------------
+  Ongoing calls
+-------------------------------------------------------------------------------}
+
+-- $openRequest
+--
+-- 'Call' denotes a previously opened request (see 'withRPC').
+--
+-- == Protobuf communication patterns
+--
+-- This is a general implementation of the
+-- [gRPC specification](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md).
+-- As such, these functions do not provide explicit support for the common
+-- communication patterns of non-streaming, server-side streaming, client-side
+-- streaming, or bidirectional streaming. These are not part of the gRPC
+-- standard, but are part of
+-- [its Protobuf instantiation](https://protobuf.dev/reference/protobuf/proto3-spec/#service_definition), although these
+-- patterns are of course not really Protobuf specific. We provide support for
+-- these communication patterns, independent from a choice of serialization
+-- format, in "Network.GRPC.Common.StreamType" and
+-- "Network.GRPC.Client.StreamType" (and "Network.GRPC.Server.StreamType" for the
+-- server side).
+--
+-- If you only use the abstractions provided in "Network.GRPC.*.StreamType",
+-- you can ignore the rest of the discussion below, which applies only to the
+-- more general interface.
+--
+-- == Stream elements
+--
+-- Both 'sendInput' and 'recvOutput' work with 'StreamElem':
+--
+-- > data StreamElem b a =
+-- >     StreamElem a
+-- >   | FinalElem a b
+-- >   | NoMoreElems b
+--
+-- The intuition is that we are sending messages of type @a@ (see \"Inputs and
+-- outputs\", below) and then when we send the final message, we can include
+-- some additional information of type @b@ (see \"Metadata\", below).
+--
+-- == Inputs and outputs
+--
+-- By convention, we refer to messages sent from the client to the server as
+-- \"inputs\" and messages sent from the server to the client as \"outputs\"
+-- (we inherited this terminology from
+-- [proto-lens](https://hackage.haskell.org/package/proto-lens-0.7.1.4/docs/Data-ProtoLens-Service-Types.html#t:HasMethodImpl).)
+-- On the client side we therefore have 'recvOutput' and 'sendInput' defined as
+--
+-- > recvOutput :: Call rpc -> m (StreamElem (ResponseTrailingMetadata rpc) (Output rpc))
+-- > sendInput  :: Call rpc -> StreamElem NoMetadata (Input rpc) -> m ()
+--
+-- and on the server side we have 'Network.GRPC.Server.recvInput' and
+-- 'Network.GRPC.Server.sendOutput':
+--
+-- > recvInput  :: Call rpc -> IO (StreamElem NoMetadata (Input rpc))
+-- > sendOutput :: Call rpc -> StreamElem (ResponseTrailingMetadata rpc) (Output rpc) -> IO ()
+--
+-- == Metadata
+--
+-- Both the server and the client can send some metadata before they send their
+-- first message; see 'withRPC' and 'callRequestMetadata' for the client-side
+-- (and 'Network.GRPC.Server.setResponseInitialMetadata' for the server-side).
+--
+-- The gRPC specification allows the server, but not the client, to include some
+-- /final/ metadata as well; this is the reason between the use of
+-- 'ResponseTrailingMetadata' for messages from the server to the client versus
+-- 'NoMetadata' for messages from the client.
+--
+-- == 'FinalElem' versus 'NoMoreElems'
+--
+-- 'Network.GRPC.Common.StreamElem' allows to mark the final message as final
+-- when it is /sent/ ('Network.GRPC.Common.FinalElem'), or retroactively
+-- indicate that the previous message was in fact final
+-- ('Network.GRPC.Common.NoMoreElems'). The reason for this is technical in
+-- nature.
+--
+-- Suppose we are doing a @grpc+proto@ non-streaming RPC call. The input message
+-- from the client to the server will be sent over one or more HTTP2 @DATA@
+-- frames (chunks of the input). The server will expect the last of those frames
+-- to be marked as @END_STREAM@. The HTTP2 specification /does/ allow sending an
+-- separate empty @DATA@ frame with the @END_STREAM@ flag set to indicate no
+-- further data is coming, but not all gRPC servers will wait for this, and
+-- might either think that the client is broken and disconnect, or might send
+-- the client a @RST_STREAM@ frame to force it to close the stream. To avoid
+-- problems, therefore, it is better to mark the final @DATA@ frame as
+-- @END_STREAM@; in order to be able to do that, 'sendInput' needs to know
+-- whether an input is the final one. It is therefore better to use 'FinalElem'
+-- instead of 'NoMoreElems' for outgoing messages, if possible.
+--
+-- For incoming messages the situation is different. Now we /do/ expect HTTP
+-- trailers (final metadata), which means that we cannot tell from @DATA@ frames
+-- alone if we have received the last message: it will be the frame containing
+-- the /trailers/ that is marked as @END_STREAM@, with no indication on the data
+-- frame just before it that it was the last one. We cannot wait for the next
+-- frame to come in, because that would be a blocking call (we might have to
+-- wait for the next TCP packet), and if the output was /not/ the last one, we
+-- would unnecessarily delay making the output we already received available to
+-- the client code. Typically therefore clients will receive a 'StreamElem'
+-- followed by 'NoMoreElems'.
+--
+-- Of course, for a given RPC and its associated communication pattern we may
+-- know whether any given message was the last; in the example above of a
+-- non-streaming @grpc+proto@ RPC call, we only expect a single output. In this
+-- case the client can (and should) call 'recvOutput' again to wait for the
+-- trailers (which, amongst other things, will include the 'trailerGrpcStatus').
+-- The specialized functions from "Network.GRPC.Client.StreamType" take care of
+-- this; if these functions are not applicable, users may wish to use
+-- 'recvFinalOutput'.
diff --git a/src/Network/GRPC/Client/Binary.hs b/src/Network/GRPC/Client/Binary.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/Binary.hs
@@ -0,0 +1,71 @@
+-- | Convenience functions for working with binary RPC
+--
+-- Intended for qualified import.
+--
+-- import Network.GRPC.Client.Binary qualified as Binary
+module Network.GRPC.Client.Binary (
+    -- * Convenience wrappers using @binary@ for serialization/deserialization
+    sendInput
+  , sendNextInput
+  , sendFinalInput
+  , recvOutput
+  , recvNextOutput
+  , recvFinalOutput
+  ) where
+
+import Control.Monad.IO.Class
+import Data.Binary
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+
+import Network.GRPC.Client (Call)
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary (decodeOrThrow)
+
+{-------------------------------------------------------------------------------
+  Convenience wrappers using @binary@ for serialization/deserialization
+-------------------------------------------------------------------------------}
+
+sendInput :: forall inp rpc m.
+     (Binary inp, Input rpc ~ Lazy.ByteString, MonadIO m)
+  => Call rpc
+  -> StreamElem NoMetadata inp
+  -> m ()
+sendInput call inp = Client.sendInput call (encode <$> inp)
+
+sendNextInput ::
+     (Binary inp, Input rpc ~ Lazy.ByteString, MonadIO m)
+  => Call rpc
+  -> inp
+  -> m ()
+sendNextInput call inp = Client.sendNextInput call (encode inp)
+
+sendFinalInput :: forall inp rpc m.
+     (Binary inp, Input rpc ~ Lazy.ByteString, MonadIO m)
+  => Call rpc
+  -> inp
+  -> m ()
+sendFinalInput call inp =
+   Client.sendFinalInput call (encode inp)
+
+recvOutput :: forall out rpc m.
+     (Binary out, Output rpc ~ Lazy.ByteString, MonadIO m)
+  => Call rpc
+  -> m (StreamElem (ResponseTrailingMetadata rpc) out)
+recvOutput call =
+     Client.recvOutput call >>= traverse decodeOrThrow
+
+recvNextOutput ::
+     (Binary out, Output rpc ~ Lazy.ByteString, MonadIO m)
+  => Call rpc
+  -> m out
+recvNextOutput call = Client.recvNextOutput call >>= decodeOrThrow
+
+recvFinalOutput :: forall out rpc m.
+     (Binary out, Output rpc ~ Lazy.ByteString, MonadIO m)
+  => Call rpc
+  -> m (out, ResponseTrailingMetadata rpc)
+recvFinalOutput call = do
+    (out, md) <- Client.recvFinalOutput call
+    (, md) <$> decodeOrThrow out
+
diff --git a/src/Network/GRPC/Client/Call.hs b/src/Network/GRPC/Client/Call.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/Call.hs
@@ -0,0 +1,749 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Open (ongoing) RPC call
+--
+-- Intended for unqualified import.
+module Network.GRPC.Client.Call (
+    -- * Construction
+    Call -- opaque
+  , withRPC
+
+    -- * Open (ongoing) call
+  , sendInput
+  , recvOutput
+  , recvResponseMetadata
+
+    -- ** Protocol specific wrappers
+  , sendNextInput
+  , sendFinalInput
+  , sendEndOfInput
+  , recvResponseInitialMetadata
+  , recvNextOutput
+  , recvFinalOutput
+  , recvTrailers
+
+    -- ** Low-level\/specialized API
+  , sendInputWithMeta
+  , recvNextOutputElem
+  , recvOutputWithMeta
+  , recvInitialResponse
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.STM
+import Control.Concurrent.Thread.Delay qualified as UnboundedDelays
+import Control.Monad
+import Control.Monad.Catch
+import Control.Monad.IO.Class
+import Data.Bifunctor
+import Data.Bitraversable
+import Data.ByteString.Char8 qualified as BS.Strict.C8
+import Data.Foldable (asum)
+import Data.List (intersperse)
+import Data.Maybe (fromMaybe)
+import Data.Proxy
+import Data.Text qualified as Text
+import Data.Version
+import GHC.Stack
+
+import Network.GRPC.Client.Connection (Connection, ConnParams(..))
+import Network.GRPC.Client.Connection qualified as Connection
+import Network.GRPC.Client.Session
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compression
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Util.HKD qualified as HKD
+import Network.GRPC.Util.GHC
+import Network.GRPC.Util.HTTP2.Stream (ServerDisconnected(..))
+import Network.GRPC.Util.Session qualified as Session
+import Network.GRPC.Util.Thread qualified as Thread
+
+import Paths_grapesy qualified as Grapesy
+
+{-------------------------------------------------------------------------------
+  Open a call
+-------------------------------------------------------------------------------}
+
+-- | State of the call
+--
+-- This type is kept abstract (opaque) in the public facing API.
+data Call rpc = SupportsClientRpc rpc => Call {
+      callChannel :: Session.Channel (ClientSession rpc)
+    }
+
+-- | Scoped RPC call
+--
+-- This is the low-level API for making RPC calls, providing full flexibility.
+-- You may wish to consider using the infrastructure from
+-- "Network.GRPC.Client.StreamType.IO" instead.
+--
+-- Typical usage:
+--
+-- > withRPC conn def (Proxy @ListFeatures) $ \call -> do
+-- >   .. use 'call' to send and receive messages
+--
+-- for some previously established connection 'conn'
+-- (see 'Network.GRPC.Client.withConnection') and where @ListFeatures@ is some
+-- kind of RPC.
+--
+-- The call is setup in the background, and might not yet have been established
+-- when the body is run. If you want to be sure that the call has been setup,
+-- you can call 'recvResponseMetadata'.
+--
+-- Leaving the scope of 'withRPC' before the client informs the server that they
+-- have sent their last message (using 'sendInput' or 'sendEndOfInput') is
+-- considered a cancellation, and accordingly throws a 'GrpcException' with
+-- 'GrpcCancelled' (see also <https://grpc.io/docs/guides/cancellation/>).
+--
+-- There is one exception to this rule: if the server unilaterally closes the
+-- RPC (that is, the server already sent the trailers), then the call is
+-- considered closed and the cancellation exception is not raised. Under normal
+-- circumstances (with well-behaved server handlers) this should not arise.
+-- (The gRPC specification itself is not very specific about this case; see
+-- discussion at <https://stackoverflow.com/questions/55511528/should-grpc-server-side-half-closing-implicitly-terminate-the-client>.)
+--
+-- If there are still /inbound/ messages upon leaving the scope of 'withRPC' no
+-- exception is raised (but the call is nonetheless still closed, and the server
+-- handler will be informed that the client has disappeared).
+--
+-- Note on timeouts: if a timeout is specified for the call (either through
+-- 'callTimeout' or through 'connDefaultTimeout'), when the timeout is reached
+-- the RPC is cancelled; any further attempts to receive or send messages will
+-- result in a 'GrpcException' with 'GrpcDeadlineExceeded'. As per the gRPC
+-- specification, this does /not/ rely on the server; this does mean that the
+-- same deadline also applies if the /client/ is slow (rather than the server).
+withRPC :: forall rpc m a.
+     (MonadMask m, MonadIO m, SupportsClientRpc rpc, HasCallStack)
+  => Connection -> CallParams rpc -> Proxy rpc -> (Call rpc -> m a) -> m a
+withRPC conn callParams proxy k = fmap fst $
+    generalBracket
+      (liftIO $
+         startRPC conn proxy callParams)
+      (\(Call{callChannel}, cancelRequest) exitCase -> liftIO $
+         closeRPC callChannel cancelRequest exitCase)
+      (k . fst)
+
+-- | Open new channel to the server
+--
+-- This is a non-blocking call; the connection will be set up in a
+-- background thread; if this takes time, then the first call to
+-- 'sendInput' or 'recvOutput' will block, but the call to 'startRPC'
+-- itself will not block. This non-blocking nature makes this safe to use
+-- in 'bracket' patterns.
+startRPC :: forall rpc.
+     (SupportsClientRpc rpc, HasCallStack)
+  => Connection
+  -> Proxy rpc
+  -> CallParams rpc
+  -> IO (Call rpc, Session.CancelRequest)
+startRPC conn _ callParams = do
+    (connClosed, connToServer) <- Connection.getConnectionToServer conn
+    cOut     <- Connection.getOutboundCompression conn
+    metadata <- buildMetadataIO $ callRequestMetadata callParams
+    let flowStart :: Session.FlowStart (ClientOutbound rpc)
+        flowStart = Session.FlowStartRegular $ OutboundHeaders {
+            outHeaders     = requestHeaders cOut metadata
+          , outCompression = fromMaybe noCompression cOut
+          }
+
+    let serverClosedConnection ::
+             Either (TrailersOnly' HandledSynthesized) ProperTrailers'
+          -> SomeException
+        serverClosedConnection =
+              either toException toException
+            . grpcClassifyTermination
+            . either trailersOnlyToProperTrailers' id
+
+    (channel, cancelRequest) <-
+      Session.setupRequestChannel
+        session
+        connToServer
+        serverClosedConnection
+        flowStart
+
+    -- The spec mandates that
+    --
+    -- > If a server has gone past the deadline when processing a request, the
+    -- > client will give up and fail the RPC with the DEADLINE_EXCEEDED status.
+    --
+    -- and also that the deadline applies when when wait-for-ready semantics is
+    -- used.
+    --
+    -- We have to be careful implementing this. In particular, we definitely
+    -- don't want to impose the timeout on the /client/ (that is, we should not
+    -- force the client to exit the scope of 'withRPC' within the timeout).
+    -- Instead, we work a thread that cancels the RPC after the timeout expires;
+    -- this means that /if/ the client that attempts to communicate with the
+    -- server after the timeout, only then will it receive an exception.
+    --
+    -- The thread we spawn here is cleaned up by the monitor thread (below).
+    --
+    -- See
+    --
+    -- o <https://grpc.io/docs/guides/deadlines/>
+    -- o <https://grpc.io/docs/guides/wait-for-ready/>
+    mClientSideTimeout <-
+      case callTimeout callParams of
+        Nothing -> return Nothing
+        Just t  -> fmap Just $ forkLabelled "grapesy:clientSideTimeout" $ do
+          UnboundedDelays.delay (timeoutToMicro t)
+          let timeout :: SomeException
+              timeout = toException $ GrpcException {
+                    grpcError         = GrpcDeadlineExceeded
+                  , grpcErrorMessage  = Nothing
+                  , grpcErrorDetails  = Nothing
+                  , grpcErrorMetadata = []
+                  }
+
+          -- We recognized client-side that the timeout we imposed on the server
+          -- has passed. Acting on this is however tricky:
+          --
+          -- o A call to 'closeRPC' will only terminate the /outbound/ thread;
+          --   the idea is the inbound thread might still be reading in-flight
+          --   messages, and it will terminate once the last message is read or
+          --   the thread notices a broken connection.
+          -- o Unfortunately, this does not work in the timeout case: /if/ the
+          --   outbound thread has not yet terminated (that is, the client has
+          --   not yet sent their final message), then calling 'closeRPC' will
+          --   result in a RST_STREAM being sent to the server, which /should/
+          --   result in the inbound connection being closed also, but may not,
+          --   in the case of a non-compliant server.
+          -- o Worse, if the client /did/ already send their final message, the
+          --   outbound thread has already terminated, no RST_STREAM will be
+          --   sent, and the we will continue to wait for messages from the
+          --   server.
+          --
+          -- Ideally we'd inform the receiving thread that a timeout has been
+          -- reached and to "continue until it would block", but that is hard
+          -- to do. So instead we just kill the receiving thread, which means
+          -- that once the timeout is reached, the client will not be able to
+          -- receive any further messages (even if that is because the /client/
+          -- was slow, rather than the server).
+
+          void $ Thread.cancelThread (Session.channelInbound channel) timeout
+          closeRPC channel cancelRequest $ ExitCaseException timeout
+
+    -- Spawn a thread to monitor the connection, and close the new channel when
+    -- the connection is closed. To prevent a memory leak by hanging on to the
+    -- channel for the lifetime of the connection, the thread also terminates in
+    -- the (normal) case that the channel is closed before the connection is.
+    _ <- forkLabelled "grapesy:monitorConnection" $ do
+      status <- atomically $ do
+          (Left <$> Thread.waitForNormalOrAbnormalThreadTermination
+                      (Session.channelInbound channel))
+        `orElse`
+          (Right <$> readTMVar connClosed)
+      forM_ mClientSideTimeout killThread
+      case status of
+        Left _ -> return () -- Channel closed before the connection
+        Right mErr -> do
+          let exitReason :: ExitCase ()
+              exitReason =
+                case mErr of
+                  Nothing -> ExitCaseSuccess ()
+                  Just exitWithException ->
+                    ExitCaseException . toException $
+                      ServerDisconnected exitWithException callStack
+          _mAlreadyClosed <- Session.close channel exitReason
+          return ()
+
+    return (Call channel, cancelRequest)
+  where
+    connParams :: ConnParams
+    connParams = Connection.connParams conn
+
+    requestHeaders :: Maybe Compression -> [CustomMetadata] -> RequestHeaders
+    requestHeaders cOut metadata = RequestHeaders{
+          requestTimeout =
+            asum [
+                callTimeout callParams
+              , connDefaultTimeout connParams
+              ]
+        , requestMetadata =
+            customMetadataMapFromList metadata
+        , requestCompression =
+            compressionId <$> cOut
+        , requestAcceptCompression = Just $
+            Compression.offer $ connCompression connParams
+        , requestContentType =
+            connContentType connParams
+        , requestMessageType =
+            Just MessageTypeDefault
+        , requestUserAgent = Just $
+            mconcat [
+                "grpc-haskell-grapesy/"
+              , mconcat . intersperse "." $
+                  map (BS.Strict.C8.pack . show) $
+                    versionBranch Grapesy.version
+              ]
+        , requestIncludeTE =
+            True
+        , requestTraceContext =
+            Nothing
+        , requestPreviousRpcAttempts =
+            Nothing
+        , requestUnrecognized =
+            ()
+        }
+
+    session :: ClientSession rpc
+    session = ClientSession {
+          clientConnection = conn
+        }
+
+-- | Close the RPC (internal API only)
+--
+-- This is more subtle than one might think. The spec mandates that when a
+-- client cancels a request (which in grapesy means exiting the scope of
+-- withRPC), the client receives a CANCELLED exception. We need to deal with the
+-- edge case mentioned in 'withRPC', however: the server might have already
+-- closed the connection. The client must have evidence that this is the case,
+-- which could mean one of two things:
+--
+-- o The client received the final message from the server
+-- o The server threw an exception (and the client saw this)
+--
+-- We can check for the former using 'channelRecvFinal', and the latter using
+-- 'hasThreadTerminated'. By checking both, we avoid race conditions:
+--
+-- o If the client received the final message, 'channelRecvFinal' /will/ have
+--   been updated (we update this in the same transaction that returns the
+--   actual element; see 'Network.GRPC.Util.Session.Channel.recv').
+-- o If the server threw an exception, and the client observed this, then the
+--   inbound thread state /must/ have changed to 'ThreadException'.
+--
+-- Note that it is /not/ sufficient to check if the inbound thread has
+-- terminated: we might have received the final message, but the thread might
+-- still be /about/ to terminate, but not /actually/ have terminated.
+--
+-- See also:
+--
+-- o <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#cancel_after_begin>
+-- o <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#cancel_after_first_response>
+closeRPC ::
+     Session.Channel rpc
+  -> Session.CancelRequest
+  -> ExitCase a
+  -> IO ()
+closeRPC callChannel cancelRequest exitCase = liftIO $ do
+    -- /Before/ we do anything else (see below), check if we have evidence
+    -- that we can discard the connection.
+    canDiscard <- checkCanDiscard
+
+    -- Send the RST_STREAM frame /before/ closing the outbound thread.
+    --
+    -- When we call 'Session.close', we will terminate the
+    -- 'sendMessageLoop', @http2@ will interpret this as a clean termination
+    -- of the stream. We must therefore cancel this stream before calling
+    -- 'Session.close'. /If/ the final message has already been sent,
+    -- @http2@ guarantees (as a postcondition of @outBodyPushFinal@) that
+    -- cancellation will be a no-op.
+    sendResetFrame
+
+    -- Now close the /outbound/ thread, see docs of 'Session.close' for
+    -- details.
+    mException <- liftIO $ Session.close callChannel exitCase
+    case mException of
+      Nothing ->
+        -- The outbound thread had already terminated
+        return ()
+      Just ex ->
+        case fromException ex of
+          Nothing ->
+            -- We are leaving the scope of 'withRPC' because of an exception
+            -- in the client, just rethrow that exception.
+            throwM ex
+          Just discarded ->
+            -- We are leaving the scope of 'withRPC' without having sent the
+            -- final message.
+            --
+            -- If the server was closed before we cancelled the stream, this
+            -- means that the server unilaterally closed the connection.
+            -- This should be regarded as normal termination of the RPC (see
+            -- the docs for 'withRPC')
+            --
+            -- Otherwise, the client left the scope of 'withRPC' before the
+            -- RPC was complete, which the gRPC spec mandates to result in a
+            -- 'GrpcCancelled' exception. See docs of 'throwCancelled'.
+            unless canDiscard $
+              throwCancelled discarded
+  where
+    -- Send a @RST_STREAM@ frame if necessary
+    sendResetFrame :: IO ()
+    sendResetFrame =
+        cancelRequest $
+          case exitCase of
+            ExitCaseSuccess _ ->
+              -- Error code will be CANCEL
+              Nothing
+            ExitCaseAbort ->
+              -- Error code will be INTERNAL_ERROR. The client aborted with an
+              -- error that we don't have access to. We want to tell the server
+              -- that something has gone wrong (i.e. INTERNAL_ERROR), so we must
+              -- pass an exception, however the exact nature of the exception is
+              -- not particularly important as it is only recorded locally.
+              Just . toException $ Session.ChannelAborted callStack
+            ExitCaseException e ->
+              -- Error code will be INTERNAL_ERROR
+              Just e
+
+    throwCancelled :: ChannelDiscarded -> IO ()
+    throwCancelled (ChannelDiscarded cs) = do
+        throwM $ GrpcException {
+            grpcError         = GrpcCancelled
+          , grpcErrorMessage  = Just $ mconcat [
+                                    "Channel discarded by client at "
+                                  , Text.pack $ prettyCallStack cs
+                                  ]
+          , grpcErrorDetails  = Nothing
+          , grpcErrorMetadata = []
+          }
+
+    checkCanDiscard :: IO Bool
+    checkCanDiscard = do
+        mRecvFinal  <- atomically $
+          readTVar $ Session.channelRecvFinal callChannel
+        let onNotRunning :: STM ()
+            onNotRunning = return ()
+        mTerminated <- atomically $
+          Thread.getThreadState_
+            (Session.channelInbound callChannel)
+            onNotRunning
+        return $
+          or [
+              case mRecvFinal of
+                Session.RecvNotFinal          -> False
+                Session.RecvWithoutTrailers _ -> True
+                Session.RecvFinal _           -> True
+
+              -- We are checking if we have evidence that we can discard the
+              -- channel. If the inbound thread is not yet running, this implies
+              -- that the server has not yet initiated their response to us,
+              -- which means we have no evidence to believe we can discard the
+              -- channel.
+            , case mTerminated of
+                Thread.ThreadNotYetRunning_ () -> False
+                Thread.ThreadRunning_          -> False
+                Thread.ThreadDone_             -> True
+                Thread.ThreadException_ _      -> True
+            ]
+
+{-------------------------------------------------------------------------------
+  Open (ongoing) call
+-------------------------------------------------------------------------------}
+
+-- | Send an input to the peer
+--
+-- Calling 'sendInput' again after sending the final message is a bug.
+sendInput ::
+     (HasCallStack, MonadIO m)
+  => Call rpc
+  -> StreamElem NoMetadata (Input rpc)
+  -> m ()
+sendInput call = sendInputWithMeta call . fmap (def,)
+
+-- | Generalization of 'sendInput', providing additional control
+--
+-- See also 'Network.GRPC.Server.sendOutputWithMeta'.
+--
+-- Most applications will never need to use this function.
+sendInputWithMeta ::
+     (HasCallStack, MonadIO m)
+  => Call rpc
+  -> StreamElem NoMetadata (OutboundMeta, Input rpc)
+  -> m ()
+sendInputWithMeta Call{callChannel} msg = liftIO $ do
+    Session.send callChannel msg
+
+    -- This should be called before exiting the scope of 'withRPC'.
+    StreamElem.whenDefinitelyFinal msg $ \_ ->
+      Session.waitForOutbound callChannel
+
+-- | Receive an output from the peer
+--
+-- After the final 'Output', you will receive any custom metadata (application
+-- defined trailers) that the server returns. We do /NOT/ include the
+-- 'GrpcStatus' here: a status of 'GrpcOk' carries no information, and any other
+-- status will result in a 'GrpcException'. Calling 'recvOutput' again after
+-- receiving the trailers is a bug and results in a 'RecvAfterFinal' exception.
+recvOutput :: forall rpc m.
+     (MonadIO m, HasCallStack)
+  => Call rpc
+  -> m (StreamElem (ResponseTrailingMetadata rpc) (Output rpc))
+recvOutput call@Call{} = liftIO $ do
+    streamElem <- recvOutputWithMeta call
+    bitraverse (responseTrailingMetadata call) (return . snd) streamElem
+
+-- | Receive an output from the peer, if one exists
+--
+-- If this is the final output, the /next/ call to 'recvNextOutputElem' will
+-- return 'NoNextElem'; see also 'Network.GRPC.Server.recvNextInputElem' for
+-- detailed discussion.
+recvNextOutputElem ::
+     (MonadIO m, HasCallStack)
+  => Call rpc -> m (NextElem (Output rpc))
+recvNextOutputElem =
+      fmap (either (const NoNextElem) (NextElem . snd))
+    . recvEither
+
+-- | Generalization of 'recvOutput', providing additional meta-information
+--
+-- This returns the full set of trailers, /even if those trailers indicate a
+-- gRPC failure, or if any trailers fail to parse/. Put another way, gRPC
+-- failures are returned as values here, rather than throwing an exception.
+--
+-- Most applications will never need to use this function.
+--
+-- See also 'Network.GRPC.Server.recvInputWithMeta'.
+recvOutputWithMeta :: forall rpc m.
+     (MonadIO m, HasCallStack)
+  => Call rpc
+  -> m (StreamElem ProperTrailers' (InboundMeta, Output rpc))
+recvOutputWithMeta = recvBoth
+
+-- | The initial metadata that was included in the response headers
+--
+-- The server can send two sets of metadata: an initial set of type
+-- 'ResponseInitialMetadata' when it first initiates the response, and then a
+-- final set of type 'ResponseTrailingMetadata' after the final message (see
+-- 'recvOutput').
+--
+-- It is however possible for the server to send only a /single/ set; this is
+-- the gRPC \"Trailers-Only\" case. The server can choose to do so when it knows
+-- it will not send any messages; in this case, the initial response metadata is
+-- fact of type 'ResponseTrailingMetadata' instead. The 'ResponseMetadata' type
+-- distinguishes between these two cases.
+--
+-- If the \"Trailers-Only\" case can be ruled out (that is, if it would amount
+-- to a protocol error), you can use 'recvResponseInitialMetadata' instead.
+--
+-- This can block: we need to wait until we receive the metadata. The precise
+-- communication pattern will depend on the specifics of each server:
+--
+-- * It might be necessary to send one or more inputs to the server before it
+--   returns any replies.
+-- * The response metadata /will/ be available before the first output from the
+--   server, and may indeed be available /well/ before.
+recvResponseMetadata :: forall rpc m.
+     MonadIO m
+  => Call rpc -> m (ResponseMetadata rpc)
+recvResponseMetadata call@Call{} = liftIO $
+    recvInitialResponse call >>= aux
+  where
+    aux ::
+         Either (TrailersOnly'    HandledSynthesized)
+                (ResponseHeaders' HandledSynthesized)
+      -> IO (ResponseMetadata rpc)
+    aux (Left trailers) =
+        case grpcClassifyTermination properTrailers of
+          Left exception ->
+            throwM exception
+          Right terminatedNormally -> do
+            ResponseTrailingMetadata <$>
+              parseMetadata (grpcTerminatedMetadata terminatedNormally)
+      where
+        properTrailers = trailersOnlyToProperTrailers' trailers
+    aux (Right headers) =
+        ResponseInitialMetadata <$>
+          parseMetadata (customMetadataMapToList $ responseMetadata headers)
+
+-- | Return the initial response from the server
+--
+-- This is a low-level function, and generalizes 'recvResponseInitialMetadata'.
+-- If the server returns a gRPC error, that will be returned as a value here
+-- rather than thrown as an exception.
+--
+-- Most applications will never need to use this function.
+recvInitialResponse :: forall rpc m.
+     MonadIO m
+  => Call rpc
+  -> m ( Either (TrailersOnly'    HandledSynthesized)
+                 (ResponseHeaders' HandledSynthesized)
+        )
+recvInitialResponse Call{callChannel} = liftIO $
+    fmap inbHeaders <$> Session.getInboundHeaders callChannel
+
+{-------------------------------------------------------------------------------
+  Protocol specific wrappers
+-------------------------------------------------------------------------------}
+
+-- | Send the next input
+--
+-- If this is the last input, you should call 'sendFinalInput' instead.
+sendNextInput :: MonadIO m => Call rpc -> Input rpc -> m ()
+sendNextInput call = sendInput call . StreamElem
+
+-- | Send final input
+--
+-- For some servers it is important that the client marks the final input /when
+-- it is sent/. If you really want to send the final input and separately tell
+-- the server that no more inputs will be provided, use 'sendEndOfInput' (or
+-- 'sendInput').
+sendFinalInput ::
+     MonadIO m
+  => Call rpc
+  -> Input rpc
+  -> m ()
+sendFinalInput call input =
+    sendInput call (FinalElem input NoMetadata)
+
+-- | Indicate that there are no more inputs
+--
+-- See 'sendFinalInput' for additional discussion.
+sendEndOfInput :: MonadIO m => Call rpc -> m ()
+sendEndOfInput call = sendInput call $ NoMoreElems NoMetadata
+
+-- | Receive /initial/ metadata
+--
+-- This is a specialization of 'recvResponseMetadata' which can be used if a use
+-- of \"Trailers-Only\" amounts to a protocol error; if the server /does/ use
+-- \"Trailers-Only\", this throws a 'ProtoclException'
+-- ('UnexpectedTrailersOnly').
+recvResponseInitialMetadata :: forall rpc m.
+     MonadIO m
+  => Call rpc
+  -> m (ResponseInitialMetadata rpc)
+recvResponseInitialMetadata call@Call{} = liftIO $ do
+    md <- recvResponseMetadata call
+    case md of
+      ResponseInitialMetadata md' ->
+        return md'
+      ResponseTrailingMetadata md' ->
+        err $ UnexpectedTrailersOnly md'
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwM . ProtocolException
+
+-- | Receive the next output
+--
+-- Throws 'ProtocolException' if there are no more outputs.
+recvNextOutput :: forall rpc m.
+     (MonadIO m, HasCallStack)
+  => Call rpc -> m (Output rpc)
+recvNextOutput call@Call{} = liftIO $ do
+    mOut <- recvEither call
+    case mOut of
+      Left trailers -> do
+        trailingMetadata <- responseTrailingMetadata call trailers
+        err $ TooFewOutputs @rpc trailingMetadata
+      Right (_env, out) ->
+        return out
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwM . ProtocolException
+
+-- | Receive output, which we expect to be the /final/ output
+--
+-- Throws 'ProtocolException' if the output we receive is not final.
+--
+-- NOTE: If the first output we receive from the server is not marked as final,
+-- we will block until we receive the end-of-stream indication.
+recvFinalOutput :: forall rpc m.
+     (MonadIO m, HasCallStack)
+  => Call rpc
+  -> m (Output rpc, ResponseTrailingMetadata rpc)
+recvFinalOutput call@Call{} = liftIO $ do
+    out1 <- recvOutput call
+    case out1 of
+      NoMoreElems    ts -> err $ TooFewOutputs @rpc ts
+      FinalElem  out ts -> return (out, ts)
+      StreamElem out    -> do
+        out2 <- recvOutput call
+        case out2 of
+          NoMoreElems ts    -> return (out, ts)
+          FinalElem  out' _ -> err $ TooManyOutputs @rpc out'
+          StreamElem out'   -> err $ TooManyOutputs @rpc out'
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwM . ProtocolException
+
+-- | Receive trailers
+--
+-- Throws 'ProtocolException' if we received an output.
+recvTrailers :: forall rpc m.
+     (MonadIO m, HasCallStack)
+  => Call rpc -> m (ResponseTrailingMetadata rpc)
+recvTrailers call@Call{} = liftIO $ do
+    mOut <- recvOutput call
+    case mOut of
+      NoMoreElems     ts -> return ts
+      FinalElem  out _ts -> err $ TooManyOutputs @rpc out
+      StreamElem out     -> err $ TooManyOutputs @rpc out
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwM . ProtocolException
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary: deal with final message
+-------------------------------------------------------------------------------}
+
+recvBoth :: forall rpc m.
+     (HasCallStack, MonadIO m)
+  => Call rpc
+  -> m (StreamElem ProperTrailers' (InboundMeta, Output rpc))
+recvBoth Call{callChannel} = liftIO $
+    flatten <$> Session.recvBoth callChannel
+  where
+    -- We lose type information here: Trailers-Only is no longer visible
+    flatten ::
+         Either
+           (TrailersOnly' HandledSynthesized)
+           (StreamElem ProperTrailers' (InboundMeta, Output rpc))
+      -> StreamElem ProperTrailers' (InboundMeta, Output rpc)
+    flatten (Left trailersOnly) =
+        NoMoreElems $ trailersOnlyToProperTrailers' trailersOnly
+    flatten (Right streamElem) =
+        streamElem
+
+recvEither :: forall rpc m.
+     (HasCallStack, MonadIO m)
+  => Call rpc
+  -> m (Either ProperTrailers' (InboundMeta, Output rpc))
+recvEither Call{callChannel} = liftIO $
+    flatten <$> Session.recvEither callChannel
+  where
+    flatten ::
+         Either
+           (TrailersOnly' HandledSynthesized)
+           (Either ProperTrailers' (InboundMeta, Output rpc))
+      -> Either ProperTrailers' (InboundMeta, Output rpc)
+    flatten (Left trailersOnly) =
+        Left $ trailersOnlyToProperTrailers' trailersOnly
+    flatten (Right (Left properTrailers)) =
+        Left $ properTrailers
+    flatten (Right (Right msg)) =
+        Right $ msg
+
+responseTrailingMetadata ::
+     MonadIO m
+  => Call rpc
+  -> ProperTrailers' -> m (ResponseTrailingMetadata rpc)
+responseTrailingMetadata Call{} trailers = liftIO $
+    case grpcClassifyTermination trailers of
+      Right terminatedNormally -> do
+        parseMetadata $ grpcTerminatedMetadata terminatedNormally
+      Left exception ->
+        throwM exception
+
+
+-- | Forget that we are in the Trailers-Only case
+--
+-- Error handling is a bit subtle here. If we are in the Trailers-Only case:
+--
+-- * Any synthesized errors have already been dealt with
+--   (the type @TrailersOnly' Void@ tell us this)
+-- * If 'connVerifyHeaders' is enabled, /all/ trailers have been verified
+--   (unfortunately this we cannot see from type).
+--
+-- This means that we might only have a (non-synthesized) error for the
+-- content-type if 'connVerifyHeaders' is /not/ enabled; since we are not
+-- actually interested in the content-type here, we can therefore just ignore
+-- these errors.
+trailersOnlyToProperTrailers' ::
+     TrailersOnly' HandledSynthesized
+  -> ProperTrailers'
+trailersOnlyToProperTrailers' =
+      fst                                   -- justified by the comment above
+    . trailersOnlyToProperTrailers
+    . HKD.map (first $ mapSynthesized handledSynthesized) -- simple injection
diff --git a/src/Network/GRPC/Client/Connection.hs b/src/Network/GRPC/Client/Connection.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/Connection.hs
@@ -0,0 +1,629 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Connection to a server
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Client.Connection (Connection, withConnection)
+-- > import Network.GRPC.Client.Connection qualified as Connection
+module Network.GRPC.Client.Connection (
+    -- * Definition
+    Connection -- opaque
+  , withConnection
+    -- * Configuration
+  , Server(..)
+  , ServerValidation(..)
+  , SslKeyLog(..)
+  , ConnParams(..)
+  , ReconnectPolicy(..)
+  , ReconnectTo(..)
+  , exponentialBackoff
+    -- * Using the connection
+  , connParams
+  , getConnectionToServer
+  , getOutboundCompression
+  , updateConnectionMeta
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.STM
+import Control.Monad
+import Control.Monad.Catch
+import Data.Default
+import GHC.Stack
+import Network.HPACK qualified as HPACK
+import Network.HTTP2.Client qualified as HTTP2.Client
+import Network.HTTP2.TLS.Client qualified as HTTP2.TLS.Client
+import Network.Run.TCP qualified as Run
+import Network.Socket
+import Network.TLS (TLSException)
+import System.Random
+
+import Network.GRPC.Client.Meta (Meta)
+import Network.GRPC.Client.Meta qualified as Meta
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Common.HTTP2Settings
+import Network.GRPC.Spec
+import Network.GRPC.Util.GHC
+import Network.GRPC.Util.Session qualified as Session
+import Network.GRPC.Util.TLS (ServerValidation(..), SslKeyLog(..))
+import Network.GRPC.Util.TLS qualified as Util.TLS
+
+{---------------------------------------------------2----------------------------
+  Connection API
+
+  'Connection' is kept abstract (opaque) in the user facing API.
+
+  The closest concept on the server side concept is
+  'Network.GRPC.Server.Context': this does not identify a connection from a
+  particular client (@http2@ gives us each request separately, without
+  identifying which requests come from the same client), but keeps track of the
+  overall server state.
+-------------------------------------------------------------------------------}
+
+-- | Open connection to server
+--
+-- See 'withConnection'.
+--
+-- Before we can send RPC requests, we have to connect to a specific server
+-- first. Once we have opened a connection to that server, we can send as many
+-- RPC requests over that one connection as we wish. 'Connection' abstracts over
+-- this connection, and also maintains some information about the server.
+--
+-- We can make many RPC calls over the same connection.
+data Connection = Connection {
+      -- | Configuration
+      connParams :: ConnParams
+
+      -- | Information about the open connection
+    , connMetaVar :: MVar Meta
+
+      -- | Connection state
+    , connStateVar :: TVar ConnectionState
+    }
+
+{-------------------------------------------------------------------------------
+  Config
+-------------------------------------------------------------------------------}
+
+-- | Connection configuration
+--
+-- You may wish to override 'connReconnectPolicy'.
+data ConnParams = ConnParams {
+      -- | Compression negotation
+      connCompression :: Compr.Negotation
+
+      -- | Default timeout
+      --
+      -- Individual RPC calls can override this through 'CallParams'.
+    , connDefaultTimeout :: Maybe Timeout
+
+      -- | Reconnection policy
+      --
+      -- NOTE: The default 'ReconnectPolicy' is 'DontReconnect', as per the
+      -- spec (see 'ReconnectPolicy'). You may wish to override this in order
+      -- to enable Wait for Ready semantics (retry connecting to a server
+      -- when it is not yet ready) as well as automatic reconnects (reconnecting
+      -- after a server disappears). The latter can be especially important
+      -- when there are proxies, which tend to drop connections after a certain
+      -- amount of time.
+    , connReconnectPolicy :: ReconnectPolicy
+
+      -- | Optionally override the content type
+      --
+      -- If 'Nothing', the @Content-Type@ header will be omitted entirely
+      -- (this is not conform gRPC spec).
+    , connContentType :: Maybe ContentType
+
+      -- | Should we verify all request headers?
+      --
+      -- This is the client analogue of
+      -- 'Network.GRPC.Server.Context.serverVerifyHeaders'; see detailed
+      -- discussion there.
+      --
+      -- Arguably, it is less essential to verify headers on the client: a
+      -- server must deal with all kinds of different clients, and might want to
+      -- know if any of those clients has expectations that it cannot fulfill. A
+      -- client however connects to a known server, and knows what information
+      -- it wants from the server.
+    , connVerifyHeaders :: Bool
+
+      -- | Optionally set the initial compression algorithm
+      --
+      -- Under normal circumstances, the @grapesy@ client will only start using
+      -- compression once the server has informed it what compression algorithms
+      -- it supports. This means the first message will necessarily be
+      -- uncompressed. 'connCompression' can be used to override this behaviour,
+      -- but should be used with care: if the server does not support the
+      -- selected compression algorithm, it will not be able to decompress any
+      -- messages sent by the client to the server.
+    , connInitCompression :: Maybe Compression
+
+      -- | HTTP2 settings
+    , connHTTP2Settings :: HTTP2Settings
+    }
+
+instance Default ConnParams where
+  def = ConnParams {
+        connCompression     = def
+      , connDefaultTimeout  = Nothing
+      , connReconnectPolicy = def
+      , connContentType     = Just ContentTypeDefault
+      , connVerifyHeaders   = False
+      , connInitCompression = Nothing
+      , connHTTP2Settings   = def
+      }
+
+{-------------------------------------------------------------------------------
+  Reconnection policy
+-------------------------------------------------------------------------------}
+
+-- | Reconnect policy
+--
+-- See 'exponentialBackoff' for a convenient function to construct a policy.
+data ReconnectPolicy =
+    -- | Do not attempt to reconnect
+    --
+    -- When we get disconnected from the server (or fail to establish a
+    -- connection), do not attempt to connect again.
+    DontReconnect
+
+    -- | Reconnect to the (potentially different) server after the IO action
+    -- returns
+    --
+    -- The 'ReconnectTo' can be used to implement a rudimentary redundancy
+    -- scheme. For example, you could decide to reconnect to a known fallback
+    -- server after connection to a main server fails a certain number of times.
+    --
+    -- This is a very general API: typically the IO action will call
+    -- 'threadDelay' after some amount of time (which will typically involve
+    -- some randomness), but it can be used to do things such as display a
+    -- message to the user somewhere that the client is reconnecting.
+  | ReconnectAfter ReconnectTo (IO ReconnectPolicy)
+
+-- | What server should we attempt to reconnect to?
+--
+-- * 'ReconnectToPrevious' will attempt to reconnect to the last server we
+--   attempted to connect to, whether or not that attempt was successful.
+-- * 'ReconnectToOriginal' will attempt to reconnect to the original server that
+--   'withConnection' was given.
+-- * 'ReconnectToNew' will attempt to connect to the newly specified server.
+data ReconnectTo =
+      ReconnectToPrevious
+    | ReconnectToOriginal
+    | ReconnectToNew Server
+
+-- | The default policy is 'DontReconnect'
+--
+-- The default follows the gRPC specification of Wait for Ready semantics
+-- <https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md>.
+instance Default ReconnectPolicy where
+  def = DontReconnect
+
+instance Default ReconnectTo where
+  def = ReconnectToPrevious
+
+-- | Exponential backoff
+--
+-- If the exponent is @1@, the delay interval will be the same every step;
+-- for an exponent of greater than @1@, we will wait longer each step.
+exponentialBackoff ::
+     (Int -> IO ())
+     -- ^ Execute the delay (in microseconds)
+     --
+     -- The default choice here can simply be 'threadDelay', but it is also
+     -- possible to use this to add some logging. Simple example:
+     --
+     -- > waitFor :: Int -> IO ()
+     -- > waitFor delay = do
+     -- >   putStrLn $ "Disconnected. Reconnecting after " ++ show delay ++ "μs"
+     -- >   threadDelay delay
+     -- >   putStrLn "Reconnecting now."
+  -> Double
+     -- ^ Exponent
+  -> (Double, Double)
+     -- ^ Initial delay
+  -> Word
+     -- ^ Maximum number of attempts
+  -> ReconnectPolicy
+exponentialBackoff waitFor e = go
+  where
+    go :: (Double, Double) -> Word -> ReconnectPolicy
+    go _        0 = DontReconnect
+    go (lo, hi) n = ReconnectAfter def $ do
+        delay <- randomRIO (lo, hi)
+        waitFor $ round $ delay * 1_000_000
+        return $ go (lo * e, hi * e) (pred n)
+
+{-------------------------------------------------------------------------------
+  Fatal exceptions (no point reconnecting)
+-------------------------------------------------------------------------------}
+
+isFatalException :: SomeException -> Bool
+isFatalException err
+  | Just (_tlsException :: TLSException) <- fromException err
+  = True
+
+  | otherwise
+  = False
+
+{-------------------------------------------------------------------------------
+  Server address
+-------------------------------------------------------------------------------}
+
+data Server =
+    -- | Make insecure connection (without TLS) to the given server
+    ServerInsecure Address
+
+    -- | Make secure connection (with TLS) to the given server
+  | ServerSecure ServerValidation SslKeyLog Address
+  deriving stock (Show)
+
+{-------------------------------------------------------------------------------
+  Open a new connection
+-------------------------------------------------------------------------------}
+
+-- | Open connection to the server
+--
+-- See 'Network.GRPC.Client.withRPC' for making individual RPCs on the new
+-- connection.
+--
+-- The connection to the server is set up asynchronously; the first call to
+-- 'withRPC' will block until the connection has been established.
+--
+-- If the server cannot be reached, the behaviour depends on
+-- 'connReconnectPolicy': if the policy allows reconnection attempts, we will
+-- wait the time specified by the policy and try again. This implements the gRPC
+-- "Wait for ready" semantics.
+--
+-- If the connection to the server is lost /after/ it has been established, any
+-- currently ongoing RPC calls will be closed; attempts at further communication
+-- on any of these calls will result in an exception being thrown. However, if
+-- the 'ReconnectPolicy' allows, we will automatically try to re-establish a
+-- connection to the server. This can be especially important when there is a
+-- proxy between the client and the server, which may drop an existing
+-- connection after a certain period.
+--
+-- NOTE: The /default/ 'ReconnectPolicy' is 'DontReconnect', as per the gRPC
+-- specification of "Wait for ready" semantics. You may wish to override this
+-- default.
+--
+-- Clients should prefer sending many calls on a single connection, rather than
+-- sending few calls on many connections, as minimizing the number of
+-- connections used via this interface results in better memory behavior. See
+-- [well-typed/grapesy#134](https://github.com/well-typed/grapesy/issues/133)
+-- for discussion.
+withConnection ::
+     ConnParams
+  -> Server
+  -> (Connection -> IO a)
+  -> IO a
+withConnection connParams server k = do
+    connMetaVar  <- newMVar $ Meta.init (connInitCompression connParams)
+    connStateVar <- newTVarIO ConnectionNotReady
+
+    connOutOfScope <- newEmptyMVar
+    let stayConnectedThread :: IO ()
+        stayConnectedThread =
+            stayConnected connParams server connStateVar connOutOfScope
+
+    -- We don't use withAsync because we want the thread to terminate cleanly
+    -- when we no longer need the connection (which we indicate by writing to
+    -- connOutOfScope).
+    void $ forkLabelled "grapesy:stayConnected" $ stayConnectedThread
+    k Connection {connParams, connMetaVar, connStateVar}
+      `finally` putMVar connOutOfScope ()
+
+{-------------------------------------------------------------------------------
+  Making use of the connection
+-------------------------------------------------------------------------------}
+
+-- | Get connection to the server
+--
+-- Returns two things: the connection to the server, as well as a @TMVar@ that
+-- should be monitored to see if that connection is still live.
+getConnectionToServer :: forall.
+     HasCallStack
+  => Connection
+  -> IO (TMVar (Maybe SomeException), Session.ConnectionToServer)
+getConnectionToServer Connection{connStateVar} = atomically $ do
+    connState <- readTVar connStateVar
+    case connState of
+      ConnectionNotReady              -> retry
+      ConnectionReady connClosed conn -> return (connClosed, conn)
+      ConnectionAbandoned err         -> throwSTM err
+      ConnectionOutOfScope            -> error "impossible"
+
+-- | Get outbound compression algorithm
+--
+-- This is stateful, because it depends on whether or not compression negotation
+-- has happened yet: before the remote peer has told us which compression
+-- algorithms it can support, we must use no compression.
+getOutboundCompression :: Connection -> IO (Maybe Compression)
+getOutboundCompression Connection{connMetaVar} =
+    Meta.outboundCompression <$> readMVar connMetaVar
+
+-- | Update connection metadata
+--
+-- Amongst other things, this updates the compression algorithm to be used
+-- (see also 'getOutboundCompression').
+updateConnectionMeta ::
+     Connection
+  -> ResponseHeaders' HandledSynthesized
+  -> IO ()
+updateConnectionMeta Connection{connMetaVar, connParams} hdrs =
+    modifyMVar_ connMetaVar $ Meta.update (connCompression connParams) hdrs
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary
+-------------------------------------------------------------------------------}
+
+data ConnectionState =
+    -- | We haven't set up the connection yet
+    ConnectionNotReady
+
+    -- | The connection is ready
+    --
+    -- The nested @TMVar@ is written to when the connection is closed.
+  | ConnectionReady (TMVar (Maybe SomeException)) Session.ConnectionToServer
+
+    -- | We gave up trying to (re)establish the connection
+  | ConnectionAbandoned SomeException
+
+    -- | The connection was closed because it is no longer needed.
+  | ConnectionOutOfScope
+
+-- | Connection attempt
+--
+-- This is an internal data structure used only in 'stayConnected' and helpers.
+data Attempt = ConnectionAttempt {
+      attemptParams     :: ConnParams
+    , attemptState      :: TVar ConnectionState
+    , attemptOutOfScope :: MVar ()
+    , attemptClosed     :: TMVar (Maybe SomeException)
+    }
+
+newConnectionAttempt ::
+     ConnParams
+  -> TVar ConnectionState
+  -> MVar ()
+  -> IO Attempt
+newConnectionAttempt attemptParams attemptState attemptOutOfScope = do
+    attemptClosed <- newEmptyTMVarIO
+    return ConnectionAttempt{
+        attemptParams
+      , attemptState
+      , attemptOutOfScope
+      , attemptClosed
+      }
+
+-- | Stay connected to the server
+stayConnected ::
+     ConnParams
+  -> Server
+  -> TVar ConnectionState
+  -> MVar ()
+  -> IO ()
+stayConnected connParams initialServer connStateVar connOutOfScope = do
+    loop initialServer (connReconnectPolicy connParams)
+  where
+    loop :: Server -> ReconnectPolicy -> IO ()
+    loop server remainingReconnectPolicy = do
+        -- Start new attempt (this just allocates some internal state)
+        attempt <- newConnectionAttempt connParams connStateVar connOutOfScope
+
+        -- Just like in 'runHandler' on the server side, it is important that
+        -- 'stayConnected' runs in a separate thread. If it does not, then the
+        -- moment we disconnect @http2[-tls]@ will throw an exception and we
+        -- will not get the chance to process any other messages. This is
+        -- especially important when we fail to setup a call: the server will
+        -- respond with an informative gRPC error message (which we will raise
+        -- as a 'GrpcException' in the client), and then disconnect. If we do
+        -- not call @run@ in a separate thread, the only exception we will see
+        -- is the low-level exception reported by @http2@ (something about
+        -- stream errors), rather than the informative gRPC exception we want.
+
+        mRes <- try $
+          case server of
+            ServerInsecure addr ->
+              connectInsecure connParams attempt addr
+            ServerSecure validation sslKeyLog addr ->
+              connectSecure connParams attempt validation sslKeyLog addr
+
+        thisReconnectPolicy <- atomically $ do
+          putTMVar (attemptClosed attempt) $ either Just (\() -> Nothing) mRes
+          connState <- readTVar connStateVar
+          return $ case connState of
+            ConnectionReady{}->
+              -- Suppose we have a maximum of 5x to try and connect to a server.
+              -- Then if we manage to connect, and /then/ lose the connection,
+              -- we should have those same 5x tries again.
+              connReconnectPolicy connParams
+            _otherwise ->
+              remainingReconnectPolicy
+
+        case mRes of
+          Right () -> do
+            atomically $ writeTVar connStateVar $ ConnectionOutOfScope
+          Left err -> do
+            case (isFatalException err, thisReconnectPolicy) of
+              (True, _) -> do
+                atomically $ writeTVar connStateVar $ ConnectionAbandoned err
+              (False, DontReconnect) -> do
+                atomically $ writeTVar connStateVar $ ConnectionAbandoned err
+                atomically $ writeTVar connStateVar $ ConnectionAbandoned err
+              (False, ReconnectAfter to f) -> do
+                let
+                  nextServer =
+                    case to of
+                      ReconnectToPrevious -> server
+                      ReconnectToOriginal -> initialServer
+                      ReconnectToNew new  -> new
+                atomically $ writeTVar connStateVar $ ConnectionNotReady
+                loop nextServer =<< f
+
+-- | Insecure connection (no TLS)
+connectInsecure :: ConnParams -> Attempt -> Address -> IO ()
+connectInsecure connParams attempt addr = do
+    Run.runTCPClientWithSettings
+        runSettings
+        (addressHost addr)
+        (show $ addressPort addr) $ \sock ->
+      bracket (HTTP2.Client.allocSimpleConfig sock writeBufferSize)
+              HTTP2.Client.freeSimpleConfig $ \conf ->
+        HTTP2.Client.run clientConfig conf $ \sendRequest _aux -> do
+          let conn = Session.ConnectionToServer sendRequest
+          atomically $
+            writeTVar (attemptState attempt) $
+              ConnectionReady (attemptClosed attempt) conn
+          takeMVar $ attemptOutOfScope attempt
+  where
+    ConnParams{connHTTP2Settings} = connParams
+
+    runSettings :: Run.Settings
+    runSettings = Run.defaultSettings {
+          Run.settingsOpenClientSocket = openClientSocket connHTTP2Settings
+        }
+
+    settings :: HTTP2.Client.Settings
+    settings = HTTP2.Client.defaultSettings {
+          HTTP2.Client.maxConcurrentStreams =
+              Just . fromIntegral $
+                http2MaxConcurrentStreams connHTTP2Settings
+        , HTTP2.Client.initialWindowSize =
+              fromIntegral $
+                http2StreamWindowSize connHTTP2Settings
+        }
+
+    clientConfig :: HTTP2.Client.ClientConfig
+    clientConfig = overrideRateLimits connParams $
+        HTTP2.Client.defaultClientConfig {
+            HTTP2.Client.authority = authority addr
+          , HTTP2.Client.settings = settings
+          , HTTP2.Client.connectionWindowSize =
+                fromIntegral $
+                  http2ConnectionWindowSize connHTTP2Settings
+          }
+
+-- | Secure connection (using TLS)
+connectSecure ::
+     ConnParams
+  -> Attempt
+  -> ServerValidation
+  -> SslKeyLog
+  -> Address
+  -> IO ()
+connectSecure connParams attempt validation sslKeyLog addr = do
+    keyLogger <- Util.TLS.keyLogger sslKeyLog
+    caStore   <- Util.TLS.validationCAStore validation
+
+    let settings :: HTTP2.TLS.Client.Settings
+        settings = HTTP2.TLS.Client.defaultSettings {
+              HTTP2.TLS.Client.settingsValidateCert =
+                case validation of
+                  ValidateServer _   -> True
+                  NoServerValidation -> False
+
+            , HTTP2.TLS.Client.settingsCAStore          = caStore
+            , HTTP2.TLS.Client.settingsKeyLogger        = keyLogger
+            , HTTP2.TLS.Client.settingsAddrInfoFlags    = []
+
+            , HTTP2.TLS.Client.settingsOpenClientSocket =
+                openClientSocket connHTTP2Settings
+            , HTTP2.TLS.Client.settingsConcurrentStreams = fromIntegral $
+                http2MaxConcurrentStreams connHTTP2Settings
+            , HTTP2.TLS.Client.settingsStreamWindowSize = fromIntegral $
+                http2StreamWindowSize connHTTP2Settings
+            , HTTP2.TLS.Client.settingsConnectionWindowSize = fromIntegral $
+                http2ConnectionWindowSize connHTTP2Settings
+            }
+
+        clientConfig :: HTTP2.Client.ClientConfig
+        clientConfig = overrideRateLimits connParams $
+            HTTP2.TLS.Client.defaultClientConfig
+              settings
+              (authority addr)
+
+    HTTP2.TLS.Client.runWithConfig
+          clientConfig
+          settings
+          (addressHost addr)
+          (addressPort addr)
+        $ \sendRequest _aux -> do
+      let conn = Session.ConnectionToServer sendRequest
+      atomically $
+        writeTVar (attemptState attempt) $
+          ConnectionReady (attemptClosed attempt) conn
+      takeMVar $ attemptOutOfScope attempt
+  where
+    ConnParams{connHTTP2Settings} = connParams
+
+-- | Authority
+--
+-- We omit the port number in the authority, for compatibility with TLS
+-- SNI as well as the gRPC spec (the HTTP2 spec says the port number is
+-- optional in the authority).
+authority :: Address -> String
+authority addr =
+    case addressAuthority addr of
+      Nothing   -> addressHost addr
+      Just auth -> auth
+
+-- | Override rate limits imposed by @http2@
+overrideRateLimits ::
+     ConnParams
+  -> HTTP2.Client.ClientConfig -> HTTP2.Client.ClientConfig
+overrideRateLimits connParams clientConfig = clientConfig {
+      HTTP2.Client.settings = settings {
+          HTTP2.Client.pingRateLimit =
+            case http2OverridePingRateLimit (connHTTP2Settings connParams) of
+              Nothing    -> HTTP2.Client.pingRateLimit settings
+              Just limit -> limit
+        , HTTP2.Client.emptyFrameRateLimit =
+            case http2OverrideEmptyFrameRateLimit (connHTTP2Settings connParams) of
+              Nothing    -> HTTP2.Client.emptyFrameRateLimit settings
+              Just limit -> limit
+        , HTTP2.Client.settingsRateLimit =
+            case http2OverrideSettingsRateLimit (connHTTP2Settings connParams) of
+              Nothing    -> HTTP2.Client.settingsRateLimit settings
+              Just limit -> limit
+        , HTTP2.Client.rstRateLimit =
+            case http2OverrideRstRateLimit (connHTTP2Settings connParams) of
+              Nothing    -> HTTP2.Client.rstRateLimit settings
+              Just limit -> limit
+        }
+    }
+  where
+    settings :: HTTP2.Client.Settings
+    settings = HTTP2.Client.settings clientConfig
+
+{-------------------------------------------------------------------------------
+  Auxiliary http2
+-------------------------------------------------------------------------------}
+
+openClientSocket :: HTTP2Settings -> AddrInfo -> IO Socket
+openClientSocket http2Settings =
+    Run.openClientSocketWithOpts socketOptions
+  where
+    socketOptions :: [(SocketOption, SockOptValue)]
+    socketOptions = concat [
+          [ ( NoDelay
+            , SockOptValue @Int 1
+            )
+          | http2TcpNoDelay http2Settings
+          ]
+        , [ ( Linger
+            , SockOptValue $ StructLinger { sl_onoff = 1, sl_linger = 0 }
+            )
+          | http2TcpAbortiveClose http2Settings
+          ]
+        ]
+
+-- | Write-buffer size
+--
+-- See docs of 'confBufferSize', but importantly: "this value is announced
+-- via SETTINGS_MAX_FRAME_SIZE to the peer."
+--
+-- Value of 4KB is taken from the example code.
+writeBufferSize :: HPACK.BufferSize
+writeBufferSize = 4096
diff --git a/src/Network/GRPC/Client/Meta.hs b/src/Network/GRPC/Client/Meta.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/Meta.hs
@@ -0,0 +1,78 @@
+-- | Meta-information we maintain about an open connection
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Client.Meta (Meta)
+-- > import Network.GRPC.Client.Meta qualified as Meta
+module Network.GRPC.Client.Meta (
+    -- * Definition
+    Meta(..)
+  , init
+  , update
+  ) where
+
+import Prelude hiding (init)
+
+import Control.Monad.Catch
+import Data.List.NonEmpty (NonEmpty)
+
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | Information about on open connection
+data Meta = Meta {
+      -- | Compression algorithm used for sending messages to the server
+      --
+      -- Nothing if the compression negotation has not yet happened.
+      outboundCompression :: Maybe Compression
+    }
+  deriving stock (Show)
+
+-- | Initial connection state
+init :: Maybe Compression -> Meta
+init initCompr = Meta {
+      outboundCompression = initCompr
+    }
+
+{-------------------------------------------------------------------------------
+  Update
+-------------------------------------------------------------------------------}
+
+-- | Update 'Meta' given response headers
+--
+-- Returns the updated 'Meta'.
+update ::
+     MonadThrow m
+  => Compr.Negotation -> ResponseHeaders' HandledSynthesized -> Meta -> m Meta
+update compr hdrs meta =
+    Meta
+      <$> updateCompression
+            compr
+            (responseAcceptCompression hdrs)
+            (outboundCompression meta)
+
+-- Update choice of compression, if necessary
+--
+-- We have four possibilities:
+--
+-- a. We chose from the list of server reported supported algorithms
+-- b. The server didn't report which algorithms are supported
+-- c. Compression algorithms have already been set
+-- d. We could not parse the list of compression algorithms sent by the server
+updateCompression :: forall m.
+     MonadThrow m
+  => Compr.Negotation
+  -> Either (InvalidHeaders HandledSynthesized) (Maybe (NonEmpty CompressionId))
+  -> Maybe Compression -> m (Maybe Compression)
+updateCompression negotation (Right accepted) = go
+  where
+    go :: Maybe Compression -> m (Maybe Compression)
+    go Nothing      = case Compr.choose negotation <$> accepted of
+                        Just compr -> return $ Just compr  -- (a)
+                        Nothing    -> return Nothing       -- (b)
+    go (Just compr) = return $ Just compr                  -- (c)
+updateCompression _ (Left _invalid) = return               -- (d)
diff --git a/src/Network/GRPC/Client/Session.hs b/src/Network/GRPC/Client/Session.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/Session.hs
@@ -0,0 +1,171 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Network.GRPC.Client.Session (
+    ClientSession(..)
+  , ClientInbound
+  , ClientOutbound
+  , Headers(..)
+    -- * Exceptions
+  , CallSetupFailure(..)
+  , InvalidTrailers(..)
+  ) where
+
+import Control.Exception
+import Data.Proxy
+import Data.Void
+import Network.HTTP.Types qualified as HTTP
+
+import Network.GRPC.Client.Connection (Connection, ConnParams(..))
+import Network.GRPC.Client.Connection qualified as Connection
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Common.Headers
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Serialization
+import Network.GRPC.Util.Session
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+data ClientSession rpc = ClientSession {
+      clientConnection :: Connection
+    }
+
+{-------------------------------------------------------------------------------
+  Instances
+-------------------------------------------------------------------------------}
+
+data ClientInbound rpc
+data ClientOutbound rpc
+
+instance IsRPC rpc => DataFlow (ClientInbound rpc) where
+  data Headers (ClientInbound rpc) = InboundHeaders {
+        inbHeaders     :: ResponseHeaders' HandledSynthesized
+      , inbCompression :: Compression
+      }
+    deriving (Show)
+
+  type Message    (ClientInbound rpc) = (InboundMeta, Output rpc)
+  type Trailers   (ClientInbound rpc) = ProperTrailers'
+  type NoMessages (ClientInbound rpc) = TrailersOnly' HandledSynthesized
+
+instance IsRPC rpc => DataFlow (ClientOutbound rpc) where
+  data Headers (ClientOutbound rpc) = OutboundHeaders {
+        outHeaders     :: RequestHeaders
+      , outCompression :: Compression
+      }
+    deriving (Show)
+
+  type Message  (ClientOutbound rpc) = (OutboundMeta, Input rpc)
+  type Trailers (ClientOutbound rpc) = NoMetadata
+
+  -- gRPC does not support a Trailers-Only case for requests
+  -- (indeed, does not support request trailers at all).
+  type NoMessages (ClientOutbound rpc) = Void
+
+instance SupportsClientRpc rpc => IsSession (ClientSession rpc) where
+  type Inbound  (ClientSession rpc) = ClientInbound  rpc
+  type Outbound (ClientSession rpc) = ClientOutbound rpc
+
+  buildOutboundTrailers _ = \NoMetadata -> []
+  parseInboundTrailers  _ = \trailers ->
+      if null trailers then
+        -- Although we parse the trailers in a lenient fashion (like all
+        -- headers), only throwing errors for headers that we really need, if we
+        -- get no trailers at /all/, then most likely something has gone wrong;
+        -- for example, perhaps an intermediate cache has dropped the gRPC
+        -- trailers entirely. We therefore check for this case separately and
+        -- throw a different error.
+        --
+        -- We /must/ throw a GrpcException (rather than some kind of custom one)
+        -- because the spec mandates that we synthesize a status and status
+        -- message when the peer omits them.
+        throwIO $ GrpcException {
+            grpcError         = GrpcUnknown
+          , grpcErrorMessage  = Just "Call closed without trailers"
+          , grpcErrorDetails  = Nothing
+          , grpcErrorMetadata = []
+          }
+      else
+        return $ parseProperTrailers' (Proxy @rpc) trailers
+
+  parseMsg _ = parseOutput (Proxy @rpc) . inbCompression
+  buildMsg _ = buildInput  (Proxy @rpc) . outCompression
+
+instance SupportsClientRpc rpc => InitiateSession (ClientSession rpc) where
+  parseResponse (ClientSession conn) (ResponseInfo status headers body) =
+      case classifyServerResponse (Proxy @rpc) status headers body of
+        Left parsed -> do
+          trailersOnly <- throwSynthesized throwIO parsed
+          -- We classify the response as Trailers-Only if the grpc-status header
+          -- is present, or when the HTTP status is anything other than 200 OK
+          -- (which we treat, as per the spec, as an implicit grpc-status).
+          -- The "closed without trailers" case is therefore not relevant.
+          case verifyAllIf connVerifyHeaders trailersOnly of
+            Left  err   -> throwIO $ CallSetupInvalidResponseHeaders err
+            Right _hdrs -> return $ FlowStartNoMessages trailersOnly
+        Right parsed -> do
+          responseHeaders <- throwSynthesized throwIO parsed
+          case verifyAllIf connVerifyHeaders responseHeaders of
+            Left  err  -> throwIO $ CallSetupInvalidResponseHeaders err
+            Right hdrs -> do
+              Connection.updateConnectionMeta conn responseHeaders
+              cIn <- getCompression $ requiredResponseCompression hdrs
+              return $ FlowStartRegular $ InboundHeaders {
+                  inbHeaders     = responseHeaders
+                , inbCompression = cIn
+                }
+    where
+      ConnParams{
+          connCompression
+        , connVerifyHeaders
+        } = Connection.connParams conn
+
+      getCompression :: Maybe CompressionId -> IO Compression
+      getCompression Nothing    = return noCompression
+      getCompression (Just cid) =
+          case Compr.getSupported connCompression cid of
+            Just compr -> return compr
+            Nothing    -> throwIO $ CallSetupUnsupportedCompression cid
+
+  buildRequestInfo _ start = RequestInfo {
+        requestMethod  = rawMethod resourceHeaders
+      , requestPath    = rawPath resourceHeaders
+      , requestHeaders = buildRequestHeaders (Proxy @rpc) $
+            case start of
+              FlowStartRegular    headers    -> outHeaders headers
+              FlowStartNoMessages impossible -> absurd impossible
+      }
+    where
+      resourceHeaders :: RawResourceHeaders
+      resourceHeaders = buildResourceHeaders $ ResourceHeaders {
+            resourceMethod = Post
+          , resourcePath   = rpcPath (Proxy @rpc)
+          }
+
+instance NoTrailers (ClientSession rpc) where
+  noTrailers _ = NoMetadata
+
+{-------------------------------------------------------------------------------
+  Exceptions
+-------------------------------------------------------------------------------}
+
+data CallSetupFailure =
+    -- | Server chose an unsupported compression algorithm
+    CallSetupUnsupportedCompression CompressionId
+
+    -- | We failed to parse the response headers
+  | CallSetupInvalidResponseHeaders (InvalidHeaders HandledSynthesized)
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | We failed to parse the response trailers
+data InvalidTrailers =
+    -- | Some of the trailers could not be parsed
+    InvalidTrailers {
+        invalidTrailers      :: [HTTP.Header]
+      , invalidTrailersError :: String
+      }
+  deriving stock (Show)
+  deriving anyclass (Exception)
diff --git a/src/Network/GRPC/Client/StreamType.hs b/src/Network/GRPC/Client/StreamType.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/StreamType.hs
@@ -0,0 +1,264 @@
+-- | Client handlers
+--
+-- This is an internal module only; see "Network.GRPC.Client.StreamType.IO"
+-- for the main public module.
+module Network.GRPC.Client.StreamType (
+    -- * Handler type
+    ClientHandler' -- opaque
+  , ClientHandler
+    -- * Run client handlers (part of the public API)
+  , nonStreaming
+  , clientStreaming
+  , clientStreaming_
+  , serverStreaming
+  , biDiStreaming
+    -- * Obtain handler for a specific type
+  , CanCallRPC(..)
+  , rpc
+  , rpcWith
+  ) where
+
+import Control.Monad.Catch
+import Control.Monad.IO.Class
+import Control.Monad.Reader
+import Data.Proxy
+
+import Network.GRPC.Client.Call
+import Network.GRPC.Client.Connection
+import Network.GRPC.Common
+import Network.GRPC.Common.NextElem qualified as NextElem
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Spec
+
+{------------------------------------------------------------------------------
+  Constructing client handlers (used internally only)
+-------------------------------------------------------------------------------}
+
+mkNonStreaming :: forall rpc m.
+     SupportsStreamingType rpc NonStreaming
+  => (    Input rpc
+       -> m (Output rpc)
+     )
+  -> ClientHandler' NonStreaming m rpc
+mkNonStreaming h = ClientHandler $
+    h
+
+mkClientStreaming :: forall rpc m.
+     SupportsStreamingType rpc ClientStreaming
+  => ( forall r.
+          (    (NextElem (Input rpc) -> IO ())
+             -> m r
+          )
+       -> m (Output rpc, r)
+     )
+  -> ClientHandler' ClientStreaming m rpc
+mkClientStreaming h = ClientHandler $
+    Negative h
+
+mkServerStreaming :: forall rpc m.
+     (SupportsStreamingType rpc ServerStreaming, Functor m)
+  => ( forall r.
+            Input rpc
+         -> (    IO (NextElem (Output rpc))
+              -> m r
+            )
+         -> m r
+     )
+  -> ClientHandler' ServerStreaming m rpc
+mkServerStreaming h = ClientHandler $ \input ->
+    Negative $ \k -> ((),) <$> h input k
+
+mkBiDiStreaming :: forall rpc m.
+     (SupportsStreamingType rpc BiDiStreaming, Functor m)
+  => ( forall r.
+           (    (NextElem (Input rpc) -> IO ())
+             -> IO (NextElem (Output rpc))
+             -> m r
+           )
+        -> m r
+     )
+  -> ClientHandler' BiDiStreaming m rpc
+mkBiDiStreaming h = ClientHandler $
+    Negative $ \k -> fmap ((),) $ h (curry k)
+
+{-------------------------------------------------------------------------------
+  Running client handlers
+-------------------------------------------------------------------------------}
+
+-- | Execute non-streaming handler in any monad stack
+nonStreaming :: forall rpc m.
+     ClientHandler' NonStreaming m rpc
+  -> Input rpc
+  -> m (Output rpc)
+nonStreaming (ClientHandler h) = h
+
+-- | Generalization of 'clientStreaming_' with an additional result
+clientStreaming :: forall rpc m r.
+     ClientHandler' ClientStreaming m rpc
+  -> (  (NextElem (Input rpc) -> IO ())
+       -> m r
+     )
+  -> m (Output rpc, r)
+clientStreaming (ClientHandler h) k = runNegative h k
+
+-- | Execute client-side streaming handler in any monad stack
+clientStreaming_ :: forall rpc m.
+     Functor m
+  => ClientHandler' ClientStreaming m rpc
+  -> (    (NextElem (Input rpc) -> IO ())
+       -> m ()
+     )
+  -> m (Output rpc)
+clientStreaming_ h k = fst <$> clientStreaming h k
+
+-- | Execute server-side streaming handler in any monad stack
+serverStreaming :: forall rpc m r.
+     Functor m
+  => ClientHandler' ServerStreaming m rpc
+  -> Input rpc
+  -> (    IO (NextElem (Output rpc))
+       -> m r
+     )
+  -> m r
+serverStreaming (ClientHandler h) input k = snd <$> runNegative (h input) k
+
+-- | Execute bidirectional streaming handler in any monad stack
+biDiStreaming :: forall rpc m r.
+     Functor m
+  => ClientHandler' BiDiStreaming m rpc
+  -> (    (NextElem (Input rpc) -> IO ())
+       -> IO (NextElem (Output rpc))
+       -> m r
+     )
+  -> m r
+biDiStreaming (ClientHandler h) k = fmap snd $ runNegative h $ uncurry k
+
+{-------------------------------------------------------------------------------
+  CanCallRPC
+-------------------------------------------------------------------------------}
+
+-- | Monads in which we make RPC calls
+--
+-- In order to be able to make an RPC call, we need
+--
+-- * 'MonadIO' (obviously)
+-- * 'MonadMask' in order to ensure that the RPC call is terminated cleanly
+-- * Access to the 'Connection' to the server
+class (MonadIO m, MonadMask m) => CanCallRPC m where
+  getConnection :: m Connection
+
+instance (MonadIO m, MonadMask m) => CanCallRPC (ReaderT Connection m) where
+  getConnection = ask
+
+{-------------------------------------------------------------------------------
+  Obtain handler for specific RPC call
+-------------------------------------------------------------------------------}
+
+class MkStreamingHandler (styp :: StreamingType) where
+  mkStreamingHandler ::
+       ( CanCallRPC m
+       , SupportsClientRpc rpc
+       , SupportsStreamingType rpc styp
+       )
+    => CallParams rpc -> ClientHandler' styp m rpc
+
+-- | Construct RPC handler
+--
+-- This has an ambiguous type, and is intended to be called using a type
+-- application indicating the @rpc@ method to call, such as
+--
+-- > rpc @Ping
+--
+-- provided that @Ping@ is some type with an 'IsRPC' instance. In some cases
+-- it may also be needed to provide a streaming type:
+--
+-- > rpc @Ping @NonStreaming
+--
+-- though in most cases the streaming type should be clear from the context or
+-- from the choice of @rpc@.
+--
+-- See 'Network.GRPC.Client.StreamType.IO.nonStreaming' and co for examples.
+-- See also 'rpcWith'.
+rpc :: forall rpc styp m.
+     ( CanCallRPC m
+     , SupportsClientRpc rpc
+     , SupportsStreamingType rpc styp
+     , Default (RequestMetadata rpc)
+     )
+  => ClientHandler' styp m rpc
+rpc = rpcWith def
+
+-- | Generalization of 'rpc' with custom 'CallParams'
+rpcWith :: forall rpc styp m.
+     ( CanCallRPC m
+     , SupportsClientRpc rpc
+     , SupportsStreamingType rpc styp
+     )
+  => CallParams rpc -> ClientHandler' styp m rpc
+rpcWith =
+    case validStreamingType (Proxy @styp) of
+      SNonStreaming    -> mkStreamingHandler
+      SClientStreaming -> mkStreamingHandler
+      SServerStreaming -> mkStreamingHandler
+      SBiDiStreaming   -> mkStreamingHandler
+
+instance MkStreamingHandler NonStreaming where
+  mkStreamingHandler :: forall rpc m.
+       ( CanCallRPC m
+       , SupportsClientRpc rpc
+       , SupportsStreamingType rpc NonStreaming
+       )
+    => CallParams rpc -> ClientHandler' NonStreaming m rpc
+  mkStreamingHandler params = mkNonStreaming $ \input -> do
+      conn <- getConnection
+      withRPC conn params (Proxy @rpc) $ \call -> do
+        sendFinalInput call input
+        (output, _trailers) <- recvFinalOutput call
+        return output
+
+instance MkStreamingHandler ClientStreaming where
+  mkStreamingHandler :: forall rpc m.
+       ( CanCallRPC m
+       , SupportsClientRpc rpc
+       , SupportsStreamingType rpc ClientStreaming
+       )
+    => CallParams rpc -> ClientHandler' ClientStreaming m rpc
+  mkStreamingHandler params = mkClientStreaming $ \k -> do
+      conn <- getConnection
+      withRPC conn params (Proxy @rpc) $ \call -> do
+        r <- k (sendInput call . fromNextElem)
+        (output, _trailers) <- recvFinalOutput call
+        return (output, r)
+
+instance MkStreamingHandler ServerStreaming where
+  mkStreamingHandler :: forall rpc m.
+       ( CanCallRPC m
+       , SupportsClientRpc rpc
+       , SupportsStreamingType rpc ServerStreaming
+       )
+    => CallParams rpc -> ClientHandler' ServerStreaming m rpc
+  mkStreamingHandler params = mkServerStreaming $ \input k -> do
+      conn <- getConnection
+      withRPC conn params (Proxy @rpc) $ \call -> do
+        sendFinalInput call input
+        k (recvNextOutputElem call)
+
+instance MkStreamingHandler BiDiStreaming where
+  mkStreamingHandler :: forall rpc m.
+       ( CanCallRPC m
+       , SupportsClientRpc rpc
+       , SupportsStreamingType rpc BiDiStreaming
+       )
+    => CallParams rpc -> ClientHandler' BiDiStreaming m rpc
+  mkStreamingHandler params = mkBiDiStreaming $ \k -> do
+      conn <- getConnection
+      withRPC conn params (Proxy @rpc) $ \call ->
+        k (sendInput call . fromNextElem)
+          (recvNextOutputElem call)
+
+{-------------------------------------------------------------------------------
+  Internal: dealing with metadata
+-------------------------------------------------------------------------------}
+
+fromNextElem :: NextElem inp -> StreamElem NoMetadata inp
+fromNextElem = NextElem.toStreamElem NoMetadata
diff --git a/src/Network/GRPC/Client/StreamType/CanCallRPC.hs b/src/Network/GRPC/Client/StreamType/CanCallRPC.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/StreamType/CanCallRPC.hs
@@ -0,0 +1,16 @@
+-- | Like "Network.GRPC.Client.StreamType.IO", but with an implicit 'Connection'
+--
+-- These functions are useful in a monad stack in which the 'Connection' object
+-- is implicitly available; you must provide an instance of 'CanCallRPC'.
+module Network.GRPC.Client.StreamType.CanCallRPC (
+    CanCallRPC(..)
+    -- * Running client handlers
+  , nonStreaming
+  , clientStreaming
+  , clientStreaming_
+  , serverStreaming
+  , biDiStreaming
+  ) where
+
+import Network.GRPC.Client.StreamType
+
diff --git a/src/Network/GRPC/Client/StreamType/Conduit.hs b/src/Network/GRPC/Client/StreamType/Conduit.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/StreamType/Conduit.hs
@@ -0,0 +1,94 @@
+-- | [Conduit](https://hackage.haskell.org/package/conduit) interface
+module Network.GRPC.Client.StreamType.Conduit (
+    -- * Run client handlers
+    clientStreaming
+  , clientStreaming_
+  , serverStreaming
+  , biDiStreaming
+  ) where
+
+import Control.Monad.Reader
+import Data.Conduit
+import Data.ProtoLens.Service.Types
+
+import Network.GRPC.Client
+import Network.GRPC.Client.StreamType.IO qualified as IO
+import Network.GRPC.Common
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Conduits for different kinds of streaming types (communication patterns)
+-------------------------------------------------------------------------------}
+
+clientStreaming ::
+     MonadIO m
+  => Connection
+  -> ClientHandler' ClientStreaming (ReaderT Connection m) rpc
+  -> (    ConduitT (Input rpc) Void m ()
+       -> m r
+     )
+  -> m (Output rpc, r)
+clientStreaming conn h k =
+    IO.clientStreaming conn h $ \send ->
+      k $ toSink send
+
+clientStreaming_ ::
+     MonadIO m
+  => Connection
+  -> ClientHandler' ClientStreaming (ReaderT Connection m) rpc
+  -> (    ConduitT (Input rpc) Void m ()
+       -> m ()
+     )
+  -> m (Output rpc)
+clientStreaming_ conn h k =
+    fst <$> clientStreaming conn h k
+
+serverStreaming ::
+     MonadIO m
+  => Connection
+  -> ClientHandler' ServerStreaming (ReaderT Connection m) rpc
+  -> Input rpc
+  -> (    ConduitT () (Output rpc) m ()
+       -> m r
+     )
+  -> m r
+serverStreaming conn h input k =
+    IO.serverStreaming conn h input $ \recv ->
+      k $ toSource recv
+
+biDiStreaming :: forall rpc m r.
+     MonadIO m
+  => Connection
+  -> ClientHandler' BiDiStreaming (ReaderT Connection m) rpc
+  -> (    ConduitT (Input rpc) Void         m ()
+       -> ConduitT ()          (Output rpc) m ()
+       -> m r
+     )
+  -> m r
+biDiStreaming conn h k =
+    IO.biDiStreaming conn h $ \send recv ->
+      k (toSink send) (toSource recv)
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary: conduit
+-------------------------------------------------------------------------------}
+
+toSource :: forall m a. Monad m => m (NextElem a) -> ConduitT () a m ()
+toSource f = loop
+  where
+    loop :: ConduitT () a m ()
+    loop = do
+        ma <- lift f
+        case ma of
+          NoNextElem -> return ()
+          NextElem a -> yield a >> loop
+
+toSink :: forall m a. Monad m => (NextElem a -> m ()) -> ConduitT a Void m ()
+toSink f = loop
+  where
+    loop :: ConduitT a Void m ()
+    loop = do
+        ma <- await
+        case ma of
+          Nothing -> lift (f $ NoNextElem)
+          Just a  -> lift (f $ NextElem a) >> loop
diff --git a/src/Network/GRPC/Client/StreamType/IO.hs b/src/Network/GRPC/Client/StreamType/IO.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/StreamType/IO.hs
@@ -0,0 +1,127 @@
+-- | Execute handlers for specific communication patterns
+--
+-- See also "Network.GRPC.Common.StreamType" as well as
+-- "Network.GRPC.Client.StreamType.CanCallRPC".
+module Network.GRPC.Client.StreamType.IO (
+    nonStreaming
+  , clientStreaming
+  , clientStreaming_
+  , serverStreaming
+  , biDiStreaming
+  ) where
+
+import Control.Monad.Reader
+
+import Network.GRPC.Client
+import Network.GRPC.Client.StreamType.CanCallRPC qualified as CanCallRPC
+import Network.GRPC.Common
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Run client handlers
+
+  We piggy-back on the definitions for a general monad stack with an instance of
+  'CanCallRPC', but /run/ in a 'ReaderT' monad stack which satisfies that
+  constraint. The caller can then just provide an explicit 'Connection'.
+-------------------------------------------------------------------------------}
+
+-- | Make a non-streaming RPC
+--
+-- Example usage:
+--
+-- > type GetFeature = Protobuf RouteGuide "getFeature"
+-- >
+-- > getFeature :: Connection -> Point -> IO ()
+-- > getFeature conn point = do
+-- >     features <- nonStreaming conn (rpc @GetFeature) point
+-- >     print features
+nonStreaming :: forall rpc m.
+     Connection
+  -> ClientHandler' NonStreaming (ReaderT Connection m) rpc
+  -> Input rpc
+  -> m (Output rpc)
+nonStreaming conn h input = flip runReaderT conn $
+    CanCallRPC.nonStreaming h input
+
+-- | Generalization of 'clientStreaming_' with an additional result.
+clientStreaming :: forall rpc m r.
+     MonadIO m
+  => Connection
+  -> ClientHandler' ClientStreaming (ReaderT Connection m) rpc
+  -> (    (NextElem (Input rpc) -> m ())
+       -> m r
+     )
+  -> m (Output rpc, r)
+clientStreaming conn h k = flip runReaderT conn $
+    CanCallRPC.clientStreaming h $ \send -> lift $
+      k (liftIO . send)
+
+-- | Make a client-side streaming RPC
+--
+-- Example usage:
+--
+-- > type RecordRoute = Protobuf RouteGuide "recordRoute"
+-- >
+-- > recordRoute :: Connection -> [Point] -> IO ()
+-- > recordRoute conn points = do
+-- >     summary <- clientStreaming_ conn (rpc @RecordRoute) $ \send ->
+-- >                  forM_ points send
+-- >     print summary
+clientStreaming_ :: forall rpc m.
+     MonadIO m
+  => Connection
+  -> ClientHandler' ClientStreaming (ReaderT Connection m) rpc
+  -> (   (NextElem (Input rpc) -> m ())
+       -> m ()
+     )
+  -> m (Output rpc)
+clientStreaming_ conn h k = fst <$> clientStreaming conn h k
+
+-- | Make a server-side streaming RPC
+--
+-- Example usage:
+--
+-- > type ListFeatures = Protobuf RouteGuide "listFeatures"
+-- >
+-- > listFeatures :: Connection -> Rectangle -> IO ()
+-- > listFeatures conn rect =
+-- >     serverStreaming conn (rpc @ListFeatures) rect $ \recv ->
+-- >       whileJust_ recv print
+serverStreaming :: forall rpc m r.
+     MonadIO m
+  => Connection
+  -> ClientHandler' ServerStreaming (ReaderT Connection m) rpc
+  -> Input rpc
+  -> (    m (NextElem (Output rpc))
+       -> m r
+     )
+  -> m r
+serverStreaming conn h input k = flip runReaderT conn $
+    CanCallRPC.serverStreaming h input $ \recv -> lift $
+      k (liftIO recv)
+
+-- | Make a bidirectional RPC
+--
+-- Example usage:
+--
+-- > type RouteChat = Protobuf RouteGuide "routeChat"
+-- >
+-- > routeChat :: Connection -> [RouteNote] -> IO ()
+-- > routeChat conn notes =
+-- >     biDiStreaming conn (rpc @RouteChat) $ \send recv ->
+-- >       forM_ notes $ \note -> do
+-- >         send note
+-- >         print =<< recv
+biDiStreaming :: forall rpc m r.
+     MonadIO m
+  => Connection
+  -> ClientHandler' BiDiStreaming (ReaderT Connection m) rpc
+  -> (    (NextElem (Input rpc) -> m ())
+       -> m (NextElem (Output rpc))
+       -> m r
+     )
+  -> m r
+biDiStreaming conn h k = flip runReaderT conn $
+    CanCallRPC.biDiStreaming h $ \send recv -> lift $
+      k (liftIO . send) (liftIO recv)
diff --git a/src/Network/GRPC/Client/StreamType/IO/Binary.hs b/src/Network/GRPC/Client/StreamType/IO/Binary.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Client/StreamType/IO/Binary.hs
@@ -0,0 +1,107 @@
+-- | Wrap "Network.GRPC.Client.StreamType.IO" to handle binary serialization
+--
+-- **NOTE**: The custom binary gRPC format provided by @grapesy@ is designed
+-- so that the type of each message during communication can be different.
+-- The wrappers in this module lose this generalization: every input and every
+-- output must be of the same type. If this is too severe a limitaiton, you
+-- should use the functionality from "Network.GRPC.Client.Binary" instead.
+module Network.GRPC.Client.StreamType.IO.Binary (
+    -- * Run client handlers
+    nonStreaming
+  , clientStreaming
+  , clientStreaming_
+  , serverStreaming
+  , biDiStreaming
+  ) where
+
+import Control.Monad.Reader
+import Data.Binary
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+
+import Network.GRPC.Client (Connection)
+import Network.GRPC.Client.StreamType.IO qualified as IO
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary (decodeOrThrow)
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Run client handlers
+-------------------------------------------------------------------------------}
+
+-- | Wrapper for 'IO.nonStreaming' that handles binary serialization
+nonStreaming :: forall inp out rpc m.
+     ( Binary inp, Input  rpc ~ Lazy.ByteString
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => Connection
+  -> ClientHandler' NonStreaming (ReaderT Connection m) rpc
+  -> inp -> m out
+nonStreaming conn h inp =
+    IO.nonStreaming conn h (encode inp) >>= decodeOrThrow
+
+-- | Wrapper for 'IO.clientStreaming' that handles binary serialization
+clientStreaming :: forall inp out rpc m r.
+     ( Binary inp, Input  rpc ~ Lazy.ByteString
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => Connection
+  -> ClientHandler' ClientStreaming (ReaderT Connection m) rpc
+  -> (    (NextElem inp -> m ())
+       -> m r
+     )
+  -> m (out, r)
+clientStreaming conn h k = do
+    (out, r) <- IO.clientStreaming conn h $ \send -> k (send . fmap encode)
+    (, r) <$> decodeOrThrow out
+
+-- | Wrapper for 'IO.clientStreaming_' that handles binary serialization
+clientStreaming_ :: forall inp out rpc m.
+     ( Binary inp, Input  rpc ~ Lazy.ByteString
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => Connection
+  -> ClientHandler' ClientStreaming (ReaderT Connection m) rpc
+  -> (   (NextElem inp -> m ())
+       -> m ()
+     )
+  -> m out
+clientStreaming_ conn h k = fst <$> clientStreaming conn h k
+
+-- | Wrapper for 'IO.serverStreaming' that binary serialization
+serverStreaming :: forall inp out rpc m r.
+     ( Binary inp, Input  rpc ~ Lazy.ByteString
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => Connection
+  -> ClientHandler' ServerStreaming (ReaderT Connection m) rpc
+  -> inp
+  -> (    m (NextElem out)
+       -> m r
+     )
+  -> m r
+serverStreaming conn h inp k =
+    IO.serverStreaming conn h (encode inp) $ \recv ->
+      k (traverse decodeOrThrow =<< recv)
+
+-- | Wrapper for 'IO.biDiStreaming' that handles binary serialization
+biDiStreaming :: forall inp out rpc m r.
+     ( Binary inp, Input  rpc ~ Lazy.ByteString
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => Connection
+  -> ClientHandler' BiDiStreaming (ReaderT Connection m) rpc
+  -> (    (NextElem inp -> m ())
+       -> m (NextElem out)
+       -> m r
+     )
+  -> m r
+biDiStreaming conn h k =
+    IO.biDiStreaming conn h $ \send recv ->
+      k (send . fmap encode)
+        (traverse decodeOrThrow =<< recv)
diff --git a/src/Network/GRPC/Common.hs b/src/Network/GRPC/Common.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common.hs
@@ -0,0 +1,151 @@
+-- | General infrastructure used by both the client and the server
+--
+-- Intended for unqualified import.
+module Network.GRPC.Common (
+    -- * Abstraction over different serialization formats
+    IsRPC(..)
+  , Input
+  , Output
+  , SupportsClientRpc(..)
+  , SupportsServerRpc(..)
+  , defaultRpcContentType
+
+    -- * Stream elements
+    --
+    -- We export only the main type here; for operations on 'StreamElem', see
+    -- "Network.GRPC.Common.StreamElem" (intended for qualified import).
+  , StreamElem(..)
+  , NextElem(..)
+
+    -- * Custom metadata
+    --
+    -- Clients can include custom metadata in the initial request to the server,
+    -- and servers can include custom metadata boh in the initial response to
+    -- the client as well as in the response trailers.
+  , CustomMetadata(CustomMetadata)
+  , customMetadataName
+  , customMetadataValue
+  , HeaderName(BinaryHeader, AsciiHeader)
+  , NoMetadata(..)
+    -- ** Typed
+  , RequestMetadata
+  , ResponseInitialMetadata
+  , ResponseTrailingMetadata
+  , ResponseMetadata(..)
+    -- ** Serialization
+  , BuildMetadata(..)
+  , ParseMetadata(..)
+  , StaticMetadata(..)
+
+    -- * Configuration
+  , SslKeyLog(..)
+
+  -- * HTTP\/2 Settings
+  , HTTP2Settings(..)
+
+    -- * Defaults
+  , defaultInsecurePort
+  , defaultSecurePort
+  , defaultHTTP2Settings
+
+    -- * Message metadata
+  , OutboundMeta(..)
+  , InboundMeta(..)
+
+    -- * Exceptions
+
+    -- ** gRPC status and exceptions
+  , GrpcStatus(..)
+  , GrpcError(..)
+  , GrpcException(..)
+  , throwGrpcError
+
+    -- ** Low-level
+  , ProtocolException(..)
+  , Session.ChannelDiscarded(..)
+  , Session.PeerException(..)
+  , SomeProtocolException(..)
+  , UnexpectedMetadata(..)
+  , InvalidHeaders(..)
+  , InvalidHeader(..)
+  , invalidHeaders
+  , HandledSynthesized
+
+    -- ** User errors
+  , Session.SendAfterFinal(..)
+  , Session.RecvAfterFinal(..)
+
+    -- * Convenience re-exports
+  , Proxy(..)
+  , Default(..)
+  ) where
+
+import Data.Default
+import Data.Proxy
+import Network.Socket (PortNumber)
+
+import Control.Exception
+
+import Network.GRPC.Common.HTTP2Settings
+import Network.GRPC.Common.StreamElem (StreamElem(..))
+import Network.GRPC.Spec
+import Network.GRPC.Util.Session qualified as Session
+import Network.GRPC.Util.TLS
+
+{-------------------------------------------------------------------------------
+  Defaults
+-------------------------------------------------------------------------------}
+
+-- | Default port number for insecure servers
+--
+-- By convention, @50051@ is often used as the default port for gRPC servers.
+defaultInsecurePort :: PortNumber
+defaultInsecurePort = 50051
+
+-- | Default port number for secure servers (50052)
+--
+-- Unlike 'defaultInsecurePort', this is a @grapesy@ internal convention: we use
+-- @50052@ as the defualt port for secure gRPC servers.
+defaultSecurePort :: PortNumber
+defaultSecurePort = 50052
+
+{-------------------------------------------------------------------------------
+  Exceptions
+-------------------------------------------------------------------------------}
+
+-- | Protocol exception
+--
+-- A protocol exception arises when the client and the server disagree on the
+-- sequence of inputs and outputs exchanged. This agreement might be part of a
+-- formal specification such as Protobuf, or it might be implicit in the
+-- implementation of a specific RPC.
+data ProtocolException rpc =
+    -- | We expected an input but got none
+    TooFewInputs
+
+    -- | We received an input when we expected no more inputs
+  | TooManyInputs (Input rpc)
+
+    -- | We expected an output, but got trailers instead
+  | TooFewOutputs (ResponseTrailingMetadata rpc)
+
+    -- | We expected trailers, but got an output instead
+  | TooManyOutputs (Output rpc)
+
+    -- | The server unexpectedly used the Trailers-Only case
+  | UnexpectedTrailersOnly (ResponseTrailingMetadata rpc)
+
+deriving stock instance IsRPC rpc => Show (ProtocolException rpc)
+
+-- | Existential wrapper around 'ProtocolException'
+--
+-- This makes it easier to catch these exceptions (without this, you'd have to
+-- catch the exception for a /specific/ instance of @rpc@).
+data SomeProtocolException where
+    ProtocolException :: forall rpc.
+         IsRPC rpc
+      => ProtocolException rpc
+      -> SomeProtocolException
+
+deriving stock    instance Show SomeProtocolException
+deriving anyclass instance Exception SomeProtocolException
diff --git a/src/Network/GRPC/Common/Binary.hs b/src/Network/GRPC/Common/Binary.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/Binary.hs
@@ -0,0 +1,48 @@
+-- | Binary RPC
+--
+-- Intended for unqualified import.
+module Network.GRPC.Common.Binary (
+    RawRpc
+    -- * Encoding and decoding
+  , encode
+  , decodeOrThrow
+  , DecodeException(..)
+  ) where
+
+import Control.Exception
+import Control.Monad.IO.Class
+import Data.Binary
+import Data.Binary.Get qualified as Binary
+import Data.ByteString.Lazy qualified as BS.Lazy
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Decoding
+-------------------------------------------------------------------------------}
+
+decodeOrThrow :: (MonadIO m, Binary a) => Lazy.ByteString -> m a
+decodeOrThrow bs = liftIO $
+    case decodeOrFail bs of
+      Left (unconsumed, consumed, errorMessage) ->
+        throwIO $ DecodeException{unconsumed, consumed, errorMessage}
+      Right (unconsumed, consumed, a) ->
+        if BS.Lazy.null unconsumed then
+          return a
+        else do
+          let errorMessage = "Not all bytes consumed"
+          throwIO $ DecodeException{unconsumed, consumed, errorMessage}
+
+data DecodeException =
+    DecodeException {
+        unconsumed   :: Lazy.ByteString
+      , consumed     :: Binary.ByteOffset
+      , errorMessage :: String
+      }
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+
+
+
diff --git a/src/Network/GRPC/Common/Compression.hs b/src/Network/GRPC/Common/Compression.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/Compression.hs
@@ -0,0 +1,106 @@
+-- | Public 'Compression' API
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Common.Compression (Compression(..))
+-- > import Network.GRPC.Common.Compression qualified as Compr
+module Network.GRPC.Common.Compression (
+    -- * Definition
+    Compression(..)
+  , CompressionId(..)
+    -- * Standard compression schemes
+  , gzip
+  , allSupportedCompression
+    -- * Negotation
+  , Negotation(..)
+  , getSupported
+    -- ** Specific negotation strategies
+  , none
+  , chooseFirst
+  , only
+  , insist
+  ) where
+
+import Data.Default
+import Data.Foldable (toList)
+import Data.List.NonEmpty (NonEmpty(..))
+import Data.List.NonEmpty qualified as NE
+import Data.Map (Map)
+import Data.Map qualified as Map
+
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Negotation
+-------------------------------------------------------------------------------}
+
+-- | Compression negotation
+data Negotation = Negotation {
+      -- | Which algorithms should be offered (in this order) to the peer?
+      --
+      -- This should normally always include 'Identity' (see 'choose');
+      -- but see 'insist'.
+      offer :: NonEmpty CompressionId
+
+      -- | Choose compression algorithm
+      --
+      -- We will run this only once per open connection, when the server first
+      -- tells us their list of supported compression algorithms. Unless
+      -- compression negotation has taken place, no compression should be used.
+      --
+      -- This cannot fail: the least common denominator is to use no
+      -- compression. This must be allowed, because the gRPC specification
+      -- /anyway/ allows a per-message flag to indicate whether the message
+      -- is compressed or not; thus, even if a specific compression algorithm
+      -- is negotiated, there is no guarantee anything is compressed.
+    , choose :: NonEmpty CompressionId -> Compression
+
+      -- | All supported compression algorithms
+    , supported :: Map CompressionId Compression
+    }
+
+-- | Map 'CompressionId' to 'Compression' for supported algorithms
+getSupported :: Negotation -> CompressionId -> Maybe Compression
+getSupported compr cid = Map.lookup cid (supported compr)
+
+instance Default Negotation where
+  def = chooseFirst allSupportedCompression
+
+-- | Disable all compression
+none :: Negotation
+none = insist noCompression
+
+-- | Choose the first algorithm that appears in the list of peer supported
+--
+-- Precondition: the list should include the identity.
+chooseFirst :: NonEmpty Compression -> Negotation
+chooseFirst ourSupported = Negotation {
+      offer =
+        fmap compressionId ourSupported
+    , choose = \peerSupported ->
+        let peerSupports :: Compression -> Bool
+            peerSupports = (`elem` peerSupported) . compressionId
+        in case NE.filter peerSupports ourSupported of
+             c:_ -> c
+             []  -> noCompression
+    , supported =
+        Map.fromList $
+          map (\c -> (compressionId c, c)) (toList ourSupported)
+    }
+
+-- | Only use the given algorithm, if the peer supports it
+only :: Compression -> Negotation
+only compr = chooseFirst (compr :| [noCompression])
+
+-- | Insist on the specified algorithm, /no matter what the peer offers/
+--
+-- This is dangerous: if the peer does not support the specified algorithm, it
+-- will be unable to decompress any messages. Primarily used for testing.
+--
+-- See also 'only'.
+insist :: Compression -> Negotation
+insist compr = Negotation {
+      offer     = compressionId compr :| []
+    , choose    = \_ -> compr
+    , supported = Map.singleton (compressionId compr) compr
+    }
diff --git a/src/Network/GRPC/Common/HTTP2Settings.hs b/src/Network/GRPC/Common/HTTP2Settings.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/HTTP2Settings.hs
@@ -0,0 +1,201 @@
+-- | Settings and parameters pertaining to HTTP\/2
+--
+-- Intended for unqualified import.
+
+module Network.GRPC.Common.HTTP2Settings
+  ( HTTP2Settings(..)
+  , defaultHTTP2Settings
+  ) where
+
+import Data.Default
+import Data.Word
+
+-- | HTTP\/2 settings
+data HTTP2Settings = HTTP2Settings {
+      -- | Maximum number of concurrent active streams
+      --
+      -- <https://datatracker.ietf.org/doc/html/rfc7540#section-5.1.2>
+      http2MaxConcurrentStreams :: Word32
+
+      -- | Window size for streams
+      --
+      -- <https://datatracker.ietf.org/doc/html/rfc7540#section-6.9.2>
+    , http2StreamWindowSize :: Word32
+
+      -- | Connection window size
+      --
+      -- This value is broadcast via a @WINDOW_UDPATE@ frame at the beginning of
+      -- a new connection.
+      --
+      -- If the consumed window space of all streams exceeds this value, the
+      -- sender will stop sending data. Therefore, if this value is less than
+      -- @'http2MaxConcurrentStreams' * 'http2StreamWindowSize'@, there is risk
+      -- of a control flow deadlock, since the connection window space may be
+      -- used up by streams that we are not yet processing before we have
+      -- received all data on the streams that we /are/ processing. To reduce
+      -- this risk, increase
+      -- 'Network.GRPC.Server.Run.serverOverrideNumberOfWorkers' for the server.
+      -- See <https://github.com/kazu-yamamoto/network-control/pull/4> for more
+      -- information.
+    , http2ConnectionWindowSize :: Word32
+
+      -- | Enable @TCP_NODELAY@
+      --
+      -- Send out TCP segments as soon as possible, even if there is only a
+      -- small amount of data.
+      --
+      -- When @TCP_NODELAY@ is /NOT/ set, the TCP implementation will wait to
+      -- send a TCP segment to the receiving peer until either (1) there is
+      -- enough data to fill a certain minimum segment size or (2) we receive an
+      -- ACK from the receiving peer for data we sent previously. This adds a
+      -- network roundtrip delay to every RPC message we want to send (to
+      -- receive the ACK). If the peer uses TCP delayed acknowledgement, which
+      -- will typically be the case, then this delay will increase further
+      -- still; default for delayed acknowledgement is 40ms, thus resulting in a
+      -- theoretical maximum of 25 RPCs/sec.
+      --
+      -- We therefore enable TCP_NODELAY by default, so that data is sent to the
+      -- peer as soon as we have an entire gRPC message serialized and ready to
+      -- send (we send the data to the TCP layer only once an entire message is
+      -- written, or the @http2@ write buffer is full).
+      --
+      -- Turning this off /could/ improve throughput, as fewer TCP segments will
+      -- be needed, but you probably only want to do this if you send very few
+      -- very large RPC messages. In gRPC this is anyway discouraged, because
+      -- gRPC messages do not support incremental (de)serialization; if you need
+      -- to send large amounts of data, it is preferable to split these into
+      -- many, smaller, gRPC messages; this also gives the application the
+      -- possibility of reporting on data transmission progress.
+      --
+      -- TL;DR: leave this at the default unless you know what you are doing.
+    , http2TcpNoDelay :: Bool
+
+      -- | Set @SO_LINGER@ to a value of 0
+      --
+      -- Instead of following the normal shutdown sequence to close the TCP
+      -- connection, this will just send a @RST@ packet and immediately discard
+      -- the connection, freeing the local port.
+      --
+      -- This should /not/ be enabled in the vast majority of cases. It is only
+      -- useful in specific scenarios, such as stress testing, where resource
+      -- (e.g. port) exhaustion is a greater concern than protocol adherence.
+      -- Even in such scenarios scenarios, it probably only makes sense to
+      -- enable this option on the client since they will be using a new
+      -- ephemeral port for each connection (unlike the server).
+      --
+      -- TL;DR: leave this at the default unless you know what you are doing.
+    , http2TcpAbortiveClose :: Bool
+
+      -- | Ping rate limit
+      --
+      -- This setting is specific to the [@http2@
+      -- package's](https://hackage.haskell.org/package/http2) implementation of
+      -- the HTTP\/2 specification. In particular, the library imposes a ping
+      -- rate limit as a security measure against
+      -- [CVE-2019-9512](https://www.cve.org/CVERecord?id=CVE-2019-9512). By
+      -- default (as of version 5.1.2) it sets this limit at 10 pings/second. If
+      -- you find yourself being disconnected from a gRPC peer because that peer
+      -- is sending too many pings (you will see an
+      -- [EnhanceYourCalm](https://hackage.haskell.org/package/http2-5.1.2/docs/Network-HTTP2-Client.html#t:ErrorCode)
+      -- exception, corresponding to the
+      -- [ENHANCE_YOUR_CALM](https://www.rfc-editor.org/rfc/rfc9113#ErrorCodes)
+      -- HTTP\/2 error code), you may wish to increase this limit. If you are
+      -- connecting to a peer that you trust, you can set this limit to
+      -- 'maxBound' (effectively turning off protection against ping flooding).
+    , http2OverridePingRateLimit :: Maybe Int
+
+      -- | Empty DATA frame rate limit
+      --
+      -- This setting is specific to the [@http2@
+      -- package's](https://hackage.haskell.org/package/http2) implementation of
+      -- the HTTP\/2 specification. In particular, the library imposes a rate
+      -- limit for empty DATA frames as a security measure against
+      -- [CVE-2019-9518](https://www.cve.org/CVERecord?id=CVE-2019-9518). By
+      -- default, it sets this limit at 4 frames/second. If you find yourself
+      -- being disconnected from a gRPC peer because that peer is sending too
+      -- many empty DATA frames (you will see an
+      -- [EnhanceYourCalm](https://hackage.haskell.org/package/http2-5.1.2/docs/Network-HTTP2-Client.html#t:ErrorCode)
+      -- exception, corresponding to the
+      -- [ENHANCE_YOUR_CALM](https://www.rfc-editor.org/rfc/rfc9113#ErrorCodes)
+      -- HTTP\/2 error code), you may wish to increase this limit. If you are
+      -- connecting to a peer that you trust, you can set this limit to
+      -- 'maxBound' (effectively turning off protection against empty DATA frame
+      -- flooding).
+    , http2OverrideEmptyFrameRateLimit :: Maybe Int
+
+      -- | SETTINGS frame rate limit
+      --
+      -- This setting is specific to the [@http2@
+      -- package's](https://hackage.haskell.org/package/http2) implementation of
+      -- the HTTP\/2 specification. In particular, the library imposes a rate
+      -- limit for SETTINGS frames as a security measure against
+      -- [CVE-2019-9515](https://www.cve.org/CVERecord?id=CVE-2019-9515). By
+      -- default, it sets this limit at 4 frames/second. If you find yourself
+      -- being disconnected from a gRPC peer because that peer is sending too
+      -- many SETTINGS frames (you will see an
+      -- [EnhanceYourCalm](https://hackage.haskell.org/package/http2-5.1.2/docs/Network-HTTP2-Client.html#t:ErrorCode)
+      -- exception, corresponding to the
+      -- [ENHANCE_YOUR_CALM](https://www.rfc-editor.org/rfc/rfc9113#ErrorCodes)
+      -- HTTP\/2 error code), you may wish to increase this limit. If you are
+      -- connecting to a peer that you trust, you can set this limit to
+      -- 'maxBound' (effectively turning off protection against SETTINGS frame
+      -- flooding).
+    , http2OverrideSettingsRateLimit :: Maybe Int
+
+      -- | Reset (RST) frame rate limit
+      --
+      -- This setting is specific to the [@http2@
+      -- package's](https://hackage.haskell.org/package/http2) implementation of
+      -- the HTTP\/2 specification. In particular, the library imposes a rate
+      -- limit for RST frames as a security measure against
+      -- [CVE-2023-44487](https://www.cve.org/CVERecord?id=CVE-2023-44487). By
+      -- default, it sets this limit at 4 frames/second. If you find yourself
+      -- being disconnected from a gRPC peer because that peer is sending too
+      -- many empty RST frames (you will see an
+      -- [EnhanceYourCalm](https://hackage.haskell.org/package/http2-5.1.2/docs/Network-HTTP2-Client.html#t:ErrorCode)
+      -- exception, corresponding to the
+      -- [ENHANCE_YOUR_CALM](https://www.rfc-editor.org/rfc/rfc9113#ErrorCodes)
+      -- HTTP\/2 error code), you may wish to increase this limit. If you are
+      -- connecting to a peer that you trust, you can set this limit to
+      -- 'maxBound' (effectively turning off protection against RST frame
+      -- flooding).
+    , http2OverrideRstRateLimit :: Maybe Int
+    }
+  deriving (Show)
+
+-- | Default HTTP\/2 settings
+--
+-- [Section 6.5.2 of the HTTP\/2
+-- specification](https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2)
+-- recommends that the @SETTINGS_MAX_CONCURRENT_STREAMS@ parameter be no smaller
+-- than 100 "so as not to unnecessarily limit parallelism", so we default to
+-- 128.
+--
+-- The default initial stream window size (corresponding to the
+-- @SETTINGS_INITIAL_WINDOW_SIZE@ HTTP\/2 parameter) is 64KB.
+--
+-- The default connection window size is 128 * 64KB to avoid the control flow
+-- deadlock discussed at 'http2ConnectionWindowSize'.
+--
+-- The ping rate limit imposed by the [@http2@
+-- package](https://hackage.haskell.org/package/http2) is overridden to 100
+-- PINGs/sec.
+defaultHTTP2Settings :: HTTP2Settings
+defaultHTTP2Settings = HTTP2Settings {
+      http2MaxConcurrentStreams        = defMaxConcurrentStreams
+    , http2StreamWindowSize            = defInitialStreamWindowSize
+    , http2ConnectionWindowSize        = defInitialConnectionWindowSize
+    , http2TcpAbortiveClose            = False
+    , http2TcpNoDelay                  = True
+    , http2OverridePingRateLimit       = Just 100
+    , http2OverrideEmptyFrameRateLimit = Nothing
+    , http2OverrideSettingsRateLimit   = Nothing
+    , http2OverrideRstRateLimit        = Nothing
+    }
+  where
+    defMaxConcurrentStreams        = 128
+    defInitialStreamWindowSize     = 256 * 1024        -- 256KiB
+    defInitialConnectionWindowSize = 2   * 1024 * 1024 -- 2MiB
+
+instance Default HTTP2Settings where
+  def = defaultHTTP2Settings
diff --git a/src/Network/GRPC/Common/Headers.hs b/src/Network/GRPC/Common/Headers.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/Headers.hs
@@ -0,0 +1,108 @@
+-- | Utilities for working with headers
+module Network.GRPC.Common.Headers (
+    HasRequiredHeaders(..)
+  , RequiredHeaders(..)
+  , verifyRequired
+  , verifyAll
+  , verifyAllIf
+  ) where
+
+import Data.Functor.Identity
+import Data.Kind
+import Data.Void
+
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Util.HKD (Undecorated, Checked)
+import Network.GRPC.Spec.Util.HKD qualified as HKD
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | Required headers
+--
+-- Required headers are headers that @grapesy@ needs to know in order to
+-- function. For example, we /need/ to know which compression algorithm the peer
+-- is using for their messages to us.
+class HKD.Traversable h => HasRequiredHeaders h where
+  data RequiredHeaders h :: Type
+  requiredHeaders :: h (Checked e) -> Either e (RequiredHeaders h)
+
+-- | Like 'requiredHeaders', but for already verified headers
+requiredHeadersVerified ::
+     HasRequiredHeaders h
+  => h Undecorated -> RequiredHeaders h
+requiredHeadersVerified =
+    either absurd id . requiredHeaders . HKD.map noError . HKD.decorate
+  where
+    noError :: Identity a -> Either Void a
+    noError = Right . runIdentity
+
+-- | Validate only the required headers
+--
+-- By default, we only check those headers @grapesy@ needs to function.
+verifyRequired ::
+     HasRequiredHeaders h
+  => h (Checked (InvalidHeaders HandledSynthesized))
+  -> Either (InvalidHeaders HandledSynthesized) (RequiredHeaders h)
+verifyRequired = requiredHeaders
+
+-- | Validate /all/ headers
+--
+-- Validate all headers; we do this only if
+-- 'Network.GRPC.Client.connVerifyHeaders' (on the client) or
+-- 'Network.GRPC.Server.serverVerifyHeaders' (on the server) is enabled.
+verifyAll :: forall h.
+     HasRequiredHeaders h
+  => h (Checked (InvalidHeaders HandledSynthesized))
+  -> Either (InvalidHeaders HandledSynthesized) (h Undecorated, RequiredHeaders h)
+verifyAll = fmap aux . HKD.sequence
+  where
+    aux :: h Undecorated -> (h Undecorated, RequiredHeaders h)
+    aux verifyd = (verifyd, requiredHeadersVerified verifyd)
+
+-- | Convenience wrapper, conditionally verifying all headers
+verifyAllIf ::
+     HasRequiredHeaders h
+  => Bool
+  -> h (Checked (InvalidHeaders HandledSynthesized))
+  -> Either (InvalidHeaders HandledSynthesized) (RequiredHeaders h)
+verifyAllIf False = verifyRequired
+verifyAllIf True  = fmap snd . verifyAll
+
+{-------------------------------------------------------------------------------
+  Request
+-------------------------------------------------------------------------------}
+
+instance HasRequiredHeaders RequestHeaders_ where
+  data RequiredHeaders RequestHeaders_ = RequiredRequestHeaders {
+        requiredRequestCompression :: Maybe CompressionId
+      , requiredRequestTimeout     :: Maybe Timeout
+      }
+
+  requiredHeaders requestHeaders =
+      RequiredRequestHeaders
+        <$> requestCompression requestHeaders
+        <*> requestTimeout     requestHeaders
+
+{-------------------------------------------------------------------------------
+  Response
+-------------------------------------------------------------------------------}
+
+instance HasRequiredHeaders ResponseHeaders_ where
+  data RequiredHeaders ResponseHeaders_ = RequiredResponseHeaders {
+      requiredResponseCompression :: Maybe CompressionId
+    }
+
+  requiredHeaders responseHeaders =
+      RequiredResponseHeaders
+        <$> responseCompression responseHeaders
+
+{-------------------------------------------------------------------------------
+  Trailers-Only
+-------------------------------------------------------------------------------}
+
+instance HasRequiredHeaders TrailersOnly_ where
+  data RequiredHeaders TrailersOnly_ = NoRequiredTrailers
+  requiredHeaders _ = pure NoRequiredTrailers
+
diff --git a/src/Network/GRPC/Common/JSON.hs b/src/Network/GRPC/Common/JSON.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/JSON.hs
@@ -0,0 +1,18 @@
+module Network.GRPC.Common.JSON (
+    JsonRpc
+
+    -- * Aeson support
+  , JsonObject(..)
+  , Required(..)
+  , Optional(..)
+
+    -- * Re-exports
+    -- ** Aeson
+  , ToJSON(..)
+  , FromJSON(..)
+  ) where
+
+import Data.Aeson
+
+import Network.GRPC.Spec
+
diff --git a/src/Network/GRPC/Common/NextElem.hs b/src/Network/GRPC/Common/NextElem.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/NextElem.hs
@@ -0,0 +1,76 @@
+-- | Elements in a stream (without metadata)
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Common.NextElem qualified as NextElem
+--
+-- "Network.GRPC.Common" (intended for unqualified import) exports
+-- @NextElem(..)@, but none of the operations on 'NextElem'.
+module Network.GRPC.Common.NextElem (
+    -- * Conversion
+    toStreamElem
+    -- * Iteration
+  , mapM_
+  , forM_
+  , whileNext_
+  , collect
+  ) where
+
+import Prelude hiding (mapM_)
+
+import Control.Monad.State (StateT, execStateT, lift, modify)
+
+import Network.GRPC.Common.StreamElem (StreamElem(..))
+import Network.GRPC.Spec (NextElem(..))
+
+{-------------------------------------------------------------------------------
+  Conversion
+-------------------------------------------------------------------------------}
+
+toStreamElem :: b -> NextElem a -> StreamElem b a
+toStreamElem b NoNextElem   = NoMoreElems b
+toStreamElem _ (NextElem a) = StreamElem a
+
+{-------------------------------------------------------------------------------
+  Iteration
+-------------------------------------------------------------------------------}
+
+-- | Invoke the callback for each element, and then once more with 'NoNextElem'
+--
+-- >    mapM_ f [1,2,3]
+-- > == do f (NextElem 1)
+-- >       f (NextElem 2)
+-- >       f (NextElem 3)
+-- >       f NoNextElem
+mapM_ :: forall m a. Monad m => (NextElem a -> m ()) -> [a] -> m ()
+mapM_ f = go
+  where
+    go :: [a] -> m ()
+    go []     = f NoNextElem
+    go (x:xs) = f (NextElem x) >> go xs
+
+-- | Like 'mapM_', but with the arguments in opposite order
+forM_ :: Monad m => [a] -> (NextElem a -> m ()) -> m ()
+forM_ = flip mapM_
+
+-- | Invoke a function on each 'NextElem', until 'NoNextElem'
+--
+-- See also 'collect'.
+whileNext_ :: forall m a. Monad m => m (NextElem a) -> (a -> m ()) -> m ()
+whileNext_ f g = go
+  where
+    go :: m ()
+    go = do
+        ma <- f
+        case ma of
+          NoNextElem -> return ()
+          NextElem a -> g a >> go
+
+-- | Invoke the callback until it returns 'NoNextElem', collecting results
+collect :: forall m a. Monad m => m (NextElem a) -> m [a]
+collect f =
+    reverse <$> flip execStateT [] aux
+  where
+    aux :: StateT [a] m ()
+    aux = whileNext_ (lift f) $ modify . (:)
+
diff --git a/src/Network/GRPC/Common/Protobuf.hs b/src/Network/GRPC/Common/Protobuf.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/Protobuf.hs
@@ -0,0 +1,148 @@
+{-# LANGUAGE OverloadedLabels #-}
+
+-- | Common functionality for working with Protobuf
+module Network.GRPC.Common.Protobuf (
+    Protobuf
+  , Proto(..)
+  , getProto
+
+    -- * Exceptions
+  , ProtobufError(..)
+  , throwProtobufError
+  , throwProtobufErrorHom
+  , toProtobufError
+  , toProtobufErrorHom
+
+    -- * Re-exports
+    -- ** "Data.Function"
+  , (&)
+    -- ** "Control.Lens"
+  , (.~)
+  , (^.)
+  , (%~)
+    -- ** "Data.ProtoLens"
+  , StreamingType(..)
+  , HasField(..)
+  , FieldDefault(..)
+  , Message(defMessage)
+  ) where
+
+import Control.Exception
+import Control.Lens ((.~), (^.), (%~))
+import Control.Monad
+import Control.Monad.Except
+import Data.Bifunctor
+import Data.Function ((&))
+import Data.Int
+import Data.Maybe (fromMaybe)
+import Data.ProtoLens.Field (HasField(..))
+import Data.ProtoLens.Labels () -- provides instances for OverloadedLabels
+import Data.ProtoLens.Message (FieldDefault(..), Message(defMessage))
+import Data.Text (Text)
+
+import Network.GRPC.Common.Protobuf.Any (Any)
+import Network.GRPC.Common.Protobuf.Any qualified as Any
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Serialization
+
+{-------------------------------------------------------------------------------
+  Protobuf-specific errors
+-------------------------------------------------------------------------------}
+
+-- | gRPC exception with protobuf-specific error details
+--
+-- See also 'Status' and @google.rpc.Status@.
+data ProtobufError a = ProtobufError {
+      protobufErrorCode     :: GrpcError
+    , protobufErrorMessage  :: Maybe Text
+    , protobufErrorDetails  :: [a]
+    }
+  deriving stock (Show, Eq, Ord, Functor, Foldable, Traversable)
+
+-- | Throw 'GrpcException' with Protobuf-specific details
+throwProtobufError :: ProtobufError (Proto Any) -> IO x
+throwProtobufError ProtobufError{
+                       protobufErrorCode
+                     , protobufErrorMessage
+                     , protobufErrorDetails
+                     } = throwIO $ GrpcException {
+      grpcError         = protobufErrorCode
+    , grpcErrorMessage  = protobufErrorMessage
+    , grpcErrorDetails  = Just $ buildStatus status
+    , grpcErrorMetadata = []
+    }
+  where
+    status :: Proto Status
+    status =
+        defMessage
+          & #code    .~ fromIntegral (fromGrpcError protobufErrorCode)
+          & #message .~ fromMaybe fieldDefault protobufErrorMessage
+          & #details .~ protobufErrorDetails
+
+-- | Variation of 'throwProtobufError' for a homogenous list of details
+--
+-- The @google.rpc.Status@ message uses the Protobuf 'Any' type to store a
+-- heterogenous list of details. In case that all elements in this list are
+-- actually of the /same/ type, we can provide a simpler API.
+throwProtobufErrorHom :: Message a => ProtobufError (Proto a) -> IO x
+throwProtobufErrorHom = throwProtobufError . fmap Any.pack
+
+-- | Construct 'ProtobufError' by parsing 'grpcErrorDetails' as 'Status'
+--
+-- See also 'throwProtobufError'.
+toProtobufError :: GrpcException -> Either String (ProtobufError (Proto Any))
+toProtobufError err =
+    case grpcErrorDetails err of
+      Nothing ->
+        return ProtobufError{
+            protobufErrorCode    = grpcError err
+          , protobufErrorMessage = grpcErrorMessage err
+          , protobufErrorDetails = []
+          }
+      Just statusEnc -> do
+        status :: Proto Status <- parseStatus statusEnc
+        protobufErrorCode <- checkErrorCode (status ^. #code)
+        return ProtobufError{
+            protobufErrorCode
+          , protobufErrorMessage = constructErrorMessage (status ^. #message)
+          , protobufErrorDetails = status ^. #details
+          }
+  where
+    -- The gRPC specification mandates
+    --
+    -- > If [Status-Details] contains a status code field, it MUST NOT
+    -- > contradict the Status header. The consumer MUST verify this
+    -- > requirement.
+    --
+    -- We cannot do this check without knowing the format of the status details,
+    -- so we do it here for the specific case of Protobuf. Since we cannot
+    -- distinguish between an absent field and a field with a default value in
+    -- Protobuf, we add a special case for this.
+    checkErrorCode :: Int32 -> Either String GrpcError
+    checkErrorCode statusCode
+      | statusCode == fieldDefault
+      = return $ grpcError err
+
+      | fromGrpcError (grpcError err) == fromIntegral statusCode
+      = return $ grpcError err
+
+      | otherwise
+      = throwError $ "'Status.code' does not match 'grpc-status'"
+
+    -- If the Status-Details does not contain a message (that is, the field is
+    -- at its default value), we fall back to the status message in the
+    -- exception itself (if any).
+    constructErrorMessage :: Text -> Maybe Text
+    constructErrorMessage msg =
+        if msg == fieldDefault
+          then grpcErrorMessage err
+          else Just msg
+
+-- | Variation of 'toProtobufError' for a homogenous list of details
+toProtobufErrorHom :: forall a.
+     Message a
+  => GrpcException -> Either String (ProtobufError (Proto a))
+toProtobufErrorHom = traverse aux <=< toProtobufError
+  where
+    aux :: Proto Any -> Either String (Proto a)
+    aux = first show . Any.unpack
diff --git a/src/Network/GRPC/Common/Protobuf/Any.hs b/src/Network/GRPC/Common/Protobuf/Any.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/Protobuf/Any.hs
@@ -0,0 +1,33 @@
+-- | Support for the protobuf @Any@ type
+--
+-- Official docs at <https://protobuf.dev/programming-guides/proto3/#any>.
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Common.Protobuf.Any (Any)
+-- > import Network.GRPC.Common.Protobuf.Any qualified as Any
+module Network.GRPC.Common.Protobuf.Any (
+    Any
+
+    -- * Packing and unpacking
+  , UnpackError(..)
+  , pack
+  , unpack
+  ) where
+
+import Data.Bifunctor
+import Data.ProtoLens.Any (Any, UnpackError(..))
+import Data.ProtoLens.Any qualified as Any
+import Data.ProtoLens.Message (Message)
+
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Pack and unpack
+-------------------------------------------------------------------------------}
+
+pack :: Message a => Proto a -> Proto Any
+pack = Proto . Any.pack . getProto
+
+unpack :: Message a => Proto Any -> Either UnpackError (Proto a)
+unpack = second Proto .  Any.unpack . getProto
diff --git a/src/Network/GRPC/Common/StreamElem.hs b/src/Network/GRPC/Common/StreamElem.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/StreamElem.hs
@@ -0,0 +1,162 @@
+-- | Positioned elements
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Common.StreamElem qualified as StreamElem
+--
+-- "Network.GRPC.Common" (intended for unqualified import) exports
+-- @StreamElem(..)@, but none of the operations on 'StreamElem'.
+module Network.GRPC.Common.StreamElem (
+    StreamElem(..)
+    -- * Conversion
+  , value
+    -- * Iteration
+    -- * Iteration
+  , mapM_
+  , forM_
+  , whileNext_
+  , collect
+  , whenDefinitelyFinal
+  ) where
+
+import Prelude hiding (mapM_)
+
+import Control.Monad.State (StateT, runStateT, lift, modify)
+import Data.Bifoldable
+import Data.Bifunctor
+import Data.Bitraversable
+import Data.Tuple (swap)
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | An element positioned in a stream
+data StreamElem b a =
+    -- | Element in the stream
+    --
+    -- The final element in a stream may or may not be marked as final; if it is
+    -- not, we will only discover /after/ receiving the final element that it
+    -- was in fact final. Moreover, we do not know ahead of time whether or not
+    -- the final element will be marked.
+    --
+    -- When we receive an element and it is not marked final, this might
+    -- therefore mean one of two things, without being able to tell which:
+    --
+    -- * We are dealing with a stream in which the final element is not marked.
+    --
+    --   In this case, the element may or may not be the final element; if it
+    --   is, the next value will be 'NoMoreElems' (but waiting for the next
+    --   value might mean a blocking call).
+    --
+    -- * We are dealing with a stream in which the final element /is/ marked.
+    --
+    --   In this case, this element is /not/ final (and the final element, when
+    --   we receive it, will be tagged as 'Final').
+    StreamElem !a
+
+    -- | We received the final element
+    --
+    -- The final element is annotated with some additional information.
+  | FinalElem !a !b
+
+    -- | There are no more elements
+    --
+    -- This is used in two situations:
+    --
+    -- * The stream didn't contain any elements at all.
+    -- * The final element was not marked as final.
+    --   See 'StreamElem' for detailed additional discussion.
+  | NoMoreElems !b
+  deriving stock (Show, Eq, Functor, Foldable, Traversable)
+
+instance Bifunctor StreamElem where
+  bimap g f (FinalElem   a b) = FinalElem   (f a) (g b)
+  bimap g _ (NoMoreElems   b) = NoMoreElems       (g b)
+  bimap _ f (StreamElem  a  ) = StreamElem  (f a)
+
+instance Bifoldable StreamElem where
+  bifoldMap g f (FinalElem   a b) = f a <> g b
+  bifoldMap g _ (NoMoreElems   b) =        g b
+  bifoldMap _ f (StreamElem  a  ) = f a
+
+instance Bitraversable StreamElem where
+  bitraverse g f (FinalElem   a b) = FinalElem   <$> f a <*> g b
+  bitraverse g _ (NoMoreElems   b) = NoMoreElems <$>         g b
+  bitraverse _ f (StreamElem  a  ) = StreamElem  <$> f a
+
+{-------------------------------------------------------------------------------
+  Conversion
+-------------------------------------------------------------------------------}
+
+-- | Value of the element, if one is present
+--
+-- Returns 'Nothing' in case of 'NoMoreElems'
+--
+-- Using this function loses the information whether the item was the final
+-- item; this information can be recovered using 'whenDefinitelyFinal'.
+value :: StreamElem b a -> Maybe a
+value = \case
+    StreamElem a   -> Just a
+    FinalElem  a _ -> Just a
+    NoMoreElems  _ -> Nothing
+
+{-------------------------------------------------------------------------------
+  Iteration
+-------------------------------------------------------------------------------}
+
+-- | Invoke the callback for each element
+--
+-- The final element is marked using 'FinalElem'; the callback is only invoked
+-- on 'NoMoreElems' if the list is empty.
+--
+-- >    mapM_ f ([1,2,3], b)
+-- > == do f (StreamElem 1)
+-- >       f (StreamElem 2)
+-- >       f (FinalElem 3 b)
+-- >
+-- >    mapM_ f ([], b)
+-- > == do f (NoMoreElems b)
+mapM_ :: forall m a b. Monad m => (StreamElem b a -> m ()) -> [a] -> b -> m ()
+mapM_ f = go
+  where
+    go :: [a] -> b -> m ()
+    go []     b = f (NoMoreElems b)
+    go [a]    b = f (FinalElem a b)
+    go (a:as) b = f (StreamElem a) >> go as b
+
+-- | Like 'mapM_', but with the arguments in opposite order
+forM_ :: Monad m => [a] -> b -> (StreamElem b a -> m ()) -> m ()
+forM_ as b f = mapM_ f as b
+
+-- | Invoke a function on each 'NextElem', until 'FinalElem' or 'NoMoreElems'
+whileNext_ :: forall m a b. Monad m => m (StreamElem b a) -> (a -> m ()) -> m b
+whileNext_ f g = go
+  where
+    go :: m b
+    go = do
+        ma <- f
+        case ma of
+          StreamElem  a   -> g a >> go
+          FinalElem   a b -> g a >> return b
+          NoMoreElems   b -> return b
+
+-- | Invoke the callback until 'FinalElem' or 'NoMoreElems', collecting results
+collect :: forall m b a. Monad m => m (StreamElem b a) -> m ([a], b)
+collect f =
+    first reverse . swap <$> flip runStateT [] aux
+  where
+    aux :: StateT [a] m b
+    aux = whileNext_ (lift f) $ modify . (:)
+
+-- | Do we have evidence that this element is the final one?
+--
+-- The callback is not called on 'StreamElem'; this does /not/ mean that the
+-- element was not final; see 'StreamElem' for detailed discussion.
+whenDefinitelyFinal :: Applicative m => StreamElem b a -> (b -> m ()) -> m ()
+whenDefinitelyFinal msg k =
+    case msg of
+      StreamElem  _   -> pure ()
+      FinalElem   _ b -> k b
+      NoMoreElems   b -> k b
+
diff --git a/src/Network/GRPC/Common/StreamType.hs b/src/Network/GRPC/Common/StreamType.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Common/StreamType.hs
@@ -0,0 +1,24 @@
+-- | Handlers for specific communication patterns
+--
+-- The
+-- [gRPC specification](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md)
+-- does not distinguish between different kinds of communication patterns;
+-- this is done in the
+-- [Protobuf specification](https://protobuf.dev/reference/protobuf/proto3-spec/#service_definition).
+-- Nonetheless, these streaming types can be applied to other serialization
+-- formats also.
+--
+-- It is important to realize that these wrappers are simple and are provided
+-- for convenience only; if they do not provide the functionality you require,
+-- using the more general interface from "Network.GRPC.Client" or
+-- "Network.GRPC.Server" is not much more difficult.
+--
+-- See "Network.GRPC.Client" for additional discussion.
+module Network.GRPC.Common.StreamType (
+    -- * Abstraction
+    StreamingType(..)
+  , SupportsStreamingType
+  , HasStreamingType(..)
+  ) where
+
+import Network.GRPC.Spec
diff --git a/src/Network/GRPC/Server.hs b/src/Network/GRPC/Server.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server.hs
@@ -0,0 +1,89 @@
+module Network.GRPC.Server (
+    -- * Server proper
+    mkGrpcServer
+
+    -- ** Configuration
+  , ServerParams(..)
+  , RequestHandler
+  , ContentType(..)
+
+    -- * Handlers
+  , Call       -- opaque
+  , RpcHandler -- opaque
+  , mkRpcHandler
+  , mkRpcHandlerNoDefMetadata
+  , hoistRpcHandler
+
+    -- ** Hide @rpc@ type variable
+  , SomeRpcHandler -- opaque
+  , someRpcHandler
+  , hoistSomeRpcHandler
+
+    -- * Open (ongoing) call
+  , recvInput
+  , sendOutput
+  , sendGrpcException
+  , getRequestMetadata
+  , setResponseInitialMetadata
+
+    -- ** Protocol specific wrappers
+  , sendNextOutput
+  , sendFinalOutput
+  , sendTrailers
+  , recvNextInputElem
+  , recvNextInput
+  , recvFinalInput
+  , recvEndOfInput
+
+    -- ** Low-level\/specialized API
+  , initiateResponse
+  , sendTrailersOnly
+  , recvInputWithMeta
+  , sendOutputWithMeta
+  , getRequestHeaders
+
+    -- * Exceptions
+  , CallSetupFailure(..)
+  , ClientDisconnected(..)
+  , HandlerTerminated(..)
+  , ResponseAlreadyInitiated(..)
+  ) where
+
+import Network.HTTP2.Server qualified as HTTP2
+
+import Network.GRPC.Server.Call
+import Network.GRPC.Server.Context
+import Network.GRPC.Server.Handler
+import Network.GRPC.Server.HandlerMap (HandlerMap)
+import Network.GRPC.Server.HandlerMap qualified as HandlerMap
+import Network.GRPC.Server.RequestHandler
+import Network.GRPC.Server.Session (CallSetupFailure(..))
+import Network.GRPC.Spec
+import Network.GRPC.Util.HTTP2.Stream (ClientDisconnected(..))
+
+{-------------------------------------------------------------------------------
+  Server proper
+-------------------------------------------------------------------------------}
+
+-- | Construct server
+--
+-- The server can be run using the standard infrastructure offered by the
+-- @http2@ package, but "Network.GRPC.Server.Run" provides some convenience
+-- functions.
+--
+-- If you are using Protobuf (or if you have another way to compute a list of
+-- methods at the type level), you may wish to use the infrastructure from
+-- "Network.GRPC.Server.StreamType" (in particular,
+-- 'Network.GRPC.Server.StreamType.fromMethods' or
+-- 'Network.GRPC.Server.StreamType.fromServices') to construct the set of
+-- handlers.
+mkGrpcServer :: ServerParams -> [SomeRpcHandler IO] -> IO HTTP2.Server
+mkGrpcServer params@ServerParams{serverTopLevel} handlers = do
+    ctxt <- newServerContext params
+    return $
+        requestHandlerToServer
+      $ serverTopLevel
+      $ requestHandler handlerMap ctxt
+  where
+    handlerMap :: HandlerMap IO
+    handlerMap = HandlerMap.fromList handlers
diff --git a/src/Network/GRPC/Server/Binary.hs b/src/Network/GRPC/Server/Binary.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Binary.hs
@@ -0,0 +1,72 @@
+-- | Convenience functions for working with binary RPC
+--
+-- Intended for qualified import.
+--
+-- import Network.GRPC.Server.Binary qualified as Binary
+module Network.GRPC.Server.Binary (
+    -- | Convenience wrappers using @binary@ for serialization/deserialization
+    sendOutput
+  , sendNextOutput
+  , sendFinalOutput
+  , recvInput
+  , recvNextInput
+  , recvFinalInput
+  ) where
+
+import Data.Binary
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+import GHC.Stack
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary (decodeOrThrow)
+import Network.GRPC.Server (Call)
+import Network.GRPC.Server qualified as Server
+
+{-------------------------------------------------------------------------------
+  Convenience wrapers using @binary@ for serialization/deserialization
+-------------------------------------------------------------------------------}
+
+sendOutput ::
+     (Binary out, Output rpc ~ Lazy.ByteString, HasCallStack)
+  => Call rpc
+  -> StreamElem (ResponseTrailingMetadata rpc) out
+  -> IO ()
+sendOutput call out =
+    Server.sendOutput call (encode <$> out)
+
+sendNextOutput ::
+     (Binary out, Output rpc ~ Lazy.ByteString, HasCallStack)
+  => Call rpc
+  -> out
+  -> IO ()
+sendNextOutput call out =
+    Server.sendNextOutput call (encode out)
+
+sendFinalOutput ::
+     (Binary out, Output rpc ~ Lazy.ByteString, HasCallStack)
+  => Call rpc
+  -> (out, ResponseTrailingMetadata rpc)
+  -> IO ()
+sendFinalOutput call (out, trailers) =
+    Server.sendFinalOutput call (encode out, trailers)
+
+recvInput ::
+     (Binary inp, Input rpc ~ Lazy.ByteString, HasCallStack)
+  => Call rpc
+  -> IO (StreamElem NoMetadata inp)
+recvInput call =
+    Server.recvInput call >>= traverse decodeOrThrow
+
+recvNextInput ::
+     (Binary inp, Input rpc ~ Lazy.ByteString, HasCallStack)
+  => Call rpc
+  -> IO inp
+recvNextInput call =
+    Server.recvNextInput call >>= decodeOrThrow
+
+recvFinalInput ::
+     (Binary inp, Input rpc ~ Lazy.ByteString, HasCallStack)
+  => Call rpc
+  -> IO inp
+recvFinalInput call =
+     Server.recvFinalInput call >>= decodeOrThrow
diff --git a/src/Network/GRPC/Server/Call.hs b/src/Network/GRPC/Server/Call.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Call.hs
@@ -0,0 +1,778 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Open (ongoing) RPC call
+--
+-- Intended for uqnqualified import.
+module Network.GRPC.Server.Call (
+    Call(..)
+
+    -- * Construction
+  , setupCall
+
+    -- * Open (ongoing) call
+  , recvInput
+  , sendOutput
+  , sendGrpcException
+  , getRequestMetadata
+  , setResponseInitialMetadata
+
+    -- ** Protocol specific wrappers
+  , sendNextOutput
+  , sendFinalOutput
+  , sendTrailers
+  , recvNextInput
+  , recvFinalInput
+  , recvEndOfInput
+
+    -- ** Low-level\/specialized API
+  , initiateResponse
+  , sendTrailersOnly
+  , recvNextInputElem
+  , recvInputWithMeta
+  , sendOutputWithMeta
+  , getRequestHeaders
+
+    -- ** Internal API
+  , sendProperTrailers
+  , serverExceptionToClientError
+
+    -- * Exceptions
+  , HandlerTerminated(..)
+  , ResponseAlreadyInitiated(..)
+  ) where
+
+import Control.Concurrent.STM
+import Control.Exception (throwIO)
+import Control.Monad
+import Control.Monad.Catch
+import Data.Bitraversable
+import Data.List.NonEmpty (NonEmpty)
+import Data.Void
+import GHC.Stack
+import Network.HTTP.Types qualified as HTTP
+import Network.HTTP2.Server qualified as HTTP2
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Common.Headers
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+import Network.GRPC.Server.Context
+import Network.GRPC.Server.Session
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Serialization
+import Network.GRPC.Util.HTTP2 (fromHeaderTable)
+import Network.GRPC.Util.Session qualified as Session
+import Network.GRPC.Util.Session.Server qualified as Server
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | Open connection to a client
+data Call rpc = SupportsServerRpc rpc => Call {
+      -- | Server context (across all calls)
+      callContext :: ServerContext
+
+      -- | Server session (for this call)
+    , callSession :: ServerSession rpc
+
+      -- | Bidirectional channel to the client
+    , callChannel :: Session.Channel (ServerSession rpc)
+
+      -- | Request headers
+    , callRequestHeaders :: RequestHeaders' HandledSynthesized
+
+      -- | Response metadata
+      --
+      -- Metadata to be included when we send the initial response headers.
+      --
+      -- Can be updated until the first message (see 'callFirstMessage'), at
+      -- which point it /must/ have been set (if not, an exception is thrown).
+    , callResponseMetadata :: TVar (CallInitialMetadata rpc)
+
+      -- | What kicked off the response?
+      --
+      -- This is empty until the response /has/ in fact been kicked off.
+    , callResponseKickoff :: TMVar Kickoff
+    }
+
+-- | Initial metadata
+--
+-- See 'callResponseMetadata' for discussion.
+data CallInitialMetadata rpc =
+    -- | Initial metadata not yet set
+    CallInitialMetadataNotSet
+
+    -- | Initial metadata has been set
+    --
+    -- We record the 'CallStack' of where the metadata was set.
+  | CallInitialMetadataSet (ResponseInitialMetadata rpc) CallStack
+
+deriving stock instance IsRPC rpc => Show (CallInitialMetadata rpc)
+
+-- | What kicked off the response?
+--
+-- When the server handler starts, we do not immediately initiate the response
+-- to the client, because the server might not have decided the initial response
+-- metadata yet (indeed, it might need wait for some incoming messages from the
+-- client before it can compute that metadata). We therefore wait until we
+-- send the initial response headers, until the handler..
+--
+-- 1. explicitly calls 'initiateResponse'
+-- 2. sends the first message using 'sendOutput'
+-- 3. initiates and immediately terminates the response using 'sendTrailersOnly'
+--
+-- We only need distinguish between (1 or 2) versus (3), corresponding precisely
+-- to the two constructors of 'FlowStart'.
+--
+-- We record the 'CallStack' of the call that initiated the response.
+data Kickoff =
+    KickoffRegular      CallStack
+  | KickoffTrailersOnly CallStack TrailersOnly
+  deriving (Show)
+
+kickoffCallStack :: Kickoff -> CallStack
+kickoffCallStack (KickoffRegular      cs  ) = cs
+kickoffCallStack (KickoffTrailersOnly cs _) = cs
+
+{-------------------------------------------------------------------------------
+  Open a call
+-------------------------------------------------------------------------------}
+
+-- | Setup call
+--
+-- No response is sent to the caller.
+--
+-- May throw 'CallSetupFailure'.
+setupCall :: forall rpc.
+     SupportsServerRpc rpc
+  => Server.ConnectionToClient
+  -> ServerContext
+  -> IO (Call rpc, Maybe Timeout)
+setupCall conn callContext@ServerContext{serverParams} = do
+    callResponseMetadata <- newTVarIO CallInitialMetadataNotSet
+    callResponseKickoff  <- newEmptyTMVarIO
+
+    (inboundHeaders, timeout) <- determineInbound callSession req
+    let callRequestHeaders = inbHeaders inboundHeaders
+
+    -- Technically compression is only relevant in the 'KickoffRegular' case
+    -- (i.e., in the case that the /server/ responds with messages, rather than
+    -- make use the Trailers-Only case). However, the kickoff might not be known
+    -- until the server has received various messages from the client. To
+    -- simplify control flow, therefore, we do compression negotation early.
+    let cOut = getOutboundCompression callSession $
+                 requestAcceptCompression callRequestHeaders
+
+    callChannel :: Session.Channel (ServerSession rpc) <-
+      Session.setupResponseChannel
+        callSession
+        conn
+        (Session.FlowStartRegular inboundHeaders)
+        ( startOutbound
+            serverParams
+            callResponseMetadata
+            callResponseKickoff
+            cOut
+        )
+
+    return (
+        Call{
+            callContext
+          , callSession
+          , callRequestHeaders
+          , callResponseMetadata
+          , callResponseKickoff
+          , callChannel
+          }
+      , timeout
+      )
+  where
+    callSession :: ServerSession rpc
+    callSession = ServerSession {
+          serverSessionContext = callContext
+        }
+
+    req :: HTTP2.Request
+    req = Server.request conn
+
+-- | Parse inbound headers
+determineInbound :: forall rpc.
+     SupportsServerRpc rpc
+  => ServerSession rpc
+  -> HTTP2.Request
+  -> IO (Headers (ServerInbound rpc), Maybe Timeout)
+determineInbound session req = do
+    requestHeaders' <- throwSynthesized throwIO parsed
+    case verifyAllIf serverVerifyHeaders requestHeaders' of
+      Left  err  -> throwIO $ CallSetupInvalidRequestHeaders err
+      Right hdrs -> do
+        cIn <- getInboundCompression session (requiredRequestCompression hdrs)
+        return (
+            InboundHeaders {
+                inbHeaders     = requestHeaders'
+              , inbCompression = cIn
+              }
+          , requiredRequestTimeout hdrs
+          )
+  where
+    ServerSession{serverSessionContext} = session
+    ServerContext{serverParams} = serverSessionContext
+    ServerParams{serverVerifyHeaders} = serverParams
+
+    parsed :: RequestHeaders' GrpcException
+    parsed = parseRequestHeaders' (Proxy @rpc) $
+               fromHeaderTable $ HTTP2.requestHeaders req
+
+-- | Determine outbound flow start
+--
+-- This blocks until the 'Kickoff' is known.
+startOutbound :: forall rpc.
+     SupportsServerRpc rpc
+  => ServerParams
+  -> TVar (CallInitialMetadata rpc)
+  -> TMVar Kickoff
+  -> Compression
+  -> IO (Session.FlowStart (ServerOutbound rpc), Session.ResponseInfo)
+startOutbound serverParams metadataVar kickoffVar cOut = do
+    -- Wait for kickoff (see 'Kickoff' for discussion)
+    kickoff <- atomically $ readTMVar kickoffVar
+
+    -- Session start
+    flowStart :: Session.FlowStart (ServerOutbound rpc) <-
+      case kickoff of
+        KickoffRegular _cs -> do
+          -- Get response metadata (see 'setResponseMetadata')
+          --
+          -- It is important we do this only for 'KickoffRegular', because the
+          -- initial metadata is not used in the Trailers-Only case, and we
+          -- should not unecessarily throw the 'ResponseInitialMetadataNotSet'
+          -- exception. This is especially important when that Trailers-Only
+          -- case was triggered by an exception in the handler, because the
+          -- handler might not yet have had the opportunity to set the initial
+          -- metdata prior to the error.
+          responseMetadata <- do
+            mMetadata <- atomically $ readTVar metadataVar
+            case mMetadata of
+              CallInitialMetadataSet md _cs -> buildMetadataIO md
+              CallInitialMetadataNotSet     -> throwIO $ ResponseInitialMetadataNotSet
+
+          return $ Session.FlowStartRegular $ OutboundHeaders {
+              outHeaders = ResponseHeaders {
+                  responseCompression =
+                    Just $ Compr.compressionId cOut
+                , responseAcceptCompression =
+                    Just $ Compr.offer compr
+                , responseContentType =
+                    serverContentType serverParams
+                , responseMetadata =
+                    customMetadataMapFromList responseMetadata
+                , responseUnrecognized =
+                    ()
+                }
+            , outCompression = cOut
+            }
+        KickoffTrailersOnly _cs trailers ->
+          return $ Session.FlowStartNoMessages trailers
+
+    return (flowStart, buildResponseInfo flowStart)
+  where
+    compr :: Compr.Negotation
+    compr = serverCompression serverParams
+
+    buildResponseInfo ::
+         Session.FlowStart (ServerOutbound rpc)
+      -> Session.ResponseInfo
+    buildResponseInfo start = Session.ResponseInfo {
+          responseStatus  = HTTP.ok200
+        , responseHeaders =
+            case start of
+              Session.FlowStartRegular headers ->
+                buildResponseHeaders
+                  (Proxy @rpc)
+                  (outHeaders headers)
+              Session.FlowStartNoMessages trailers ->
+                buildTrailersOnly
+                  (Just . chooseContentType (Proxy @rpc))
+                  trailers
+        , responseBody = Nothing
+        }
+
+-- | Determine compression used by the peer for messages to us
+getInboundCompression ::
+     ServerSession rpc
+  -> Maybe CompressionId
+  -> IO Compression
+getInboundCompression session = \case
+    Nothing  -> return noCompression
+    Just cid ->
+      case Compr.getSupported serverCompression cid of
+        Just compr -> return compr
+        Nothing    -> throwIO $ CallSetupUnsupportedCompression cid
+  where
+    ServerSession{serverSessionContext} = session
+    ServerContext{serverParams} = serverSessionContext
+    ServerParams{serverCompression} = serverParams
+
+-- | Determine compression to be used for messages to the peer
+--
+-- In the case that we fail to parse the @grpc-accept-encoding@ header, we
+-- simply use no compression.
+getOutboundCompression ::
+     ServerSession rpc
+  -> Either (InvalidHeaders HandledSynthesized) (Maybe (NonEmpty CompressionId))
+  -> Compression
+getOutboundCompression session = \case
+    Left _invalidHeader -> noCompression
+    Right Nothing       -> noCompression
+    Right (Just cids)   -> Compr.choose serverCompression cids
+  where
+    ServerSession{serverSessionContext} = session
+    ServerContext{serverParams} = serverSessionContext
+    ServerParams{serverCompression} = serverParams
+
+-- | Turn exception raised in server handler to error to be sent to the client
+serverExceptionToClientError :: ServerParams -> SomeException -> IO ProperTrailers
+serverExceptionToClientError params err
+  | Just (err' :: GrpcException) <- fromException err =
+      return $ grpcExceptionToTrailers err'
+  | otherwise = do
+      mMsg <- serverExceptionToClient params err
+      return $ simpleProperTrailers (GrpcError GrpcUnknown) mMsg Nothing mempty
+
+{-------------------------------------------------------------------------------
+  Open (ongoing) call
+-------------------------------------------------------------------------------}
+
+-- | Receive RPC input from the client
+--
+-- We do not return trailers, since gRPC does not support sending trailers from
+-- the client to the server (only from the server to the client).
+recvInput :: HasCallStack => Call rpc -> IO (StreamElem NoMetadata (Input rpc))
+recvInput = fmap (fmap snd) . recvInputWithMeta
+
+-- | Receive RPC input from the client, if one exists
+--
+-- When using `recvInput`, the final few messages can look like
+--
+-- > ..
+-- > StreamElem msg2
+-- > StreamElem msg1
+-- > FinalElem  msg0 ..
+--
+-- or like
+--
+-- > ..
+-- > StreamElem msg2
+-- > StreamElem msg1
+-- > StreamElem msg0
+-- > NoMoreElems ..
+--
+-- depending on whether the client indicates that @msg0@ is the last message
+-- when it sends it, or indicates end-of-stream only /after/ sending the last
+-- message.
+--
+-- Many applications do not need to distinguish between these two cases, but
+-- the API provided by `recvInput` makes it a bit awkward to treat them the
+-- same, especially since it is an error to call `recvInput` again after
+-- receiving either `FinalElem` or `NoMoreElems`. In this case, it may be more
+-- convenient to use `recvNextInputElem`, which will report both cases as
+--
+-- > ..
+-- > NextElem msg2
+-- > NextElem msg1
+-- > NextElem msg0
+-- > NoNextElem
+recvNextInputElem :: HasCallStack => Call rpc -> IO (NextElem (Input rpc))
+recvNextInputElem = fmap (fmap snd) . recvEither
+
+-- | Generalization of 'recvInput', providing additional meta-information
+--
+-- This can be used to get some information about how the message was sent, such
+-- as its compressed and uncompressed size.
+--
+-- Most applications will never need to use this function.
+recvInputWithMeta :: forall rpc.
+     HasCallStack
+  => Call rpc
+  -> IO (StreamElem NoMetadata (InboundMeta, Input rpc))
+recvInputWithMeta = recvBoth
+
+-- | Send RPC output to the client
+--
+-- This will send a 'GrpcStatus' of 'GrpcOk' to the client; for anything else
+-- (i.e., to indicate something went wrong), the server handler should call
+-- 'sendGrpcException'.
+--
+-- This is a blocking call if this is the final message (i.e., the call will not
+-- return until the message has been written to the HTTP2 stream).
+sendOutput ::
+     HasCallStack
+  => Call rpc
+  -> StreamElem (ResponseTrailingMetadata rpc) (Output rpc) -> IO ()
+sendOutput call = sendOutputWithMeta call . fmap (def,)
+
+-- | Generalization of 'sendOutput' with additional control
+--
+-- This can be used for example to enable or disable compression for individual
+-- messages.
+--
+-- Most applications will never need to use this function.
+sendOutputWithMeta :: forall rpc.
+     HasCallStack
+  => Call rpc
+  -> StreamElem (ResponseTrailingMetadata rpc) (OutboundMeta, Output rpc)
+  -> IO ()
+sendOutputWithMeta call@Call{callChannel} msg = do
+    initiateResponse call
+    msg' <- bitraverse mkTrailers return msg
+    Session.send callChannel msg'
+
+    -- This /must/ be called before leaving the scope of 'runHandler' (or we
+    -- risk that the HTTP2 stream is cancelled). We can't call 'waitForOutbound'
+    -- /in/ 'runHandler', because if the handler for whatever reason never
+    -- writes the final message, such a call would block indefinitely.
+    StreamElem.whenDefinitelyFinal msg $ \_ ->
+      Session.waitForOutbound callChannel
+  where
+    mkTrailers :: ResponseTrailingMetadata rpc -> IO ProperTrailers
+    mkTrailers metadata = do
+        metadata' <- customMetadataMapFromList <$> buildMetadataIO metadata
+        return $ simpleProperTrailers GrpcOk Nothing Nothing metadata'
+
+-- | Send 'GrpcException' to the client
+--
+-- This closes the connection to the client; sending further messages will
+-- result in an exception being thrown.
+--
+-- Instead of calling 'sendGrpcException' handlers can also simply /throw/ the
+-- gRPC exception (the @grapesy@ /client/ API treats this the same way: a
+-- 'GrpcStatus' other than 'GrpcOk' will be raised as a 'GrpcException'). The
+-- difference is primarily one of preference/convenience, but the two are not
+-- /completely/ the same: when the 'GrpcException' is thrown,
+-- 'Context.serverTopLevel' will see the handler throw an exception (and, by
+-- default, log that exception); when using 'sendGrpcException', the handler is
+-- considered to have terminated normally. For handlers defined using
+-- "Network.GRPC.Server.StreamType" throwing the exception is the only option.
+--
+-- Technical note: if the response to the client has not yet been initiated when
+-- 'sendGrpcException' is called, this will make use of the [gRPC
+-- Trailers-Only](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md)
+-- case.
+sendGrpcException :: Call rpc -> GrpcException -> IO ()
+sendGrpcException call = sendProperTrailers call . grpcExceptionToTrailers
+
+-- | Get request metadata
+--
+-- The request metadata is included in the client's request headers when they
+-- first make the request, and is therefore available immediately to the handler
+-- (even if the first /message/ from the client may not yet have been sent).
+--
+-- == Dealing with invalid metadata
+--
+-- Metadata can be \"invalid\" to varying degrees, and we deal with this in
+-- different ways:
+--
+-- * The header could be syntactically invalid (e.g. binary data in an ASCII
+--   header), or could use a reserved name. If 'serverVerifyHeaders' is enabled,
+--   such a request will be rejected; if not, 'getRequestMetadata' will throw an
+--   exception in this case. If you need access to these ill-formed headers, be
+--   sure to /disable/ 'serverVerifyHeaders', call 'getRequestHeaders' to get
+--   the full set of request headers, and then inspect 'requestUnrecognized'.
+--
+-- * The headers might be valid, but we might be unable to parse them as the
+--   @rpc@ specific 'RequestMetadata' (that is, 'parseMetadata' throws an
+--   exception). In this case 'getRequestMetadata' will throw an exception
+--   /if called/, but the request will not be rejected even if
+--   'serverVerifyHeaders' is enabled. If you want access to the raw headers,
+--   call 'getRequestHeaders' and then inspect 'requestMetadata'.
+--
+-- * There might be some additional metadata present. This is really a special
+--   case of the previous point: it depends on the 'ParseMetadata' instance
+--   whether these additional headers result in an exception or whether they
+--   are simply ignored. As above, the full set (including any ignored headers)
+--   is always available through 'getRequestHeaders'/'requestMetadata'.
+--
+-- Note: the 'ParseMetadata' instance for 'NoMetadata' is defined to throw an
+-- exception if /any/ metadata is present. The rationale here is that for @rpc@
+-- without 'Metadata', there is no need to call 'getRequestMetadata' and co; if
+-- these functions are not called, then any metadata that is present will simply
+-- be ignored. If 'getRequestMetadata' /is/ called, this amounts to check that
+-- no metadata is present.
+getRequestMetadata :: Call rpc -> IO (RequestMetadata rpc)
+getRequestMetadata Call{callRequestHeaders} =
+    parseMetadata . customMetadataMapToList $
+      requestMetadata callRequestHeaders
+
+-- | Set the initial response metadata
+--
+-- This can be set at any time before the response is initiated (either
+-- implicitly by calling 'sendOutput', or explicitly by calling
+-- 'initiateResponse' or 'sendTrailersOnly'). If the response has already
+-- been initiated (and therefore the initial response metadata already sent),
+-- will throw 'ResponseAlreadyInitiated'.
+--
+-- Note that this is about the /initial/ metadata; additional metadata can be
+-- sent after the final message; see 'sendOutput'.
+setResponseInitialMetadata ::
+     HasCallStack
+  => Call rpc -> ResponseInitialMetadata rpc -> IO ()
+setResponseInitialMetadata Call{ callResponseMetadata
+                               , callResponseKickoff
+                               }
+                           md = atomically $ do
+    mKickoff <- fmap kickoffCallStack <$> tryReadTMVar callResponseKickoff
+    case mKickoff of
+      Nothing ->
+        writeTVar callResponseMetadata (CallInitialMetadataSet md callStack)
+      Just cs ->
+        throwSTM $ ResponseAlreadyInitiated cs callStack
+
+{-------------------------------------------------------------------------------
+  Low-level API
+-------------------------------------------------------------------------------}
+
+-- | Initiate the response
+--
+-- This will cause the initial response metadata to be sent
+-- (see also 'setResponseMetadata').
+--
+-- Does nothing if the response was already initated (that is, the response
+-- headers, or trailers in the case of 'sendTrailersOnly', have already been
+-- sent).
+initiateResponse :: HasCallStack => Call rpc -> IO ()
+initiateResponse Call{callResponseKickoff} = void $
+    atomically $ tryPutTMVar callResponseKickoff $ KickoffRegular callStack
+
+-- | Use the gRPC @Trailers-Only@ case for non-error responses
+--
+-- Under normal circumstances a gRPC server will respond to the client with
+-- an initial set of headers, then zero or more messages, and finally a set of
+-- trailers. When there /are/ no messages, this /can/ be collapsed into a single
+-- set of trailers (or headers, depending on your point of view); the gRPC
+-- specification refers to this as the @Trailers-Only@ case. It mandates:
+--
+-- > Most responses are expected to have both headers and trailers but
+-- > Trailers-Only is permitted for calls that produce an immediate error.
+--
+-- In @grapesy@, if a server handler throws a 'GrpcException', we will make use
+-- of this @Trailers-Only@ case if applicable, as per the specification.
+--
+-- /However/, some servers make use of @Trailers-Only@ also in non-error cases.
+-- For example, the @listFeatures@ handler in the official Python route guide
+-- example server will use @Trailers-Only@ if there are no features to report.
+-- Since this is not conform the gRPC specification, we do not do this in
+-- @grapesy@ by default, but we make the option available through
+-- 'sendTrailersOnly'.
+--
+-- Throws 'ResponseAlreadyInitiated' if the response has already been initiated.
+sendTrailersOnly ::
+     HasCallStack
+  => Call rpc -> ResponseTrailingMetadata rpc -> IO ()
+sendTrailersOnly Call{callContext, callResponseKickoff} metadata = do
+    metadata' <- buildMetadataIO metadata
+    atomically $ do
+      previously <- fmap kickoffCallStack <$> tryReadTMVar callResponseKickoff
+      case previously of
+        Nothing -> putTMVar callResponseKickoff $
+                     KickoffTrailersOnly callStack (trailers metadata')
+        Just cs -> throwSTM $ ResponseAlreadyInitiated cs callStack
+  where
+    ServerContext{serverParams} = callContext
+
+    trailers :: [CustomMetadata] -> TrailersOnly
+    trailers metadata' = TrailersOnly {
+          trailersOnlyContentType =
+            serverContentType serverParams
+        , trailersOnlyProper =
+            simpleProperTrailers GrpcOk Nothing Nothing $
+              customMetadataMapFromList metadata'
+        }
+
+-- | Get full request headers, including any potential invalid headers
+--
+-- NOTE: When 'serverVerifyHeaders' is enabled the caller can be sure that the
+-- 'RequestHeaders'' do not contain any errors, even though unfortunately this
+-- is not visible from the type.
+getRequestHeaders :: Call rpc -> IO (RequestHeaders' HandledSynthesized)
+getRequestHeaders Call{callRequestHeaders} =
+    return callRequestHeaders
+
+{-------------------------------------------------------------------------------
+  Protocol specific wrappers
+-------------------------------------------------------------------------------}
+
+-- | Send the next output
+--
+-- If this is the last output, you should call 'sendTrailers' after
+-- (or use 'sendFinalOutput').
+sendNextOutput ::
+     HasCallStack
+  => Call rpc -> Output rpc -> IO ()
+sendNextOutput call = sendOutput call . StreamElem
+
+-- | Send final output
+--
+-- See also 'sendTrailers'.
+sendFinalOutput ::
+     HasCallStack
+  => Call rpc -> (Output rpc, ResponseTrailingMetadata rpc) -> IO ()
+sendFinalOutput call = sendOutput call . uncurry FinalElem
+
+-- | Send trailers
+--
+-- This tells the client that there will be no more outputs. You should call
+-- this (or 'sendFinalOutput') even when there is no special information to be
+-- included in the trailers.
+sendTrailers ::
+     HasCallStack
+  => Call rpc -> ResponseTrailingMetadata rpc -> IO ()
+sendTrailers call = sendOutput call . NoMoreElems
+
+-- | Receive next input
+--
+-- Throws 'ProtocolException' if there are no more inputs.
+recvNextInput :: forall rpc. HasCallStack => Call rpc -> IO (Input rpc)
+recvNextInput call@Call{} = do
+    mInp <- recvNextInputElem call
+    case mInp of
+      NoNextElem   -> err $ TooFewInputs @rpc
+      NextElem inp -> return inp
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwIO . ProtocolException
+
+-- | Receive input, which we expect to be the /final/ input
+--
+-- Throws 'ProtocolException' if the input we receive is not final.
+--
+-- NOTE: If the first input we receive from the client is not marked as final,
+-- we will block until we receive the end-of-stream indication.
+recvFinalInput :: forall rpc. HasCallStack => Call rpc -> IO (Input rpc)
+recvFinalInput call@Call{} = do
+    inp1 <- recvInput call
+    case inp1 of
+      NoMoreElems    NoMetadata -> err $ TooFewInputs @rpc
+      FinalElem  inp NoMetadata -> return inp
+      StreamElem inp            -> do
+        inp2 <- recvInput call
+        case inp2 of
+          NoMoreElems     NoMetadata -> return inp
+          FinalElem  inp' NoMetadata -> err $ TooManyInputs @rpc inp'
+          StreamElem inp'            -> err $ TooManyInputs @rpc inp'
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwIO . ProtocolException
+
+-- | Wait for the client to indicate that there are no more inputs
+--
+-- Throws 'ProtocolException' if we received an input.
+recvEndOfInput :: forall rpc. HasCallStack => Call rpc -> IO ()
+recvEndOfInput call@Call{} = do
+    mInp <- recvInput call
+    case mInp of
+      NoMoreElems    NoMetadata -> return ()
+      FinalElem  inp NoMetadata -> err $ TooManyInputs @rpc inp
+      StreamElem inp            -> err $ TooManyInputs @rpc inp
+  where
+    err :: ProtocolException rpc -> IO a
+    err = throwIO . ProtocolException
+
+{-------------------------------------------------------------------------------
+  Internal API
+-------------------------------------------------------------------------------}
+
+-- | Send 'ProperTrailers'
+--
+-- This function is not part of the public API: we use it as the top-level
+-- exception handler in "Network.GRPC.Server" to forward exceptions in server
+-- handlers to the client.
+--
+-- If no messages have been sent yet, we make use of the @Trailers-Only@ case.
+sendProperTrailers :: Call rpc -> ProperTrailers -> IO ()
+sendProperTrailers Call{callContext, callResponseKickoff, callChannel}
+                   trailers = do
+    updated <-
+      atomically $
+        tryPutTMVar callResponseKickoff $
+          KickoffTrailersOnly
+            callStack
+            ( properTrailersToTrailersOnly (
+                trailers
+              , serverContentType serverParams
+              )
+            )
+    unless updated $
+      -- If we didn't update, then the response has already been initiated and
+      -- we cannot make use of the Trailers-Only case.
+      Session.send callChannel (NoMoreElems trailers)
+    Session.waitForOutbound callChannel
+  where
+    ServerContext{serverParams} = callContext
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary: deal with final message
+
+  We get "trailers" (really headers) only in the Trailers-Only case.
+-------------------------------------------------------------------------------}
+
+recvBoth :: forall rpc.
+     HasCallStack
+  => Call rpc
+  -> IO (StreamElem NoMetadata (InboundMeta, Input rpc))
+recvBoth Call{callChannel} =
+    flatten <$> Session.recvBoth callChannel
+  where
+    -- We lose type information here: Trailers-Only is no longer visible
+    flatten ::
+         Either
+           Void
+           (StreamElem NoMetadata (InboundMeta, Input rpc))
+      -> StreamElem NoMetadata (InboundMeta, Input rpc)
+    flatten (Left  impossible) = absurd impossible
+    flatten (Right streamElem) = streamElem
+
+recvEither :: forall rpc.
+     HasCallStack
+  => Call rpc
+  -> IO (NextElem (InboundMeta, Input rpc))
+recvEither Call{callChannel} =
+    flatten <$> Session.recvEither callChannel
+  where
+    -- We use this only in 'recvNextInputElem', where we just care that we receive
+    -- a message.
+    flatten ::
+         Either
+           Void
+           (Either NoMetadata (InboundMeta, Input rpc))
+      -> NextElem (InboundMeta, Input rpc)
+    flatten (Left impossible)         = absurd impossible
+    flatten (Right (Left NoMetadata)) = NoNextElem
+    flatten (Right (Right msg))       = NextElem msg
+
+{-------------------------------------------------------------------------------
+  Exceptions
+-------------------------------------------------------------------------------}
+
+-- | Handler terminated early
+--
+-- This gets thrown in the handler, and sent to the client, when the handler
+-- terminates before sending the final output and trailers.
+data HandlerTerminated = HandlerTerminated
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+data ResponseAlreadyInitiated = ResponseAlreadyInitiated {
+      -- | When was the response first initiated?
+      responseInitiatedFirst :: CallStack
+
+      -- | Where did we attempt to initiate the response a second time?
+    , responseInitiatedAgain :: CallStack
+    }
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | The response initial metadata must be set before the first message is sent
+data ResponseInitialMetadataNotSet = ResponseInitialMetadataNotSet
+  deriving stock (Show)
+  deriving anyclass (Exception)
diff --git a/src/Network/GRPC/Server/Context.hs b/src/Network/GRPC/Server/Context.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Context.hs
@@ -0,0 +1,112 @@
+-- | Server context
+--
+-- Intended for unqualified import.
+module Network.GRPC.Server.Context (
+    -- * Context
+    ServerContext(..)
+  , newServerContext
+    -- * Configuration
+  , ServerParams(..)
+  ) where
+
+import Control.Exception
+import System.IO
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Server.RequestHandler.API
+import Network.GRPC.Spec
+import Data.Text (Text)
+import Data.Text qualified as Text
+
+{-------------------------------------------------------------------------------
+  Context
+
+  TODO: <https://github.com/well-typed/grapesy/issues/130>
+  The server context is more of a placeholder at the moment. The plan is to use
+  it to keep things like server usage statistics etc.
+-------------------------------------------------------------------------------}
+
+data ServerContext = ServerContext {
+      serverParams :: ServerParams
+    }
+
+newServerContext :: ServerParams -> IO ServerContext
+newServerContext serverParams = do
+    return ServerContext{
+        serverParams
+      }
+
+{-------------------------------------------------------------------------------
+  Configuration
+-------------------------------------------------------------------------------}
+
+data ServerParams = ServerParams {
+      -- | Server compression preferences
+      serverCompression :: Compr.Negotation
+
+      -- | Top-level hook for request handlers
+      --
+      -- The most important responsibility of this function is to deal with
+      -- any exceptions that the handler might throw, but in principle it has
+      -- full control over how requests are handled.
+      --
+      -- The default merely logs any exceptions to 'stderr'.
+    , serverTopLevel :: RequestHandler () -> RequestHandler ()
+
+      -- | Render handler-side exceptions for the client
+      --
+      -- When a handler throws an exception other than a 'GrpcException', we use
+      -- this function to render that exception for the client (server-side
+      -- logging is taken care of by 'serverTopLevel'). The default
+      -- implementation simply calls 'displayException' on the exception, which
+      -- means the full context is visible on the client, which is most useful
+      -- for debugging. However, it is a potential security concern: if the
+      -- exception happens to contain sensitive information, this information
+      -- will also be visible on the client. You may therefore wish to override
+      -- the default behaviour.
+    , serverExceptionToClient :: SomeException -> IO (Maybe Text)
+
+      -- | Override content-type for response to client.
+      --
+      -- Set to 'Nothing' to omit the content-type header completely
+      -- (this is not conform the gRPC spec).
+    , serverContentType :: Maybe ContentType
+
+      -- | Verify that all request headers can be parsed
+      --
+      -- When enabled, we verify at the start of each request that all request
+      -- headers are valid. By default we do /not/ do this, throwing an error
+      -- only in scenarios where we really cannot continue.
+      --
+      -- Even if enabled, we will not attempt to parse @rpc@-specific metadata
+      -- (merely that the metadata is syntactically correct). See
+      -- 'Network.GRPC.Server.getRequestMetadata' for detailed discussion.
+    , serverVerifyHeaders :: Bool
+    }
+
+instance Default ServerParams where
+  def = ServerParams {
+        serverCompression       = def
+      , serverTopLevel          = defaultServerTopLevel
+      , serverExceptionToClient = defaultServerExceptionToClient
+      , serverContentType       = Just ContentTypeDefault
+      , serverVerifyHeaders     = False
+      }
+
+defaultServerTopLevel :: RequestHandler () -> RequestHandler ()
+defaultServerTopLevel h unmask req resp =
+    h unmask req resp `catch` handler
+  where
+    handler :: SomeException -> IO ()
+    handler = hPrint stderr
+
+-- | Default implementation for 'serverExceptionToClient'
+--
+-- We unwrap the 'SomeException' wrapper so that we do not include the exception
+-- context in the output to the client (relevant for @ghc >= 9.10@ only).
+--
+-- See <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0330-exception-backtraces.rst>.
+defaultServerExceptionToClient :: SomeException -> IO (Maybe Text)
+defaultServerExceptionToClient (SomeException e) =
+    return $ Just (Text.pack $ "Server-side exception: " ++ displayException e)
diff --git a/src/Network/GRPC/Server/Handler.hs b/src/Network/GRPC/Server/Handler.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Handler.hs
@@ -0,0 +1,287 @@
+-- | RPC handlers
+--
+-- Intended for unqualified import.
+module Network.GRPC.Server.Handler (
+    RpcHandler(..)
+  , hoistRpcHandler
+    -- * Construction
+  , mkRpcHandler
+  , mkRpcHandlerNoDefMetadata
+    -- * Hide type argument
+  , SomeRpcHandler(..)
+  , someRpcHandler
+  , hoistSomeRpcHandler
+    -- * Execution
+  , runHandler
+  ) where
+
+import Prelude hiding (lookup)
+
+import Control.Concurrent.Async
+import Control.Monad
+import Control.Monad.Catch
+import Control.Monad.IO.Class
+import Data.Kind
+import Data.Proxy
+import GHC.Stack
+import System.ThreadManager (KilledByThreadManager(..))
+
+import Network.GRPC.Common
+import Network.GRPC.Server.Call
+import Network.GRPC.Server.Context
+import Network.GRPC.Util.GHC
+import Network.GRPC.Util.HTTP2.Stream (ClientDisconnected(..))
+import Network.GRPC.Util.Session qualified as Session
+
+{-------------------------------------------------------------------------------
+  Handlers
+
+  This is essentially an untyped interface; for a typed layer, see
+  "Network.GRPC.Server.Protobuf".
+-------------------------------------------------------------------------------}
+
+-- | Handler for an RPC request
+--
+-- To construct an 'RpcHandler', you have two options:
+--
+-- * Use the \"raw\" API by calling 'mkRpcHandler'; this gives you full control
+--   over the interaction with the client.
+-- * Use the API from "Network.GRPC.Server.StreamType" to define handlers that
+--   use the Protobuf stream types. This API is more convenient, and can be used
+--   to guarantee at compile-time  that you have a handler for every method of
+--   the services you support, but provides less flexibility (although it offers
+--   an \"escape\" to the full API through
+--   'Network.GRPC.Server.StreamType.RawMethod').
+--
+-- __Note on cancellation.__ The GRPC spec allows clients to \"cancel\" a
+-- request (<https://grpc.io/docs/guides/cancellation/>). This does not
+-- correspond to any specific message being sent across the network; instead,
+-- the client simply disappears. The spec is quite clear that it is the
+-- responsibility of the handler /itself/ to monitor for this. In @grapesy@ this
+-- works as follows:
+--
+-- * Handlers are /not/ terminated when a client disappears. This allows the
+--   handler to finish what it's doing, and terminate cleanly.
+-- * When a handler tries to receive a message from the client ('recvInput'), or
+--   send a message to the client ('sendOutput'), and the client disappeared,
+--   this will result in a 'Network.GRPC.Server.ClientDisconnected' exception,
+--   which the handler can catch and deal with.
+--
+-- Cancellation is always at the request of the /client/. If the /handler/
+-- terminates early (that is, before sending the final output and trailers), a
+-- 'Network.GRPC.Server.HandlerTerminated' exception will be raised and sent to
+-- the client as 'GrpcException' with 'GrpcUnknown' error code.
+data RpcHandler (m :: Type -> Type) (rpc :: k) = RpcHandler {
+      -- | Handler proper
+      runRpcHandler :: Call rpc -> m ()
+    }
+
+-- | Hoist an 'RpcHandler' to a different monad
+--
+-- We do not make 'RpcHandler' an instance of @MFunctor@ (from the @mmorph@
+-- package) because @RpcHandler m@ is not a monad; this means that even though
+-- the types line up, the concepts do not.
+hoistRpcHandler ::
+     (forall a. m a -> n a)
+  -> RpcHandler m rpc
+  -> RpcHandler n rpc
+hoistRpcHandler f (RpcHandler h) = RpcHandler (f . h)
+
+{-------------------------------------------------------------------------------
+  Construction
+-------------------------------------------------------------------------------}
+
+-- | Constructor for 'RpcHandler'
+--
+-- When the handler sends its first message to the client, @grapesy@ must first
+-- send the initial metadata (of type 'ResponseInitialMetadata') to the client.
+-- This metadata can be updated at any point before that first message (for
+-- example, after receiving some messages from the client) by calling
+-- 'setResponseInitialMetadata'. If this function is never called, however, then
+-- we need a default value; 'mkRpcHandler' therefore calls
+-- 'setResponseInitialMetadata' once before the handler proper, relying on the
+-- 'Default' instance.
+--
+-- For RPCs where a sensible default does not exist (perhaps the initial
+-- response metadata needs the request metadata from the client, or even some
+-- messages from the client), you can use 'mkRpcHandlerNoDefMetadata'.
+mkRpcHandler ::
+     ( Default (ResponseInitialMetadata rpc)
+     , MonadIO m
+     )
+  => (Call rpc -> m ()) -> RpcHandler m rpc
+mkRpcHandler k = RpcHandler $ \call -> do
+    liftIO $ setResponseInitialMetadata call def
+    k call
+
+-- | Variant on 'mkRpcHandler' that does not call 'setResponseInitialMetadata'
+--
+-- You /must/ call 'setResponseInitialMetadata' before sending the first
+-- message. See 'mkRpcHandler' for additional discussion.
+mkRpcHandlerNoDefMetadata :: (Call rpc -> m ()) -> RpcHandler m rpc
+mkRpcHandlerNoDefMetadata = RpcHandler
+
+{-------------------------------------------------------------------------------
+  Hide the type argument
+-------------------------------------------------------------------------------}
+
+-- | Wrapper around 'RpcHandler' that hides the type argument
+--
+-- Construct using 'someRpcHandler'.
+data SomeRpcHandler m = forall rpc.
+     SupportsServerRpc rpc
+  => SomeRpcHandler (Proxy rpc) (RpcHandler m rpc)
+
+-- | Constructor for 'SomeRpcHandler'
+someRpcHandler :: forall rpc m.
+     SupportsServerRpc rpc
+  => RpcHandler m rpc -> SomeRpcHandler m
+someRpcHandler = SomeRpcHandler Proxy
+
+hoistSomeRpcHandler ::
+     (forall a. m a -> n a)
+  -> SomeRpcHandler m
+  -> SomeRpcHandler n
+hoistSomeRpcHandler f (SomeRpcHandler p h) =
+    SomeRpcHandler p (hoistRpcHandler f h)
+
+{-------------------------------------------------------------------------------
+  Execution
+-------------------------------------------------------------------------------}
+
+-- | Accept incoming call
+--
+-- If the handler throws an exception, we will /attempt/ to inform the client
+-- of what happened (see 'forwardException') before re-throwing the exception.
+runHandler :: forall rpc.
+     HasCallStack
+  => (forall x. IO x -> IO x)
+  -> Call rpc
+  -> RpcHandler IO rpc
+  -> IO ()
+runHandler unmask call handler = do
+    -- http2 will kill the handler when the client disappears, but we want the
+    -- handler to be able to terminate cleanly. We therefore run the handler in
+    -- a separate thread, and wait for that thread to terminate.
+    handlerThread <- asyncLabelled "grapesy:handler" handler'
+    waitForHandler unmask call handlerThread
+  where
+    -- The handler itself will run in a separate thread
+    handler' :: IO ()
+    handler' = do
+        result <- try $ runRpcHandler handler call
+        handlerTeardown result
+
+    -- Deal with any exceptions thrown in the handler
+    handlerTeardown :: Either SomeException () -> IO ()
+    handlerTeardown (Right ()) = do
+        -- Handler terminated successfully, but may not have sent final message.
+        -- /If/ the final message was sent, 'forwardException' does nothing.
+        forwarded <- forwardException call $ toException HandlerTerminated
+        ignoreUncleanClose call $ ExitCaseSuccess ()
+        when forwarded $
+          -- The handler terminated before it sent the final message.
+          throwM HandlerTerminated
+    handlerTeardown (Left err) = do
+        -- The handler threw an exception. Attempt to tell the client.
+        _forwarded <- forwardException call err
+        ignoreUncleanClose call $ ExitCaseException err
+        throwM err
+
+-- | Close the connection to the client, ignoring errors
+--
+-- An unclean shutdown can have 2 causes:
+--
+-- 1. We lost communication during the call.
+--
+--    We have no way of telling the client that something went wrong.
+--
+-- 2. The handler failed to properly terminate the communication
+--    (send the final message and call 'waitForOutbound').
+--
+--    This is a bug in the handler, and is trickier to deal with. We don't
+--    really know what state the handler left the channel in; for example,
+--    we might have killed the thread halfway through sending a message.
+--
+--    So there not really anything we can do here (except perhaps show
+--    the exception in 'serverTopLevel').
+ignoreUncleanClose :: Call rpc -> ExitCase a -> IO ()
+ignoreUncleanClose Call{callChannel} reason =
+    void $ Session.close callChannel reason
+
+-- | Wait for the handler to terminate
+--
+-- If we are interrupted while we wait, it depends on the interruption:
+--
+-- * If we are interrupted by 'HTTP2.KilledByHttp2ThreadManager', it means we
+--   got disconnected from the client. In this case, we shut down the channel
+--   (if it's not already shut down); /if/ the handler at this tries to
+--   communicate with the client, an exception will be raised. However, the
+--   handler /can/ terminate cleanly and, of course, typically will.
+--   Importantly, this avoids race conditions: even if the server and the client
+--   agree that no further communication takes place (the client sent their
+--   final message, the server sent the trailers), without the indireciton of
+--   this additional thread it can still happen that http2 kills the handler
+--   (after the client disconnects) before the handler has a chance to
+--   terminate.
+--
+-- * If we are interrupted by another kind of asynchronous exception, we /do/
+--   kill the handler (this might for example be a timeout).
+--
+-- This is in line with the overall design philosophy of communication in this
+-- library: exceptions will only be raised synchronously when communication is
+-- attempted, not asynchronously when we notice a problem.
+waitForHandler ::
+     HasCallStack
+  => (forall x. IO x -> IO x)
+  -> Call rpc -> Async () -> IO ()
+waitForHandler unmask call handlerThread = loop
+  where
+    loop :: IO ()
+    loop = unmask (wait handlerThread) `catch` handleException
+
+    handleException :: SomeException -> IO ()
+    handleException err
+      | Just (KilledByThreadManager mErr) <- fromException err = do
+          let exitReason :: ExitCase ()
+              exitReason =
+                case mErr of
+                  Nothing -> ExitCaseSuccess ()
+                  Just exitWithException ->
+                    ExitCaseException . toException $
+                      ClientDisconnected exitWithException callStack
+          ignoreUncleanClose call exitReason
+          loop
+
+      | otherwise = do
+          -- If we get an exception while waiting on the handler, there
+          -- are two possibilities:
+          --
+          -- 1. The exception was an asynchronous exception, thrown to us
+          --    externally. In this case @cancalWith@ will throw the
+          --    exception to the handler (and wait for it to terminate).
+          -- 2. The exception was thrown by the handler itself. In this
+          --    case @cancelWith@ is a no-op.
+          cancelWith handlerThread err
+          throwM err
+
+-- | Process exception thrown by a handler
+--
+-- Trace the exception and forward it to the client.
+--
+-- The attempt to forward it to the client is a best-effort only:
+--
+-- * The nature of the exception might mean that we cannot send anything to
+--   the client at all.
+-- * It is possible the exception was thrown /after/ the handler already send
+--   the trailers to the client.
+--
+-- We therefore catch and suppress all exceptions here. Returns @True@ if the
+-- forwarding was successful, @False@ if it raised an exception.
+forwardException :: Call rpc -> SomeException -> IO Bool
+forwardException call@Call{callContext} err = do
+    trailers <- serverExceptionToClientError (serverParams callContext) err
+    (True <$ sendProperTrailers call trailers) `catch` handler
+ where
+   handler :: SomeException -> IO Bool
+   handler _e = return False
diff --git a/src/Network/GRPC/Server/HandlerMap.hs b/src/Network/GRPC/Server/HandlerMap.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/HandlerMap.hs
@@ -0,0 +1,57 @@
+-- | Collection of handlers
+--
+-- This is not part of grapesy's public API.
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Server.HandlerMap (HandlerMap)
+-- > import Network.GRPC.Server.HandlerMap qualified as HandlerMap
+module Network.GRPC.Server.HandlerMap (
+    -- * Definition
+    HandlerMap -- opaque
+    -- * Construction
+  , fromList
+    -- * Query
+  , lookup
+  , keys
+  ) where
+
+import Prelude hiding (lookup)
+
+import Data.HashMap.Strict (HashMap)
+import Data.HashMap.Strict qualified as HashMap
+
+import Network.GRPC.Spec
+import Network.GRPC.Server.Handler
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+newtype HandlerMap m = HandlerMap {
+      getMap :: HashMap Path (SomeRpcHandler m)
+    }
+
+{-------------------------------------------------------------------------------
+  Construction
+-------------------------------------------------------------------------------}
+
+fromList :: [SomeRpcHandler m] -> HandlerMap m
+fromList = HandlerMap . HashMap.fromList . map (\h -> (path h, h))
+
+{-------------------------------------------------------------------------------
+  Query
+-------------------------------------------------------------------------------}
+
+lookup :: Path -> HandlerMap m -> Maybe (SomeRpcHandler m)
+lookup p = HashMap.lookup p . getMap
+
+keys :: HandlerMap m -> [Path]
+keys = HashMap.keys . getMap
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary
+-------------------------------------------------------------------------------}
+
+path :: forall m. SomeRpcHandler m -> Path
+path (SomeRpcHandler rpc _handler) = rpcPath rpc
diff --git a/src/Network/GRPC/Server/Protobuf.hs b/src/Network/GRPC/Server/Protobuf.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Protobuf.hs
@@ -0,0 +1,32 @@
+-- | gRPC server using Protobuf
+--
+-- Intended for unqualified import.
+module Network.GRPC.Server.Protobuf (
+    -- * Compute full Protobuf API
+    ProtobufServices
+  , ProtobufMethodsOf
+  , ProtobufMethods
+  ) where
+
+import Data.Kind
+import Data.ProtoLens.Service.Types
+import GHC.TypeLits
+
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Compute full Protobuf API
+-------------------------------------------------------------------------------}
+
+type family ProtobufServices (servs :: [Type]) :: [[Type]] where
+  ProtobufServices '[]             = '[]
+  ProtobufServices (serv ': servs) = ProtobufMethodsOf serv
+                                  ': ProtobufServices servs
+
+type family ProtobufMethodsOf (serv :: Type) :: [Type] where
+  ProtobufMethodsOf serv = ProtobufMethods serv (ServiceMethods serv)
+
+type family ProtobufMethods (serv :: Type) (methds :: [Symbol]) :: [Type] where
+  ProtobufMethods serv '[]             = '[]
+  ProtobufMethods serv (meth ': meths) = Protobuf serv meth
+                                      ': ProtobufMethods serv meths
diff --git a/src/Network/GRPC/Server/RequestHandler.hs b/src/Network/GRPC/Server/RequestHandler.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/RequestHandler.hs
@@ -0,0 +1,229 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Request handler
+--
+-- This is not part of the library's public API.
+--
+-- Intended for unqualified import.
+module Network.GRPC.Server.RequestHandler (
+    -- * Definition
+    RequestHandler
+  , requestHandlerToServer
+    -- * Construction
+  , requestHandler
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.Thread.Delay qualified as UnboundedDelays
+import Control.Exception (evaluate)
+import Control.Monad.Catch
+import Data.Bifunctor
+import Data.ByteString.Builder qualified as Builder
+import Data.ByteString.Char8 qualified as BS.Char8
+import Data.ByteString.UTF8 qualified as BS.UTF8
+import Data.Maybe (fromMaybe)
+import Data.Proxy
+import Data.Text qualified as Text
+import Network.HTTP.Types qualified as HTTP
+import Network.HTTP2.Server qualified as HTTP2
+
+import Network.GRPC.Server.Call
+import Network.GRPC.Server.Context (ServerContext (..), ServerParams(..))
+import Network.GRPC.Server.Handler
+import Network.GRPC.Server.HandlerMap (HandlerMap)
+import Network.GRPC.Server.HandlerMap qualified as HandlerMap
+import Network.GRPC.Server.RequestHandler.API
+import Network.GRPC.Server.Session (CallSetupFailure(..))
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Serialization
+import Network.GRPC.Util.GHC
+import Network.GRPC.Util.Session.Server
+
+{-------------------------------------------------------------------------------
+  Construct request handler
+-------------------------------------------------------------------------------}
+
+-- | Construct request handler
+requestHandler :: HandlerMap IO -> ServerContext -> RequestHandler ()
+requestHandler handlers ctxt unmask request respond = do
+    labelThisThread "grapesy:requestHandler"
+
+    SomeRpcHandler (_ :: Proxy rpc) handler <-
+      findHandler handlers request      `catch` setupFailure params respond
+    (call :: Call rpc, mTimeout :: Maybe Timeout) <-
+      setupCall connectionToClient ctxt `catch` setupFailure params respond
+
+    imposeTimeout mTimeout $
+      runHandler unmask call handler
+  where
+    ServerContext{serverParams = params} = ctxt
+
+    connectionToClient :: ConnectionToClient
+    connectionToClient = ConnectionToClient{request, respond}
+
+    timeoutException :: GrpcException
+    timeoutException = GrpcException {
+          grpcError         = GrpcDeadlineExceeded
+        , grpcErrorMessage  = Nothing
+        , grpcErrorDetails  = Nothing
+        , grpcErrorMetadata = []
+        }
+
+    imposeTimeout :: Maybe Timeout -> IO () -> IO ()
+    imposeTimeout Nothing  = id
+    imposeTimeout (Just t) = timeoutWith timeoutException (timeoutToMicro t)
+
+-- | Find handler (based on the path)
+--
+-- Throws 'CallSetupFailure' if no handler could be found.
+findHandler ::
+     HandlerMap IO
+  -> HTTP2.Request
+  -> IO (SomeRpcHandler IO)
+findHandler handlers req = do
+    -- TODO: <https://github.com/well-typed/grapesy/issues/131>
+    -- We should do some request logging.
+
+    resourceHeaders <-
+      either throwM return . first CallSetupInvalidResourceHeaders $
+        parseResourceHeaders rawHeaders
+    let path = resourcePath resourceHeaders
+
+    -- We have to be careful looking up the handler; there might be pure
+    -- exceptions in the list of handlers (most commonly @undefined@).
+    mHandler <- try $ evaluate $ HandlerMap.lookup path handlers
+    case mHandler of
+      Right (Just h) -> return h
+      Right Nothing  -> throwM $ CallSetupUnimplementedMethod path
+      Left err       -> throwM $ CallSetupHandlerLookupException err
+  where
+    rawHeaders :: RawResourceHeaders
+    rawHeaders = RawResourceHeaders {
+          rawPath   = fromMaybe "" $ HTTP2.requestPath   req
+        , rawMethod = fromMaybe "" $ HTTP2.requestMethod req
+        }
+
+-- | Call setup failure
+--
+-- Something went wrong during call setup. No response has been sent to the
+-- client at all yet. We try to tell the client what happened, but ignore any
+-- exceptions that might arise from doing so.
+setupFailure ::
+     ServerParams
+  -> (HTTP2.Response -> IO ())
+  -> CallSetupFailure
+  -> IO a
+setupFailure params sendResponse failure = do
+    response <- mkFailureResponse params failure
+    _ :: Either SomeException () <- try $ sendResponse response
+    throwM failure
+
+{-------------------------------------------------------------------------------
+  Failures
+-------------------------------------------------------------------------------}
+
+-- | Turn setup failure into response to the client
+--
+-- The gRPC spec mandates that we /always/ return HTTP 200 OK, but it does not
+-- explicitly say what to do when the request is malformed (not conform the
+-- gRPC specification). We choose to return HTTP errors in this case.
+--
+-- See <https://datatracker.ietf.org/doc/html/rfc7231#section-6.5> for
+-- a discussion of the HTTP error codes, specifically
+--
+-- * 400 Bad Request
+--   <https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1>
+-- * 405 Method Not Allowed
+--   <https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.5>
+--   <https://datatracker.ietf.org/doc/html/rfc7231#section-7.4.1>
+--
+-- Testing out-of-spec errors can be bit awkward. One option is @curl@:
+--
+-- > curl --verbose --http2 --http2-prior-knowledge http://127.0.0.1:50051/
+mkFailureResponse :: ServerParams -> CallSetupFailure -> IO HTTP2.Response
+mkFailureResponse params = \case
+    CallSetupInvalidResourceHeaders (InvalidMethod method) ->
+      return $
+        HTTP2.responseBuilder
+          HTTP.methodNotAllowed405
+          [("Allow", "POST")]
+          (Builder.byteString . mconcat $ [
+              "Unexpected :method " <> method <> ".\n"
+            , "The only method supported by gRPC is POST.\n"
+            ])
+    CallSetupInvalidResourceHeaders (InvalidPath path) ->
+      return $
+        HTTP2.responseBuilder HTTP.badRequest400 [] . Builder.byteString $
+          "Invalid path " <> path
+    CallSetupInvalidRequestHeaders invalid ->
+      return $
+        HTTP2.responseBuilder (statusInvalidHeaders invalid) [] $
+          prettyInvalidHeaders invalid
+    CallSetupUnsupportedCompression cid ->
+      return $
+        HTTP2.responseBuilder HTTP.badRequest400 [] . Builder.byteString $
+          "Unsupported compression: " <> BS.UTF8.fromString (show cid)
+    CallSetupUnimplementedMethod path -> do
+      let trailersOnly :: TrailersOnly
+          trailersOnly = properTrailersToTrailersOnly (
+              grpcExceptionToTrailers $ grpcUnimplemented path
+            , serverContentType
+            )
+      return $
+        HTTP2.responseNoBody HTTP.ok200 $
+          buildTrailersOnly contentTypeForUnknown trailersOnly
+    CallSetupHandlerLookupException err -> do
+      msg <- serverExceptionToClient err
+      let trailersOnly :: TrailersOnly
+          trailersOnly = properTrailersToTrailersOnly (
+              grpcExceptionToTrailers $ GrpcException {
+                  grpcError         = GrpcUnknown
+                , grpcErrorMessage  = msg
+                , grpcErrorDetails  = Nothing
+                , grpcErrorMetadata = []
+                }
+            , serverContentType
+            )
+      return $
+        HTTP2.responseNoBody HTTP.ok200 $
+          buildTrailersOnly contentTypeForUnknown trailersOnly
+  where
+    ServerParams{
+        serverExceptionToClient
+      , serverContentType
+      } = params
+
+-- | Variation on 'chooseContentType' that can be used when the RPC is unknown
+contentTypeForUnknown :: ContentType -> Maybe BS.UTF8.ByteString
+contentTypeForUnknown ContentTypeDefault       = Nothing
+contentTypeForUnknown (ContentTypeOverride ct) = Just ct
+
+grpcUnimplemented :: Path -> GrpcException
+grpcUnimplemented path = GrpcException {
+      grpcError         = GrpcUnimplemented
+    , grpcErrorMessage  = Just . Text.pack . BS.Char8.unpack $ mconcat [
+                                "Method "
+                              , pathService path
+                              , "."
+                              , pathMethod path
+                              , " not implemented"
+                              ]
+    , grpcErrorDetails  = Nothing
+    , grpcErrorMetadata = []
+    }
+
+{-------------------------------------------------------------------------------
+  Auxiliary
+-------------------------------------------------------------------------------}
+
+-- | Timeout with a specific exception
+timeoutWith :: Exception e => e -> Integer -> IO a -> IO a
+timeoutWith e t io = do
+    me <- myThreadId
+
+    let timer :: IO ()
+        timer = do
+            UnboundedDelays.delay t
+            throwTo me e
+
+    bracket (forkIO timer) killThread $ \_ -> io
diff --git a/src/Network/GRPC/Server/RequestHandler/API.hs b/src/Network/GRPC/Server/RequestHandler/API.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/RequestHandler/API.hs
@@ -0,0 +1,42 @@
+-- | Definition of 'RequestHandler'
+--
+-- Defined in a separate module to avoid cyclic module dependencies.
+--
+-- Intended for unqualified import.
+module Network.GRPC.Server.RequestHandler.API (
+    RequestHandler
+  , requestHandlerToServer
+  ) where
+
+import Control.Exception
+
+import Network.HTTP2.Server qualified as HTTP2
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | HTTP2 request handler
+type RequestHandler a =
+     (forall x. IO x -> IO x)
+  -> HTTP2.Request
+  -> (HTTP2.Response -> IO ())
+  -> IO a
+
+-- | Construct @http2@ handler
+requestHandlerToServer ::
+     RequestHandler ()
+     -- ^ Request handler
+     --
+     -- We can assume in 'requestHandlerToServer' that the handler will not
+     -- throw any exceptions (doing so will cause @http2@ to reset the stream,
+     -- which is not always the right thing to do; see detailed comments in
+     -- 'runHandler'). It is the responsibility of 'serverTopLevel' (prior to
+     -- calling 'requestHandlerToServer') to catch any remaining exceptions.
+  -> HTTP2.Server
+requestHandlerToServer handler req _aux respond =
+    -- We start by masking asynchronous exceptions. It is possible that
+    -- http2 kills us /before/ this call to @mask@, but if it does, no harm
+    -- is done: nothing has happened yet, so nothing is interrupted.
+    mask $ \unmask ->
+      handler unmask req (\resp -> respond resp [])
diff --git a/src/Network/GRPC/Server/Run.hs b/src/Network/GRPC/Server/Run.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Run.hs
@@ -0,0 +1,422 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Convenience functions for running a HTTP2 server
+--
+-- Intended for unqualified import.
+module Network.GRPC.Server.Run (
+    -- * Configuration
+    ServerConfig(..)
+  , InsecureConfig(..)
+  , SecureConfig(..)
+    -- * Simple interface
+  , runServer
+  , runServerWithHandlers
+    -- * Full interface
+  , RunningServer -- opaque
+  , forkServer
+  , waitServer
+  , waitServerSTM
+  , getInsecureSocket
+  , getSecureSocket
+  , getServerSocket
+  , getServerPort
+    -- * Exceptions
+  , ServerTerminated(..)
+  , CouldNotLoadCredentials(..)
+  ) where
+
+import Control.Concurrent.Async
+import Control.Concurrent.STM
+import Control.Exception
+import Control.Monad
+import Data.Default
+import GHC.Generics (Generic)
+import Network.HTTP2.Server qualified as HTTP2
+import Network.HTTP2.TLS.Server qualified as HTTP2.TLS
+import Network.Run.TCP qualified as Run
+import Network.Socket
+import Network.TLS qualified as TLS
+
+import Network.GRPC.Common.HTTP2Settings
+import Network.GRPC.Server
+import Network.GRPC.Util.HTTP2
+import Network.GRPC.Util.TLS (SslKeyLog(..))
+import Network.GRPC.Util.TLS qualified as Util.TLS
+
+{-------------------------------------------------------------------------------
+  Configuration
+-------------------------------------------------------------------------------}
+
+-- | Server configuration
+--
+-- Describes the configuration of both an insecure server and a secure server.
+-- See the documentation of 'runServer' for a description of what servers will
+-- result from various configurations.
+data ServerConfig = ServerConfig {
+      -- | Configuration for insecure communication (without TLS)
+      --
+      -- Set to 'Nothing' to disable.
+      serverInsecure :: Maybe InsecureConfig
+
+      -- | Configuration for secure communication (over TLS)
+      --
+      -- Set to 'Nothing' to disable.
+    , serverSecure :: Maybe SecureConfig
+    }
+  deriving stock (Show, Generic)
+
+-- | Offer insecure connection (no TLS)
+data InsecureConfig = InsecureConfig {
+      -- | Hostname
+      insecureHost :: Maybe HostName
+
+      -- | Port number
+      --
+      -- Can use @0@ to let the server pick its own port. This can be useful in
+      -- testing scenarios; see 'getServerPort' or the more general
+      -- 'getInsecureSocket' for a way to figure out what this port actually is.
+    , insecurePort :: PortNumber
+    }
+  deriving stock (Show, Generic)
+
+-- | Offer secure connection (over TLS)
+data SecureConfig = SecureConfig {
+      -- | Hostname to bind to
+      --
+      -- Unlike in 'InsecureConfig', the 'HostName' is required here, because it
+      -- must match the certificate.
+      --
+      -- This doesn't need to match the common name (CN) in the TLS certificate.
+      -- For example, if the client connects to @127.0.0.1@, and the certificate
+      -- CN is also @127.0.0.1@, the server can still bind to @0.0.0.0@.
+      secureHost :: HostName
+
+      -- | Port number
+      --
+      -- See 'insecurePort' for additional discussion.
+    , securePort :: PortNumber
+
+      -- | TLS public certificate (X.509 format)
+    , securePubCert :: FilePath
+
+      -- | TLS chain certificates (X.509 format)
+    , secureChainCerts :: [FilePath]
+
+      -- | TLS private key
+    , securePrivKey :: FilePath
+
+      -- | SSL key log
+    , secureSslKeyLog :: SslKeyLog
+    }
+  deriving stock (Show, Generic)
+
+{-------------------------------------------------------------------------------
+  Simple interface
+-------------------------------------------------------------------------------}
+
+-- | Run a 'HTTP2.Server' with the given 'ServerConfig'.
+--
+-- If both configurations are disabled, 'runServer' will simply immediately
+-- return. If both configurations are enabled, then two servers will be run
+-- concurrently; one with the insecure configuration and the other with the
+-- secure configuration. Obviously, if only one of the configurations is
+-- enabled, then just that server will be run.
+--
+-- See also 'runServerWithHandlers', which handles the creation of the
+-- 'HTTP2.Server' for you.
+runServer :: HTTP2Settings -> ServerConfig -> HTTP2.Server -> IO ()
+runServer http2 cfg server = forkServer http2 cfg server $ waitServer
+
+-- | Convenience function that combines 'runServer' with 'mkGrpcServer'
+--
+-- NOTE: If you want to override the 'HTTP2Settings', use 'runServer' instead.
+runServerWithHandlers ::
+     ServerParams
+  -> ServerConfig
+  -> [SomeRpcHandler IO]
+  -> IO ()
+runServerWithHandlers params config handlers = do
+    server <- mkGrpcServer params handlers
+    runServer http2 config server
+  where
+    http2 :: HTTP2Settings
+    http2 = def
+
+{-------------------------------------------------------------------------------
+  Full interface
+-------------------------------------------------------------------------------}
+
+data RunningServer = RunningServer {
+      -- | Insecure server (no TLS)
+      --
+      -- If the insecure server is disabled, this will be a trivial "Async' that
+      -- immediately completes.
+      runningServerInsecure :: Async ()
+
+      -- | Secure server (with TLS)
+      --
+      -- Similar remarks apply as for 'runningInsecure'.
+    , runningServerSecure :: Async ()
+
+      -- | Socket used by the insecure server
+      --
+      -- See 'getInsecureSocket'.
+    , runningSocketInsecure :: TMVar Socket
+
+      -- | Socket used by the secure server
+      --
+      -- See 'getSecureSocket'.
+    , runningSocketSecure :: TMVar Socket
+    }
+
+data ServerTerminated = ServerTerminated
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | Start the server
+forkServer ::
+     HTTP2Settings
+  -> ServerConfig
+  -> HTTP2.Server
+  -> (RunningServer -> IO a)
+  -> IO a
+forkServer http2 ServerConfig{serverInsecure, serverSecure} server k = do
+    runningSocketInsecure <- newEmptyTMVarIO
+    runningSocketSecure   <- newEmptyTMVarIO
+
+    let secure, insecure :: IO ()
+        insecure =
+          case serverInsecure of
+            Nothing  -> return ()
+            Just cfg -> runInsecure http2 cfg runningSocketInsecure server
+        secure =
+          case serverSecure of
+            Nothing  -> return ()
+            Just cfg -> runSecure http2 cfg runningSocketSecure server
+
+    withAsync insecure $ \runningServerInsecure ->
+      withAsync secure $ \runningServerSecure ->
+        k RunningServer{
+              runningServerInsecure
+            , runningServerSecure
+            , runningSocketInsecure
+            , runningSocketSecure
+            }
+
+-- | Wait for the server to terminate
+--
+-- Returns the results of the insecure and secure servers separately.
+-- Note that under normal circumstances the server /never/ terminates.
+waitServerSTM ::
+     RunningServer
+  -> STM ( Either SomeException ()
+         , Either SomeException ()
+         )
+waitServerSTM server = do
+    insecure <- waitCatchSTM (runningServerInsecure server)
+    secure   <- waitCatchSTM (runningServerSecure   server)
+    return (insecure, secure)
+
+-- | IO version of 'waitServerSTM' that rethrows exceptions
+waitServer :: RunningServer -> IO ()
+waitServer server =
+    atomically (waitServerSTM server) >>= \case
+      (Right (), Right ()) -> return ()
+      (Left  e , _       ) -> throwIO e
+      (_       , Left  e ) -> throwIO e
+
+-- | Get the socket used by the insecure server
+--
+-- The socket is created as the server initializes; this function will block
+-- until that is complete. However:
+--
+-- * If the server throws an exception, that exception is rethrown here.
+-- * If the server has already terminated, we throw 'ServerTerminated'
+-- * If the insecure server was not enabled, it is considered to have terminated
+--   immediately and the same 'ServerTerminated' exception is thrown.
+getInsecureSocket :: RunningServer -> STM Socket
+getInsecureSocket server = do
+    getSocket (runningServerInsecure server)
+              (runningSocketInsecure server)
+
+-- | Get the socket used by the secure server
+--
+-- Similar remarks apply as for 'getInsecureSocket'.
+getSecureSocket :: RunningServer -> STM Socket
+getSecureSocket server = do
+    getSocket (runningServerSecure server)
+              (runningSocketSecure server)
+
+-- | Get \"the\" socket associated with the server
+--
+-- Precondition: only one server must be enabled (secure or insecure).
+getServerSocket :: RunningServer -> STM Socket
+getServerSocket server = do
+    insecure <- catchSTM (Right <$> getInsecureSocket server) (return . Left)
+    secure   <- catchSTM (Right <$> getSecureSocket   server) (return . Left)
+    case (insecure, secure) of
+      (Right sock, Left ServerTerminated) ->
+        return sock
+      (Left ServerTerminated, Right sock) ->
+        return sock
+      (Left ServerTerminated, Left ServerTerminated) ->
+        throwSTM ServerTerminated
+      (Right _, Right _) ->
+        error $ "getServerSocket: precondition violated"
+
+-- | Get \"the\" port number used by the server
+--
+-- Precondition: only one server must be enabled (secure or insecure).
+getServerPort :: RunningServer -> IO PortNumber
+getServerPort server = do
+    sock <- atomically $ getServerSocket server
+    addr <- getSocketName sock
+    case addr of
+      SockAddrInet  port   _host   -> return port
+      SockAddrInet6 port _ _host _ -> return port
+      SockAddrUnix{} -> error "getServerPort: unexpected unix socket"
+
+-- | Internal generalization of 'getInsecureSocket'/'getSecureSocket'
+getSocket :: Async () -> TMVar Socket -> STM Socket
+getSocket serverAsync socketTMVar = do
+    status <-  (Left  <$> waitCatchSTM serverAsync)
+      `orElse` (Right <$> readTMVar    socketTMVar)
+    case status of
+      Left (Left err) -> throwSTM err
+      Left (Right ()) -> throwSTM $ ServerTerminated
+      Right sock      -> return sock
+
+{-------------------------------------------------------------------------------
+  Insecure
+-------------------------------------------------------------------------------}
+
+runInsecure ::
+     HTTP2Settings
+  -> InsecureConfig
+  -> TMVar Socket
+  -> HTTP2.Server
+  -> IO ()
+runInsecure http2 cfg socketTMVar server = do
+    withServerSocket
+        http2
+        socketTMVar
+        (insecureHost cfg)
+        (insecurePort cfg) $ \listenSock ->
+      withTimeManager $ \mgr ->
+        Run.runTCPServerWithSocket listenSock $ \clientSock -> do
+          when (http2TcpNoDelay http2) $ do
+            -- See description of 'withServerSocket'
+            setSocketOption clientSock NoDelay 1
+          when (http2TcpAbortiveClose http2) $ do
+            setSockOpt clientSock Linger
+              (StructLinger { sl_onoff = 1, sl_linger = 0 })
+          withConfigForInsecure mgr clientSock $ \config ->
+            HTTP2.run serverConfig config server
+  where
+    serverConfig :: HTTP2.ServerConfig
+    serverConfig = mkServerConfig http2
+
+{-------------------------------------------------------------------------------
+  Secure (over TLS)
+-------------------------------------------------------------------------------}
+
+runSecure ::
+     HTTP2Settings
+  -> SecureConfig
+  -> TMVar Socket
+  -> HTTP2.Server
+  -> IO ()
+runSecure http2 cfg socketTMVar server = do
+    cred :: TLS.Credential <-
+          TLS.credentialLoadX509Chain
+            (securePubCert    cfg)
+            (secureChainCerts cfg)
+            (securePrivKey    cfg)
+      >>= \case
+            Left  err -> throwIO $ CouldNotLoadCredentials err
+            Right res -> return res
+
+    keyLogger <- Util.TLS.keyLogger (secureSslKeyLog cfg)
+    let serverConfig :: HTTP2.ServerConfig
+        serverConfig = mkServerConfig http2
+
+        tlsSettings :: HTTP2.TLS.Settings
+        tlsSettings = mkTlsSettings http2 keyLogger
+
+    withServerSocket
+        http2
+        socketTMVar
+        (Just $ secureHost cfg)
+        (securePort cfg) $ \listenSock ->
+      HTTP2.TLS.runTLSWithSocket
+          tlsSettings
+          (TLS.Credentials [cred])
+          listenSock
+          "h2" $ \mgr backend -> do
+        when (http2TcpNoDelay http2) $
+          -- See description of 'withServerSocket'
+          setSocketOption (HTTP2.TLS.requestSock backend) NoDelay 1
+        when (http2TcpAbortiveClose http2) $ do
+          setSockOpt (HTTP2.TLS.requestSock backend) Linger
+            (StructLinger { sl_onoff = 1, sl_linger = 0 })
+        withConfigForSecure mgr backend $ \config ->
+          HTTP2.run serverConfig config server
+
+data CouldNotLoadCredentials =
+    -- | Failed to load server credentials
+    CouldNotLoadCredentials String
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary
+-------------------------------------------------------------------------------}
+
+-- | Create server listen socket
+--
+-- We set @TCP_NODELAY@ on the server listen socket, but there is no guarantee
+-- that the option will be inherited by the sockets returned from @accept@ for
+-- each client request. On Linux it seems to be, although I cannot find any
+-- authoritative reference to say so; the best I could find is a section in Unix
+-- Network Programming [1]. On FreeBSD on the other hand, the man page suggests
+-- that @TCP_NODELAY@ is /not/ inherited [2].
+--
+-- Even the Linux man page for @accept@ is maddingly vague:
+--
+-- > Portable programs should not rely on inheritance or non‐inheritance of file
+-- > status flags and always explicitly set all required flags on the socket
+-- > returned from accept().
+--
+-- Whether that /file status/ flags is significant (as opposed to other kinds of
+-- flags?) is unclear, especially in the second half of this sentence. The Linux
+-- man page on @tcp@ is even worse; this is the only mention of inheritance in
+-- entire page:
+--
+-- > [TCP_USER_TIMEOUT], like many others, will be inherited by the socket
+-- > returned by accept(2), if it was set on the listening socket.
+--
+-- It is therefore best to explicitly set @TCP_NODELAY@ on the client request
+-- socket.
+--
+-- [1] <https://notes.shichao.io/unp/ch7/#socket-states>
+-- [2] <https://man.freebsd.org/cgi/man.cgi?query=tcp>
+withServerSocket ::
+     HTTP2Settings
+  -> TMVar Socket
+  -> Maybe HostName
+  -> PortNumber
+  -> (Socket -> IO a)
+  -> IO a
+withServerSocket http2Settings socketTMVar host port k = do
+    addr <- Run.resolve Stream host (show port) [AI_PASSIVE]
+    bracket (openServerSocket addr) close $ \sock -> do
+      atomically $ putTMVar socketTMVar sock
+      k sock
+  where
+    openServerSocket :: AddrInfo -> IO Socket
+    openServerSocket = Run.openTCPServerSocketWithOptions $ concat [
+          [ (NoDelay, 1)
+          | http2TcpNoDelay http2Settings
+          ]
+        ]
+
diff --git a/src/Network/GRPC/Server/Session.hs b/src/Network/GRPC/Server/Session.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/Session.hs
@@ -0,0 +1,109 @@
+module Network.GRPC.Server.Session (
+    ServerSession(..)
+  , ServerInbound
+  , ServerOutbound
+  , Headers(..)
+    -- * Exceptions
+  , CallSetupFailure(..)
+  ) where
+
+import Control.Exception
+import Data.Proxy
+import Data.Void
+
+import Network.GRPC.Server.Context
+import Network.GRPC.Spec
+import Network.GRPC.Spec.Serialization
+import Network.GRPC.Util.Session
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+data ServerSession rpc = ServerSession {
+      serverSessionContext :: ServerContext
+    }
+
+{-------------------------------------------------------------------------------
+  Instances
+-------------------------------------------------------------------------------}
+
+data ServerInbound rpc
+data ServerOutbound rpc
+
+instance IsRPC rpc => DataFlow (ServerInbound rpc) where
+  data Headers (ServerInbound rpc) = InboundHeaders {
+        inbHeaders     :: RequestHeaders' HandledSynthesized
+      , inbCompression :: Compression
+      }
+    deriving (Show)
+
+  type Message  (ServerInbound rpc) = (InboundMeta, Input rpc)
+  type Trailers (ServerInbound rpc) = NoMetadata
+
+  -- gRPC does not support request trailers
+  type NoMessages (ServerInbound rpc) = Void
+
+instance IsRPC rpc => DataFlow (ServerOutbound rpc) where
+  data Headers (ServerOutbound rpc) = OutboundHeaders {
+        outHeaders     :: ResponseHeaders
+      , outCompression :: Compression
+      }
+    deriving (Show)
+
+  type Message    (ServerOutbound rpc) = (OutboundMeta, Output rpc)
+  type Trailers   (ServerOutbound rpc) = ProperTrailers
+  type NoMessages (ServerOutbound rpc) = TrailersOnly
+
+instance SupportsServerRpc rpc => IsSession (ServerSession rpc) where
+  type Inbound  (ServerSession rpc) = ServerInbound rpc
+  type Outbound (ServerSession rpc) = ServerOutbound rpc
+
+  parseInboundTrailers  _ = \_ -> return NoMetadata
+  buildOutboundTrailers _ = buildProperTrailers
+
+  parseMsg _ = parseInput  (Proxy @rpc) . inbCompression
+  buildMsg _ = buildOutput (Proxy @rpc) . outCompression
+
+{-------------------------------------------------------------------------------
+  Exceptions
+-------------------------------------------------------------------------------}
+
+-- | We failed to setup the call from the client
+data CallSetupFailure =
+    -- | Client sent resource headers that were not conform the gRPC spec
+    CallSetupInvalidResourceHeaders InvalidResourceHeaders
+
+    -- | Invalid request headers
+    --
+    -- 'CallSetupInvalidResourceHeaders' refers to an invalid method (anything
+    -- other than POST) or an invalid path; 'CallSetupInvalidRequestHeaders'
+    -- means we could not parse the HTTP headers according to the gRPC spec.
+  | CallSetupInvalidRequestHeaders (InvalidHeaders HandledSynthesized)
+
+    -- | Client chose unsupported compression algorithm
+    --
+    -- This is indicative of a misbehaving peer: a client should not use a
+    -- compression algorithm unless they have evidence that the server supports
+    -- it. The server cannot process such a request, as it has no way of
+    -- decompression messages sent by the client.
+  | CallSetupUnsupportedCompression CompressionId
+
+    -- | No registered handler for the specified path
+    --
+    -- Note on terminology: HTTP has \"methods\" such as POST, GET, etc; gRPC
+    -- supports only POST, and when another HTTP method is chosen, this will
+    -- result in 'CallSetupInvalidResourceHeaders'. However, gRPC itself also
+    -- has the concept of a "method" (a method, or gRPC call, supported by a
+    -- particular service); it's these methods that
+    -- 'CallSetupUnimplementedMethod' is referring to.
+  | CallSetupUnimplementedMethod Path
+
+    -- | An exception arose while we tried to look up the handler
+    --
+    -- This can arise when the list of handlers /itself/ is @undefined@.
+  | CallSetupHandlerLookupException SomeException
+
+deriving stock    instance Show      CallSetupFailure
+deriving anyclass instance Exception CallSetupFailure
+
diff --git a/src/Network/GRPC/Server/StreamType.hs b/src/Network/GRPC/Server/StreamType.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/StreamType.hs
@@ -0,0 +1,422 @@
+{-# LANGUAGE FunctionalDependencies #-}
+
+-- | Server handlers
+module Network.GRPC.Server.StreamType (
+    -- * Handler type
+    ServerHandler'(..)
+  , ServerHandler
+    -- * Construct server handler
+  , mkNonStreaming
+  , mkClientStreaming
+  , mkServerStreaming
+  , mkBiDiStreaming
+    -- * Server API
+  , Methods(..)
+  , Services(..)
+  , fromMethod
+  , fromMethods
+  , fromServices
+    -- ** Hoisting
+  , hoistMethods
+  , hoistServices
+    -- * Varargs API
+  , simpleMethods
+  ) where
+
+import Control.Monad.IO.Class
+import Data.Kind
+
+import Network.GRPC.Common
+import Network.GRPC.Common.NextElem qualified as NextElem
+import Network.GRPC.Server
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Construct server handler
+
+  It may sometimes be useful to use explicit type applications with these
+  functions, which is why the @rpc@ type variable is always first.
+-------------------------------------------------------------------------------}
+
+mkNonStreaming :: forall rpc m.
+     SupportsStreamingType rpc NonStreaming
+  => (    Input rpc
+       -> m (Output rpc)
+     )
+  -> ServerHandler' NonStreaming m rpc
+mkNonStreaming = ServerHandler
+
+mkClientStreaming :: forall rpc m.
+     SupportsStreamingType rpc ClientStreaming
+  => (    IO (NextElem (Input rpc))
+       -> m (Output rpc)
+     )
+  -> ServerHandler' ClientStreaming m rpc
+mkClientStreaming = ServerHandler
+
+mkServerStreaming :: forall rpc m.
+     SupportsStreamingType rpc ServerStreaming
+  => (    Input rpc
+       -> (NextElem (Output rpc) -> IO ())
+       -> m ()
+     )
+  -> ServerHandler' ServerStreaming m rpc
+mkServerStreaming = ServerHandler
+
+mkBiDiStreaming :: forall rpc m.
+     SupportsStreamingType rpc BiDiStreaming
+  => (    IO (NextElem (Input rpc))
+       -> (NextElem (Output rpc) -> IO ())
+       -> m ()
+     )
+  -> ServerHandler' BiDiStreaming m rpc
+mkBiDiStreaming = ServerHandler . uncurry
+
+{-------------------------------------------------------------------------------
+  Run server handler (used internally only)
+-------------------------------------------------------------------------------}
+
+nonStreaming ::
+     ServerHandler' NonStreaming m rpc
+  -> Input rpc
+  -> m (Output rpc)
+nonStreaming (ServerHandler h) = h
+
+clientStreaming ::
+     ServerHandler' ClientStreaming m rpc
+  -> IO (NextElem (Input rpc))
+  -> m (Output rpc)
+clientStreaming (ServerHandler h) = h
+
+serverStreaming ::
+     ServerHandler' ServerStreaming m rpc
+  -> Input rpc
+  -> (NextElem (Output rpc) -> IO ())
+  -> m ()
+serverStreaming (ServerHandler h) = h
+
+biDiStreaming ::
+    ServerHandler' BiDiStreaming m rpc
+ -> IO (NextElem (Input rpc))
+ -> (NextElem (Output rpc) -> IO ())
+ -> m ()
+biDiStreaming (ServerHandler h) = curry h
+
+{-------------------------------------------------------------------------------
+  Construct 'RpcHandler'
+-------------------------------------------------------------------------------}
+
+class FromStreamingHandler (styp :: StreamingType) where
+  -- | Construct 'RpcHandler' from streaming type specific handler
+  --
+  -- Most applications will probably not need to call this function directly,
+  -- instead relying on 'fromMethods'\/'fromServices'. If however you want to
+  -- construct a list of 'RpcHandler's manually, without a type-level
+  -- specification of the server's API, you can use 'fromStreamingHandler'.
+  fromStreamingHandler :: forall k (rpc :: k) m.
+        ( SupportsServerRpc rpc
+        , Default (ResponseInitialMetadata rpc)
+        , Default (ResponseTrailingMetadata rpc)
+        , MonadIO m
+        )
+     => ServerHandler' styp m rpc -> RpcHandler m rpc
+
+instance FromStreamingHandler NonStreaming where
+  fromStreamingHandler h = mkRpcHandler $ \call -> do
+      inp <- liftIO $ recvFinalInput call
+      out <- nonStreaming h inp
+      liftIO $ sendFinalOutput call (out, def)
+
+instance FromStreamingHandler ClientStreaming where
+  fromStreamingHandler h = mkRpcHandler $ \call -> do
+      out <- clientStreaming h (liftIO $ recvNextInputElem call)
+      liftIO $ sendFinalOutput call (out, def)
+
+instance FromStreamingHandler ServerStreaming where
+  fromStreamingHandler h = mkRpcHandler $ \call -> do
+      inp <- liftIO $ recvFinalInput call
+      serverStreaming h inp (liftIO . sendOutput call . fromNextElem call)
+
+instance FromStreamingHandler BiDiStreaming where
+  fromStreamingHandler h = mkRpcHandler $ \call -> do
+      biDiStreaming h
+        (liftIO $ recvNextInputElem call)
+        (liftIO . sendOutput call . fromNextElem call)
+
+{-------------------------------------------------------------------------------
+  Internal: dealing with metadata
+-------------------------------------------------------------------------------}
+
+fromNextElem ::
+     Default (ResponseTrailingMetadata rpc)
+  => proxy rpc
+  -> NextElem out
+  -> StreamElem (ResponseTrailingMetadata rpc) out
+fromNextElem _ = NextElem.toStreamElem def
+
+{-------------------------------------------------------------------------------
+  Methods
+-------------------------------------------------------------------------------}
+
+-- | Declare handlers for a set of RPCs
+--
+-- See also 'simpleMethods' for an alternative API if you only need the 'Method'
+-- constructor.
+--
+-- == Example usage
+--
+-- Example that provides methods for the gRPC
+-- [RouteGuide](https://grpc.io/docs/languages/python/basics/) API:
+--
+-- > handlers :: [Feature] -> Methods IO (ProtobufMethodsOf RouteGuide)
+-- > handlers db =
+-- >      Method (mkNonStreaming    $ getFeature   db)
+-- >    $ Method (mkServerStreaming $ listFeatures db)
+-- >    $ Method (mkClientStreaming $ recordRoute  db)
+-- >    $ Method (mkBiDiStreaming   $ routeChat    db)
+-- >    $ NoMoreMethods
+--
+-- It is also possibly to define your own list of RPC, instead of computing it
+-- using @ProtobufMethodsOf@ (indeed, there is no need to use Protobuf at all).
+--
+-- == Taking advantage of type inference
+--
+-- Provided that you give a top-level type annotation, then type inference can
+-- guide this definition:
+--
+-- > handlers :: [Feature] -> Methods IO (ProtobufMethodsOf RouteGuide)
+-- > handlers db = _methods
+--
+-- This will reveal that we need four methods:
+--
+-- > _methods :: Methods IO '[
+-- >     Protobuf RouteGuide "getFeature"
+-- >   , Protobuf RouteGuide "listFeatures"
+-- >   , Protobuf RouteGuide "recordRoute"
+-- >   , Protobuf RouteGuide "routeChat"
+-- >   ]
+--
+-- We can use this to make a skeleton definition, with holes for each handler:
+--
+-- > handlers :: [Feature] -> Methods IO (ProtobufMethodsOf RouteGuide)
+-- > handlers db =
+-- >       Method _getFeature
+-- >     $ Method _listFeatures
+-- >     $ Method _recordRoute
+-- >     $ Method _routeChar
+-- >     $ NoMoreMethods
+--
+-- This will reveal types such as this:
+--
+-- > _getFeature :: ServerHandler' NonStreaming IO (Protobuf RouteGuide "getFeature")
+--
+-- which we can simplify to
+--
+-- > _getFeature :: ServerHandler IO (Protobuf RouteGuide "getFeature")
+--
+-- (the non-primed version of 'ServerHandler' infers the streaming type from
+-- the RPC, when possible). Finally, if we then refine the skeleton to
+--
+-- > Method (mkNonStreaming $ _getFeature)
+--
+-- ghc will tell us
+--
+-- > _getFeature :: Proto Point -> IO (Proto Feature)
+data Methods (m :: Type -> Type) (rpcs :: [k]) where
+  -- | All methods of the service handled
+  NoMoreMethods :: Methods m '[]
+
+  -- | Define the next method of the service, inferring the streaming type
+  --
+  -- In the most common case (Protobuf), the streaming type can be inferred
+  -- from the method. In this case, it is convenient to use 'Method', as type
+  -- inference will tell you what kind of handler you need to define (see also
+  -- the example above).
+  Method ::
+       ( SupportsServerRpc rpc
+       , Default (ResponseInitialMetadata rpc)
+       , Default (ResponseTrailingMetadata rpc)
+       , SupportsStreamingType rpc styp
+       )
+    => ServerHandler' styp m rpc
+    -> Methods m rpcs
+    -> Methods m (rpc ': rpcs)
+
+  -- | Define a method that uses uses the raw (core) API instead
+  --
+  -- This is useful when the communication pattern does not fall neatly into the
+  -- four streaming types (non-streaming, client-side streaming, server-side
+  -- streaming, or bidirectional streaming), or when you need access to lower
+  -- level features such as request or response metadata, compression options,
+  -- etc.
+  RawMethod ::
+       SupportsServerRpc rpc
+    => RpcHandler m rpc
+    -> Methods m rpcs
+    -> Methods m (rpc ': rpcs)
+
+  -- | Declare that this particular @rpc@ method is not supported by this server
+  UnsupportedMethod ::
+       Methods m rpcs
+    -> Methods m (rpc ': rpcs)
+
+-- | Declare handlers for a set of services
+--
+-- See also 'fromServices'.
+--
+-- Example usage:
+--
+-- > services :: [Feature] -> Services IO (ProtobufServices '[Greeter, RouteGuide])
+-- > services db =
+-- >       Service Greeter.handlers
+-- >     $ Service (RouteGuide.handlers db)
+-- >     $ NoMoreServices
+data Services m (servs :: [[k]]) where
+  NoMoreServices :: Services m '[]
+
+  Service ::
+       Methods m serv
+    -> Services m servs
+    -> Services m (serv : servs)
+
+-- | Construct 'SomeRpcHandler' from a streaming handler
+--
+-- Most users will not need to call this function, but it can occassionally be
+-- useful when using the lower-level API. Depending on usage you may need to
+-- provide a type argument to fix the @rpc@, for example
+--
+-- > Server.fromMethod @EmptyCall $ ServerHandler $ \(_ ::Empty) ->
+-- >   return (defMessage :: Empty)
+--
+-- If the streaming type cannot be deduced, you might need to specify that also:
+--
+-- > Server.fromMethod @Ping @NonStreaming $ ServerHandler $ ..
+--
+-- Alternatively, use one of the handler construction functions, such as
+--
+-- > Server.fromMethod @Ping $ Server.mkNonStreaming $ ..
+fromMethod :: forall rpc styp m.
+     ( SupportsServerRpc rpc
+     , ValidStreamingType styp
+     , Default (ResponseInitialMetadata rpc)
+     , Default (ResponseTrailingMetadata rpc)
+     , MonadIO m
+     )
+  => ServerHandler' styp m rpc -> SomeRpcHandler m
+fromMethod =
+    case validStreamingType (Proxy @styp) of
+      SNonStreaming    -> someRpcHandler . fromStreamingHandler
+      SClientStreaming -> someRpcHandler . fromStreamingHandler
+      SServerStreaming -> someRpcHandler . fromStreamingHandler
+      SBiDiStreaming   -> someRpcHandler . fromStreamingHandler
+
+-- | List handlers for all methods of a given service.
+--
+-- This can be used to verify at the type level that all methods of the given
+-- service are handled. A typical definition of the 'Methods' might have a type
+-- such as this:
+--
+-- > methods :: Methods IO (ProtobufMethodsOf RouteGuide)
+--
+-- See also 'fromServices' if you are defining more than one service.
+fromMethods :: forall m rpcs.
+     MonadIO m
+  => Methods m rpcs -> [SomeRpcHandler m]
+fromMethods = go
+  where
+    go :: Methods m rpcs' -> [SomeRpcHandler m]
+    go NoMoreMethods          = []
+    go (Method m ms)          = fromMethod     m : go ms
+    go (RawMethod m ms)       = someRpcHandler m : go ms
+    go (UnsupportedMethod ms) =                    go ms
+
+-- | List handlers for all methods of all services.
+--
+-- This can be used to verify at the type level that all methods of all services
+-- are handled. A typical definition of the 'Services' might have a type such as
+-- this:
+--
+-- > services :: Services IO (ProtobufServices '[Greeter, RouteGuide])
+--
+-- See also 'fromMethods' if you are only defining one service.
+fromServices :: forall m servs.
+     MonadIO m
+  => Services m servs -> [SomeRpcHandler m]
+fromServices = concat . go
+  where
+    go :: Services m servs' -> [[SomeRpcHandler m]]
+    go NoMoreServices = []
+    go (Service s ss) = fromMethods s : go ss
+
+{-------------------------------------------------------------------------------
+  Hoisting
+-------------------------------------------------------------------------------}
+
+hoistMethods :: forall m n rpcs.
+     (forall a. m a -> n a)
+  -> Methods m rpcs
+  -> Methods n rpcs
+hoistMethods f = go
+  where
+    go :: forall rpcs'. Methods m rpcs' -> Methods n rpcs'
+    go NoMoreMethods          = NoMoreMethods
+    go (Method          h ms) = Method (hoistServerHandler f h) (go ms)
+    go (RawMethod       h ms) = RawMethod (hoistRpcHandler f h) (go ms)
+    go (UnsupportedMethod ms) = UnsupportedMethod (go ms)
+
+hoistServices :: forall m n servs.
+     (forall a. m a -> n a)
+  -> Services m servs
+  -> Services n servs
+hoistServices f = go
+  where
+    go :: forall servs'. Services m servs' -> Services n servs'
+    go NoMoreServices = NoMoreServices
+    go (Service s ss) = Service (hoistMethods f s) (go ss)
+
+{-------------------------------------------------------------------------------
+  Varargs API
+-------------------------------------------------------------------------------}
+
+class SimpleMethods m (rpcs :: [k]) (rpcs' :: [k]) a | a -> m rpcs rpcs' where
+  simpleMethods' :: (Methods m rpcs -> Methods m rpcs') -> a
+
+instance SimpleMethods m '[] rpcs (Methods m rpcs) where
+  simpleMethods' f = f NoMoreMethods
+
+instance
+    ( -- Requirements inherited from the 'Method' constructor
+      SupportsServerRpc rpc
+    , Default (ResponseInitialMetadata rpc)
+    , Default (ResponseTrailingMetadata rpc)
+    , SupportsStreamingType rpc (RpcStreamingType rpc)
+      -- Requirements for the vararg construction
+    , b ~ ServerHandler' (RpcStreamingType rpc) m rpc
+    , SimpleMethods m rpcs rpcs' a
+    ) => SimpleMethods m (rpc : rpcs) rpcs' (b -> a) where
+  simpleMethods' f h = simpleMethods' (f . Method h)
+
+-- | Alternative way to construct 'Methods'
+--
+-- == Example usage
+--
+-- Listing the handlers for the gRPC routeguide server using 'Methods' directly
+-- looks like this:
+--
+-- >   Method (mkNonStreaming    $ getFeature   db)
+-- > $ Method (mkServerStreaming $ listFeatures db)
+-- > $ Method (mkClientStreaming $ recordRoute  db)
+-- > $ Method (mkBiDiStreaming   $ routeChat    db)
+-- > $ NoMoreMethods
+--
+-- Since we only use 'Method' here, we can instead write this as
+--
+-- > simpleMethods
+-- >   (mkNonStreaming    $ getFeature   db)
+-- >   (mkServerStreaming $ listFeatures db)
+-- >   (mkClientStreaming $ recordRoute  db)
+-- >   (mkBiDiStreaming   $ routeChat    db)
+--
+-- Which API you prefer is mostly just a matter of taste.
+simpleMethods :: SimpleMethods m rpcs rpcs a => a
+simpleMethods = simpleMethods' id
diff --git a/src/Network/GRPC/Server/StreamType/Binary.hs b/src/Network/GRPC/Server/StreamType/Binary.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Server/StreamType/Binary.hs
@@ -0,0 +1,90 @@
+module Network.GRPC.Server.StreamType.Binary (
+    -- * Construct handlers
+    mkNonStreaming
+  , mkClientStreaming
+  , mkServerStreaming
+  , mkBiDiStreaming
+  ) where
+
+import Control.Monad.IO.Class
+import Data.Binary
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary (decodeOrThrow)
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Server.StreamType qualified as StreamType
+import Network.GRPC.Spec
+
+{-------------------------------------------------------------------------------
+  Handlers for specific streaming types
+
+  It may sometimes be useful to use explicit type applications with these
+  functions, which is why the @rpc@ type variable is always first, followed by
+  the @inp@ and @out@ parameters, which may also be ambiguous in certain cases.
+-------------------------------------------------------------------------------}
+
+mkNonStreaming :: forall rpc inp out m.
+     ( SupportsStreamingType rpc NonStreaming
+     , Binary inp, Input  rpc ~ Lazy.ByteString
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => (    inp
+       -> m out
+     )
+  -> ServerHandler' NonStreaming m rpc
+mkNonStreaming f = StreamType.mkNonStreaming $ \inp -> do
+    inp' <- decodeOrThrow inp
+    encode <$> f inp'
+
+mkClientStreaming :: forall rpc out m.
+     ( SupportsStreamingType rpc ClientStreaming
+     , Binary out, Output rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => (    (forall inp.
+                (Binary inp, Input rpc ~ Lazy.ByteString)
+             => m (NextElem inp)
+          )
+       -> m out
+     )
+  -> ServerHandler' ClientStreaming m rpc
+mkClientStreaming f = StreamType.mkClientStreaming $ \recv -> do
+    out <- f (liftIO recv >>= traverse decodeOrThrow)
+    return $ encode out
+
+mkServerStreaming :: forall rpc inp m.
+     ( SupportsStreamingType rpc ServerStreaming
+     , Binary inp, Input rpc ~ Lazy.ByteString
+     , MonadIO m
+     )
+  => (    inp
+       -> (forall out.
+                (Binary out, Output rpc ~ Lazy.ByteString)
+             => NextElem out -> m ()
+          )
+       -> m ()
+     )
+  -> ServerHandler' ServerStreaming m rpc
+mkServerStreaming f = StreamType.mkServerStreaming $ \inp send -> do
+    inp' <- decodeOrThrow inp
+    f inp' (liftIO . send . fmap encode)
+
+mkBiDiStreaming :: forall rpc m.
+     ( SupportsStreamingType rpc BiDiStreaming
+     , MonadIO m
+     )
+  => (    (forall inp.
+                (Binary inp, Input rpc ~ Lazy.ByteString)
+             => m (NextElem inp)
+          )
+       -> (forall out.
+                (Binary out, Output rpc ~ Lazy.ByteString)
+             => NextElem out -> m ()
+          )
+       -> m ()
+     )
+  -> ServerHandler' BiDiStreaming m rpc
+mkBiDiStreaming f = StreamType.mkBiDiStreaming $ \recv send ->
+    f (liftIO recv >>= traverse decodeOrThrow) (liftIO . send . fmap encode)
diff --git a/src/Network/GRPC/Util/AccumulatedByteString.hs b/src/Network/GRPC/Util/AccumulatedByteString.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/AccumulatedByteString.hs
@@ -0,0 +1,97 @@
+-- | Accumulate strict bytestrings
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Util.AccumulatedByteString (AccumulatedByteString)
+-- > import Network.GRPC.Util.AccumulatedByteString qualified as AccBS
+module Network.GRPC.Util.AccumulatedByteString (
+    AccumulatedByteString -- opaque
+    -- * Construction
+  , init
+  , append
+    -- * Query
+  , length
+    -- * Destruction
+  , splitAt
+  ) where
+
+import Prelude hiding (init, splitAt, length)
+
+import Data.ByteString qualified as BS.Strict
+import Data.ByteString qualified as Strict (ByteString)
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | Accumulate strict bytestrings until we have enough bytes
+data AccumulatedByteString = AccBS {
+       -- | Total accumulated length
+       accLength  :: !Word
+
+       -- | Accumulated bytestrings, in reverse order
+     , accStrings :: [Strict.ByteString]
+     }
+
+{-------------------------------------------------------------------------------
+  Construction
+-------------------------------------------------------------------------------}
+
+init :: Maybe Strict.ByteString -> AccumulatedByteString
+init Nothing   = AccBS 0 []
+init (Just bs) = AccBS (fromIntegral $ BS.Strict.length bs) [bs]
+
+append :: AccumulatedByteString -> Strict.ByteString -> AccumulatedByteString
+append AccBS{accLength, accStrings} bs = AccBS{
+      accLength  = accLength + fromIntegral (BS.Strict.length bs)
+    , accStrings = bs : accStrings
+    }
+
+{-------------------------------------------------------------------------------
+  Query
+-------------------------------------------------------------------------------}
+
+length :: AccumulatedByteString -> Word
+length = accLength
+
+{-------------------------------------------------------------------------------
+  Destruction
+-------------------------------------------------------------------------------}
+
+-- | Split the accumulated bytestrings after @n@ bytes
+--
+-- Preconditions:
+--
+-- 1. The accumulated length must be @>= n@
+-- 2. The accumulated length without the most recently added bytestring
+--    must be @<= n@
+--
+-- These two preconditions together imply that all accumulated bytestrings
+-- except the most recent will be required.
+splitAt ::
+     Word -- ^ @n@
+  -> AccumulatedByteString
+  -> (Strict.ByteString, Maybe Strict.ByteString)
+splitAt n AccBS{accLength, accStrings} =
+    if leftoverLen == 0 then
+      (BS.Strict.concat $ reverse accStrings, Nothing)
+    else
+      -- If @leftoverLen > 0@ then @accLength > 0@: we must have some strings
+      case accStrings of
+        []              -> error "splitAt: invalid AccumulatedByteString"
+        mostRecent:rest ->
+          let neededLen =
+                -- cannot underflow due to precondition (2)
+                BS.Strict.length mostRecent - fromIntegral leftoverLen
+              (needed, leftover) =
+                BS.Strict.splitAt neededLen mostRecent
+          in ( BS.Strict.concat $ reverse (needed : rest)
+             , if BS.Strict.null leftover
+                 then Nothing
+                 else Just leftover
+             )
+  where
+    -- cannot underflow due to precondition (1)
+    leftoverLen :: Word
+    leftoverLen = accLength - n
+
diff --git a/src/Network/GRPC/Util/GHC.hs b/src/Network/GRPC/Util/GHC.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/GHC.hs
@@ -0,0 +1,35 @@
+module Network.GRPC.Util.GHC (
+    -- * Thread labelling
+    ThreadLabel
+  , labelThisThread
+  , forkLabelled
+  , asyncLabelled
+  ) where
+
+import Control.Concurrent.Async
+import Control.Exception
+import Control.Monad.IO.Class
+import GHC.Conc
+
+{-------------------------------------------------------------------------------
+  Thread labelling
+-------------------------------------------------------------------------------}
+
+type ThreadLabel = String
+
+labelThisThread :: MonadIO m => ThreadLabel -> m ()
+labelThisThread label = liftIO $ do
+    tid <- myThreadId
+    labelThread tid label
+
+forkLabelled :: ThreadLabel -> IO () -> IO ThreadId
+forkLabelled label io =
+    mask_ $ forkIOWithUnmask $ \unmask -> do
+      labelThisThread label
+      unmask io
+
+asyncLabelled :: ThreadLabel -> IO a -> IO (Async a)
+asyncLabelled label io =
+    mask_ $ asyncWithUnmask $ \unmask -> do
+      labelThisThread label
+      unmask io
diff --git a/src/Network/GRPC/Util/HTTP2.hs b/src/Network/GRPC/Util/HTTP2.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/HTTP2.hs
@@ -0,0 +1,222 @@
+module Network.GRPC.Util.HTTP2 (
+    -- * General auxiliary
+    fromHeaderTable
+    -- * Configuration
+  , withConfigForInsecure
+  , withConfigForSecure
+    -- * Settings
+  , mkServerConfig
+  , mkTlsSettings
+    -- * Timeouts
+  , withTimeManager
+  ) where
+
+import Control.Exception
+import Data.Bifunctor
+import Data.ByteString qualified as Strict (ByteString)
+import Foreign (mallocBytes, free)
+import Network.HPACK (BufferSize)
+import Network.HPACK qualified as HPACK
+import Network.HPACK.Token qualified as HPACK
+import Network.HTTP.Types qualified as HTTP
+import Network.HTTP2.Server qualified as Server
+import Network.HTTP2.TLS.Server qualified as Server.TLS
+import Network.Socket (Socket, SockAddr)
+import Network.Socket qualified as Socket
+import Network.Socket.BufferPool (Recv)
+import Network.Socket.BufferPool qualified as Recv
+import Network.Socket.ByteString qualified as Socket
+import System.TimeManager qualified as Time (Manager)
+import System.TimeManager qualified as TimeManager
+
+import Network.GRPC.Common.HTTP2Settings
+
+{-------------------------------------------------------------------------------
+  General auxiliary
+-------------------------------------------------------------------------------}
+
+fromHeaderTable :: HPACK.TokenHeaderTable -> [HTTP.Header]
+fromHeaderTable = map (first HPACK.tokenKey) . fst
+
+{-------------------------------------------------------------------------------
+  Configuration
+-------------------------------------------------------------------------------}
+
+-- | Create config to be used with @http2@ (without TLS)
+--
+-- We do not use @allocSimpleConfig@ from @http2:Network.HTTP2.Server@, but
+-- instead create a config that is very similar to the config created by
+-- 'allocConfigForSecure'.
+withConfigForInsecure ::
+     Time.Manager
+  -> Socket
+  -> (Server.Config -> IO a)
+  -> IO a
+withConfigForInsecure mgr sock k = do
+    -- @recv@ does not provide a way to deallocate a buffer pool, and
+    -- @http2-tls@ (in @freeServerConfig@) does not attempt to deallocate it.
+    -- We follow suit here.
+    pool   <- Recv.newBufferPool readBufferLowerLimit readBufferSize
+    mysa   <- Socket.getSocketName sock
+    peersa <- Socket.getPeerName sock
+    withConfig
+      mgr
+      (Socket.sendAll sock)
+      (Recv.receive sock pool)
+      mysa
+      peersa
+      k
+  where
+    def :: Server.TLS.Settings
+    def = Server.TLS.defaultSettings
+
+    -- Use the defaults from @http2-tls@
+    readBufferLowerLimit, readBufferSize :: Int
+    readBufferLowerLimit = Server.TLS.settingsReadBufferLowerLimit def
+    readBufferSize       = Server.TLS.settingsReadBufferSize       def
+
+-- | Create config to be used with @http2-tls@ (with TLS)
+--
+-- This is adapted from @allocConfigForServer@ in
+-- @http2-tls:Network.HTTP2.TLS.Config@.
+withConfigForSecure ::
+     Time.Manager
+  -> Server.TLS.IOBackend
+  -> (Server.Config -> IO a)
+  -> IO a
+withConfigForSecure mgr backend =
+    withConfig
+      mgr
+      (Server.TLS.send         backend)
+      (Server.TLS.recv         backend)
+      (Server.TLS.mySockAddr   backend)
+      (Server.TLS.peerSockAddr backend)
+
+-- | Internal generalization
+withConfig ::
+     Time.Manager
+  -> (Strict.ByteString -> IO ())
+  -> Recv
+  -> SockAddr
+  -> SockAddr
+  -> (Server.Config -> IO a)
+  -> IO a
+withConfig mgr send recv mysa peersa k =
+    bracket (mallocBytes writeBufferSize) free $ \buf -> do
+      recvN <- Recv.makeRecvN mempty recv
+      k Server.Config {
+          confWriteBuffer       = buf
+        , confBufferSize        = writeBufferSize
+        , confSendAll           = send
+        , confReadN             = recvN
+        , confPositionReadMaker = Server.defaultPositionReadMaker
+        , confTimeoutManager    = mgr
+        , confMySockAddr        = mysa
+        , confPeerSockAddr      = peersa
+        }
+  where
+    -- This is the default value for @settingsSendBufferSize@ in @http2-tls@
+    -- and the default value given in the documentation in @http2@.
+    writeBufferSize :: BufferSize
+    writeBufferSize = 4096
+
+{-------------------------------------------------------------------------------
+  Settings
+
+  NOTE: If we want to override 'HTTP2.TLS.settingsReadBufferLowerLimit' or
+  'HTTP2.TLS.settingsReadBufferSize', we should also modify
+  'allocConfigForInsecure'.
+-------------------------------------------------------------------------------}
+
+mkServerConfig :: HTTP2Settings -> Server.ServerConfig
+mkServerConfig http2Settings =
+    Server.defaultServerConfig {
+        Server.connectionWindowSize = fromIntegral $
+          http2ConnectionWindowSize http2Settings
+      , Server.settings =
+          Server.defaultSettings {
+              Server.initialWindowSize = fromIntegral $
+                http2StreamWindowSize http2Settings
+            , Server.maxConcurrentStreams = Just . fromIntegral $
+                http2MaxConcurrentStreams http2Settings
+            , Server.pingRateLimit =
+                case http2OverridePingRateLimit http2Settings of
+                  Nothing    -> Server.pingRateLimit Server.defaultSettings
+                  Just limit -> limit
+            , Server.emptyFrameRateLimit =
+                case http2OverrideEmptyFrameRateLimit http2Settings of
+                  Nothing    -> Server.emptyFrameRateLimit Server.defaultSettings
+                  Just limit -> limit
+            , Server.settingsRateLimit =
+                case http2OverrideSettingsRateLimit http2Settings of
+                  Nothing    -> Server.settingsRateLimit Server.defaultSettings
+                  Just limit -> limit
+            , Server.rstRateLimit =
+                case http2OverrideRstRateLimit http2Settings of
+                  Nothing    -> Server.rstRateLimit Server.defaultSettings
+                  Just limit -> limit
+            }
+      }
+
+-- | Settings for secure server (with TLS)
+--
+-- NOTE: This overlaps with the values in 'mkServerConfig', and I /think/ we
+-- don't actually need this, because we don't use @runWithSocket@ from
+-- @http2-tls@ (but rather @runTLSWithSocket@. However, we set them here anyway
+-- for completeness and in case @http2-tls@ decides to use them elsewhere.
+mkTlsSettings ::
+     HTTP2Settings
+  -> (String -> IO ())  -- ^ Key logger
+  -> Server.TLS.Settings
+mkTlsSettings http2Settings keyLogger =
+    Server.TLS.defaultSettings {
+        Server.TLS.settingsKeyLogger =
+          keyLogger
+      , Server.TLS.settingsTimeout =
+          disableTimeout
+      , Server.TLS.settingsConnectionWindowSize = fromIntegral $
+          http2ConnectionWindowSize http2Settings
+      , Server.TLS.settingsStreamWindowSize = fromIntegral $
+          http2StreamWindowSize http2Settings
+      , Server.TLS.settingsConcurrentStreams = fromIntegral $
+          http2MaxConcurrentStreams http2Settings
+      , Server.TLS.settingsPingRateLimit =
+          case http2OverridePingRateLimit http2Settings of
+            Nothing    -> Server.pingRateLimit Server.defaultSettings
+            Just limit -> limit
+      , Server.TLS.settingsEmptyFrameRateLimit =
+          case http2OverrideEmptyFrameRateLimit http2Settings of
+            Nothing    -> Server.emptyFrameRateLimit Server.defaultSettings
+            Just limit -> limit
+      , Server.TLS.settingsSettingsRateLimit =
+          case http2OverrideSettingsRateLimit http2Settings of
+            Nothing    -> Server.settingsRateLimit Server.defaultSettings
+            Just limit -> limit
+      , Server.TLS.settingsRstRateLimit =
+          case http2OverrideRstRateLimit http2Settings of
+            Nothing    -> Server.rstRateLimit Server.defaultSettings
+            Just limit -> limit
+      }
+
+{-------------------------------------------------------------------------------
+  Timeouts
+-------------------------------------------------------------------------------}
+
+-- | Allocate time manager (without any actual timeouts)
+--
+-- The @http2@ ecosystem relies on a time manager for timeouts; we don't use
+-- those timeouts (see disableTimeout), but must still provide a time manager
+-- for insecure connections. For secure connections the time manager is
+-- allocated in 'Network.Run.Timeout.runTCPServerWithSocket' from @network-run@.
+-- In that package it allocates a single manager for the entire server (it
+-- allocates the manager before calling accept), so we should do the same in the
+-- insecure case for better consistency between the two setups; this also avoids
+-- the possibility of leaking managers.
+withTimeManager :: (Time.Manager -> IO a) -> IO a
+withTimeManager = TimeManager.withManager (disableTimeout * 1_000_000)
+
+-- | Disable timeouts in http2/http2-tls
+--
+-- A value of 0 (or lower) disables timeouts as of @time-manager-0.2.2@.
+disableTimeout :: Int
+disableTimeout = 0
diff --git a/src/Network/GRPC/Util/HTTP2/Stream.hs b/src/Network/GRPC/Util/HTTP2/Stream.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/HTTP2/Stream.hs
@@ -0,0 +1,207 @@
+module Network.GRPC.Util.HTTP2.Stream (
+    -- * Streams
+    OutputStream -- opaque
+  , writeChunk
+  , writeChunkFinal
+  , flush
+  , InputStream -- opaque
+  , getChunk
+  , getTrailers
+    -- * Server API
+  , serverOutputStream
+  , serverInputStream
+    -- ** Client API
+  , clientInputStream
+  , clientOutputStream
+    -- * Exceptions
+  , ClientDisconnected(..)
+  , ServerDisconnected(..)
+  , wrapStreamExceptionsWith
+  ) where
+
+import Control.Exception
+import Data.Binary.Builder (Builder)
+import Data.ByteString qualified as Strict (ByteString)
+import GHC.Stack
+import Network.HTTP.Types qualified as HTTP
+import Network.HTTP2.Client qualified as Client
+import Network.HTTP2.Server qualified as Server
+import Network.HTTP2.Server (OutBodyIface(..))
+
+import Network.GRPC.Util.HTTP2 (fromHeaderTable)
+
+{-------------------------------------------------------------------------------
+  Streams
+-------------------------------------------------------------------------------}
+
+data OutputStream = OutputStream {
+      -- | Write a chunk to the stream
+      _writeChunk :: HasCallStack => Builder -> IO ()
+
+      -- | Write the final chunk to the stream
+    , _writeChunkFinal :: HasCallStack => Builder -> IO ()
+
+      -- | Flush the stream (send frames to the peer)
+    , _flush :: HasCallStack => IO ()
+    }
+
+data InputStream = InputStream {
+      _getChunk    :: HasCallStack => IO (Strict.ByteString, Bool)
+    , _getTrailers :: HasCallStack => IO [HTTP.Header]
+    }
+
+{-------------------------------------------------------------------------------
+  Wrappers to get the proper CallStack
+-------------------------------------------------------------------------------}
+
+writeChunk :: HasCallStack => OutputStream -> Builder -> IO ()
+writeChunk = _writeChunk
+
+writeChunkFinal :: HasCallStack => OutputStream -> Builder -> IO ()
+writeChunkFinal = _writeChunkFinal
+
+flush :: HasCallStack => OutputStream -> IO ()
+flush = _flush
+
+getChunk :: HasCallStack => InputStream -> IO (Strict.ByteString, Bool)
+getChunk = _getChunk
+
+getTrailers :: HasCallStack => InputStream -> IO [HTTP.Header]
+getTrailers = _getTrailers
+
+{-------------------------------------------------------------------------------
+  Server API
+-------------------------------------------------------------------------------}
+
+serverInputStream :: Server.Request -> IO InputStream
+serverInputStream req = do
+    return InputStream {
+        _getChunk =
+           wrapStreamExceptionsWith ClientDisconnected $
+             Server.getRequestBodyChunk' req
+      , _getTrailers =
+           wrapStreamExceptionsWith ClientDisconnected $
+             maybe [] fromHeaderTable <$> Server.getRequestTrailers req
+      }
+
+-- | Create output stream
+--
+-- == Note on the use of Trailers-Only in non-error cases
+--
+-- If the stream is closed without writing anything, the situation is similar to
+-- the gRPC @Trailers-Only@ case, except that we have already sent the initial
+-- set of headers. In this case, http2 will (reasonably enough) create an empty
+-- DATA frame, and then another HEADERS frame for the trailers. This is conform
+-- the gRPC specification, which mandates:
+--
+-- > Most responses are expected to have both headers and trailers but
+-- > Trailers-Only is permitted for calls that produce an immediate error.
+--
+-- If we compare this to the official Python example @RouteGuide@ server,
+-- however, we see that the @Trailers-Only@ case is sometimes also used in
+-- non-error cases. An example is @RouteGuide.listFeatures@: when there /are/ no
+-- features in the specified rectangle, the server will send no messages back to
+-- the client. The example Python server will use the gRPC Trailers-Only case
+-- here (and so we must be able to deal with that in our client implementation).
+--
+-- We do provide this functionality, but only through a specific API (see
+-- 'sendTrailersOnly'); when that API is used, we do not make use of this
+-- 'OutputStream' abstraction (indeed, we do not stream at all). In streaming
+-- cases (the default) we do not make use of @Trailers-Only@.
+serverOutputStream :: OutBodyIface -> IO OutputStream
+serverOutputStream iface = do
+    -- Make sure that http2 does not wait for the first message before sending
+    -- the response headers. This is important: the client might want the
+    -- initial response metadata before the first message.
+    --
+    -- This does require some justification; if any of the reasons below is
+    -- no longer true, we might need to reconsider:
+    --
+    -- o The extra cost of this flush is that we might need an additional TCP
+    --   packet; no big deal.
+    -- o We only create the 'OutputStream' once the user actually initiates the
+    --   response, at which point the headers are fixed.
+    -- o We do not use an 'OutputStream' at all when we are in the Trailers-Only
+    --   case (see discussion above).
+
+    let outputStream = OutputStream {
+            _writeChunk = \c ->
+               wrapStreamExceptionsWith ClientDisconnected $
+                 outBodyPush iface c
+          , _writeChunkFinal = \c ->
+               wrapStreamExceptionsWith ClientDisconnected $
+                 outBodyPushFinal iface c
+          , _flush =
+               wrapStreamExceptionsWith ClientDisconnected $
+                 outBodyFlush iface
+          }
+
+    flush outputStream
+    return outputStream
+
+{-------------------------------------------------------------------------------
+  Client API
+-------------------------------------------------------------------------------}
+
+clientInputStream :: Client.Response -> IO InputStream
+clientInputStream resp = do
+    return InputStream {
+        _getChunk =
+           wrapStreamExceptionsWith ServerDisconnected $
+             Client.getResponseBodyChunk' resp
+      , _getTrailers =
+           wrapStreamExceptionsWith ServerDisconnected $
+             maybe [] fromHeaderTable <$> Client.getResponseTrailers resp
+      }
+
+-- | Construct a client 'OutputStream'
+--
+-- We do not wrap the members of the 'OutputStream' with
+-- 'wrapStreamExceptionsWith', since we do this around the entire
+-- 'sendMessageLoop'. See the comment for @outboundThread@ in
+-- 'Network.GRPC.Util.Session.Client.setupRequestChannel'.
+clientOutputStream :: OutBodyIface -> IO OutputStream
+clientOutputStream iface =
+    return OutputStream {
+        _writeChunk = \c ->
+          outBodyPush iface c
+      , _writeChunkFinal = \c ->
+          outBodyPushFinal iface c
+      , _flush =
+          outBodyFlush iface
+      }
+
+{-------------------------------------------------------------------------------
+  Exceptions
+-------------------------------------------------------------------------------}
+
+-- | Client disconnected unexpectedly
+--
+-- /If/ you choose to catch this exception, you are advised to match against
+-- the type, rather than against the constructor, and then use the record
+-- accessors to get access to the fields. Future versions of @grapesy@ may
+-- record more information.
+data ClientDisconnected = ClientDisconnected {
+      clientDisconnectedException :: SomeException
+    , clientDisconnectedCallStack :: CallStack
+    }
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | Server disconnected unexpectedly
+--
+-- See comments for 'ClientDisconnected' on how to catch this exception.
+data ServerDisconnected = ServerDisconnected {
+      serverDisconnectedException :: SomeException
+    , serverDisconnectedCallstack :: CallStack
+    }
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+wrapStreamExceptionsWith ::
+     (HasCallStack, Exception e)
+  => (SomeException -> CallStack -> e)
+  -> IO a -> IO a
+wrapStreamExceptionsWith f action =
+    action `catch` \err ->
+      throwIO $ f err callStack
diff --git a/src/Network/GRPC/Util/RedundantConstraint.hs b/src/Network/GRPC/Util/RedundantConstraint.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/RedundantConstraint.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE AllowAmbiguousTypes #-}
+{-# OPTIONS_GHC -Wno-redundant-constraints #-}
+
+module Network.GRPC.Util.RedundantConstraint (addConstraint) where
+
+-- | Add redundant constraint without triggering ghc warning
+--
+-- Example usage:
+--
+-- > foo :: forall .. . SomeRedundantConstraint => ..
+-- > foo .. = ..
+-- >   where
+-- >     _ = addConstraint @SomeRedundantConstraint
+addConstraint :: c => ()
+addConstraint = ()
diff --git a/src/Network/GRPC/Util/Session.hs b/src/Network/GRPC/Util/Session.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/Session.hs
@@ -0,0 +1,57 @@
+-- | Session interface
+--
+-- A \"session\" is a series of messages exchanged by two nodes in a network;
+-- we might be a client and our peer might be a server, or we might be a
+-- server and our peer might be a client. Here we provide a abstraction which
+--
+-- * takes care of concurrency issues
+-- * is typed, with different types for inbound and outbound headers, messages
+--   and trailers
+-- * works the same way whether we are a client or a server.
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Util.Session qualified as Session
+module Network.GRPC.Util.Session (
+    -- * Session API
+    DataFlow(..)
+  , FlowStart(..)
+  , IsSession(..)
+  , InitiateSession(..)
+  , NoTrailers(..)
+    -- ** Raw request/response info
+  , RequestInfo(..)
+  , ResponseInfo(..)
+    -- ** Exceptions
+  , PeerException(..)
+    -- * Channel
+  , Channel(..)
+    -- ** Working with an open channel
+  , getInboundHeaders
+  , send
+  , recvBoth
+  , recvEither
+  , RecvFinal(..)
+  , RecvAfterFinal(..)
+  , SendAfterFinal(..)
+    -- ** Closing
+  , waitForOutbound
+  , close
+  , ChannelDiscarded(..)
+  , ChannelAborted(..)
+    -- ** Half-closing
+  , AllowHalfClosed(..)
+    -- ** Construction
+    -- *** Client
+  , ConnectionToServer(..)
+  , CancelRequest
+  , setupRequestChannel
+    -- *** Server
+  , ConnectionToClient(..)
+  , setupResponseChannel
+  ) where
+
+import Network.GRPC.Util.Session.API
+import Network.GRPC.Util.Session.Channel
+import Network.GRPC.Util.Session.Client
+import Network.GRPC.Util.Session.Server
diff --git a/src/Network/GRPC/Util/Session/API.hs b/src/Network/GRPC/Util/Session/API.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/Session/API.hs
@@ -0,0 +1,162 @@
+module Network.GRPC.Util.Session.API (
+    -- * Preliminaries
+    RequestInfo(..)
+  , ResponseInfo(..)
+    -- * Main definitions
+  , DataFlow(..)
+  , FlowStart(..)
+  , IsSession(..)
+  , InitiateSession(..)
+    -- * Exceptions
+  , PeerException(..)
+  ) where
+
+import Control.Exception
+import Data.ByteString.Builder (Builder)
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+import Data.Kind
+import Network.HTTP.Types qualified as HTTP
+
+-- Doesn't really matter if we import this from .Client or .Server
+import Network.HTTP2.Client qualified as HTTP2 (Path)
+
+import Network.GRPC.Spec.Util.Parser (Parser)
+
+{-------------------------------------------------------------------------------
+  Preliminaries
+-------------------------------------------------------------------------------}
+
+data RequestInfo = RequestInfo {
+      requestMethod  :: HTTP.Method
+    , requestPath    :: HTTP2.Path
+    , requestHeaders :: [HTTP.Header]
+    }
+  deriving (Show)
+
+data ResponseInfo = ResponseInfo {
+      responseStatus  :: HTTP.Status
+    , responseHeaders :: [HTTP.Header]
+    , responseBody    :: Maybe Lazy.ByteString -- ^ Only for errors
+    }
+  deriving (Show)
+
+{-------------------------------------------------------------------------------
+  Main definition
+-------------------------------------------------------------------------------}
+
+-- | Flow of data in a session
+--
+-- This describes the flow of data in /one/ direction. The normal flow of data
+-- is as follows:
+--
+-- 1. (Proper) Headers
+-- 2. Messages
+-- 3. Trailers
+--
+-- However, in the case that there /are/ no messages, this whole thing collapses
+-- and we just have headers (in gRPC this is referred to as the Trailers-Only
+-- case, but we avoid that terminology here).
+--
+-- * It looks different on the wire: in the regular case, we will have /two/
+--   HTTP @Headers@ frames, but in the absence of messages we only have one.
+-- * Applications may in turn treat this case special, using a different set of
+--   headers (specifically, this is the case for gRPC).
+class ( Show (Headers    flow)
+      , Show (Message    flow)
+      , Show (Trailers   flow)
+      , Show (NoMessages flow)
+      ) => DataFlow flow where
+  data Headers    flow :: Type
+  type Message    flow :: Type
+  type Trailers   flow :: Type
+  type NoMessages flow :: Type
+
+-- | Start of data flow
+--
+-- See 'DataFlow' for discussion.
+data FlowStart flow =
+    FlowStartRegular    (Headers    flow)
+  | FlowStartNoMessages (NoMessages flow)
+
+deriving instance DataFlow flow => Show (FlowStart flow)
+
+-- | Session between two nodes in the network
+--
+-- The session is described from the point of view of /this/ node, who is
+-- talking to a peer node. For example, if this node is a client, then the peer
+-- is a server, the outbound headers correspond to a request and the inbound
+-- headers correspond to a response (see also 'InitiateSession').
+--
+-- We avoid referring to \"inputs\" or \"outputs\" here, but instead talk about
+-- \"inbound\" or \"outbound\". When we are dealing with gRPC, \"inputs\" are
+-- outbound for the client and inbound for the server, and \"outputs\" are
+-- inbound for the client and outbound for the server.
+class ( DataFlow (Inbound  sess)
+      , DataFlow (Outbound sess)
+      ) => IsSession sess where
+  type Inbound  sess :: Type
+  type Outbound sess :: Type
+
+  -- | Parse proper trailers
+  parseInboundTrailers ::
+       sess
+    -> [HTTP.Header]
+    -> IO (Trailers (Inbound sess))
+
+  -- | Build proper trailers
+  buildOutboundTrailers ::
+       sess
+    -> Trailers (Outbound sess)
+    -> [HTTP.Header]
+
+  -- | Parse message
+  parseMsg ::
+       sess
+    -> Headers (Inbound sess)
+    -> Parser String (Message (Inbound sess))
+
+  -- | Build message
+  buildMsg ::
+       sess
+    -> Headers (Outbound sess)
+    -> Message (Outbound sess)
+    -> Builder
+
+-- | Initiate new session
+--
+-- A client node connects to a server, and initiates the request.
+class IsSession sess => InitiateSession sess where
+  -- | Build 'RequestInfo' for the server
+  buildRequestInfo ::
+       sess
+    -> FlowStart (Outbound sess) -> RequestInfo
+
+  -- | Parse 'ResponseInfo' from the server
+  parseResponse ::
+      sess
+   -> ResponseInfo
+   -> IO (FlowStart (Inbound sess))
+
+{-------------------------------------------------------------------------------
+  Exceptions
+-------------------------------------------------------------------------------}
+
+-- | Misbehaving peer
+--
+-- Although this exception could in principle be caught, there is not much that
+-- can be done to rectify the situation: probably this peer should just be
+-- avoided (although perhaps one can hope that the problem was transient).
+data PeerException =
+    -- | Peer sent a malformed message (parser returned an error)
+    PeerSentMalformedMessage String
+
+    -- | Peer sent an incomplete message (parser did not consume all data)
+  | PeerSentIncompleteMessage
+
+    -- | HTTP response missing @:status@ pseudo-header
+    --
+    -- This is not part of 'CallSetupFailure' because the call may have been
+    -- well under way before the server initiates a response.
+  | PeerMissingPseudoHeaderStatus
+  deriving stock (Show)
+  deriving anyclass (Exception)
diff --git a/src/Network/GRPC/Util/Session/Channel.hs b/src/Network/GRPC/Util/Session/Channel.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/Session/Channel.hs
@@ -0,0 +1,637 @@
+-- | Channel
+--
+-- You should not have to import this module directly; instead import
+-- "Network.GRPC.Util.Session".
+module Network.GRPC.Util.Session.Channel (
+    -- * Main definition
+    Channel(..)
+  , initChannel
+    -- ** Flow state
+  , FlowState(..)
+  , RegularFlowState(..)
+  , initFlowStateRegular
+    -- * Working with an open channel
+  , getInboundHeaders
+  , send
+  , recvBoth
+  , recvEither
+  , RecvFinal(..)
+  , RecvAfterFinal(..)
+  , SendAfterFinal(..)
+    -- * Closing
+  , waitForOutbound
+  , close
+  , ChannelDiscarded(..)
+  , ChannelAborted(..)
+    -- * Support for half-closing
+  , InboundResult
+  , AllowHalfClosed(..)
+  , linkOutboundToInbound
+    -- * Constructing channels
+  , sendMessageLoop
+  , recvMessageLoop
+  , outboundTrailersMaker
+  ) where
+
+import Control.Concurrent.STM
+import Control.DeepSeq (NFData, force)
+import Control.Exception
+import Control.Monad
+import Control.Monad.Catch (ExitCase(..))
+import Data.Bifunctor
+import Data.ByteString.Builder (Builder)
+import Data.ByteString.Lazy qualified as BS.Lazy
+import GHC.Stack
+
+-- Doesn't really matter if we import from .Client or .Server
+import Network.HTTP2.Client qualified as HTTP2 (
+    TrailersMaker
+  , NextTrailersMaker(..)
+  )
+
+import Network.GRPC.Common.StreamElem (StreamElem(..))
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+import Network.GRPC.Spec.Util.Parser (Parser)
+import Network.GRPC.Spec.Util.Parser qualified as Parser
+import Network.GRPC.Util.HTTP2.Stream
+import Network.GRPC.Util.RedundantConstraint
+import Network.GRPC.Util.Session.API
+import Network.GRPC.Util.Thread
+
+{-------------------------------------------------------------------------------
+  Definitions
+
+  The fields of 'Channel' are its /implementation/, not its interface. It is
+  kept opaque in the top-level @.Peer@ module.
+
+  Implementation note: it is tempting to try and define 'Channel' purely in
+  terms of bytestrings, and deal with serialization and deserialization to and
+  from messages in a higher layer. However, this does not work:
+
+  - For deserialization, if we make chunks of messages available in the 'TMVar',
+    then if multiple threads are reading from that one 'TMVar', one thread might
+    get the first chunk of a message and another thread the second.
+  - Similarly, for serialization, if multiple threads are trying to write to the
+    'TMVar', we might get interleaving of fragments of messages.
+
+  Thus, to ensure thread safety, we work at the level of messages, not bytes.
+-------------------------------------------------------------------------------}
+
+-- | Bidirectional open channel on a node to a peer node
+--
+-- The node might be a client (and its peer a server), or the node might be
+-- a server (and its peer a client); the main purpose of this abstraction
+-- is precisely to abstract over that difference.
+--
+-- Each channel is constructed for a /single/ session (request/response).
+data Channel sess = Channel {
+      -- | Thread state of the thread receiving messages from the peer
+      channelInbound :: TVar (ThreadState (FlowState (Inbound sess)))
+
+      -- | Thread state of the thread sending messages to the peer
+    , channelOutbound :: TVar (ThreadState (FlowState (Outbound sess)))
+
+      -- | Have we sent the final message?
+      --
+      -- The sole purpose of this 'TVar' is catching user mistakes: if there is
+      -- another 'send' after the final message, we can throw an exception,
+      -- rather than the message simply being lost or blockng indefinitely.
+    , channelSentFinal :: TVar (Maybe CallStack)
+
+      -- | Have we received the final message?
+      --
+      -- This is used to improve the user experience; see 'channelSentFinal'.
+      -- It is also used when checking if a call should be considered
+      -- \"cancelled\"; see 'withRPC'.
+    , channelRecvFinal :: TVar (RecvFinal (Inbound sess))
+    }
+
+data RecvFinal flow =
+    -- | We have not yet delivered the final message to the client
+    RecvNotFinal
+
+    -- | We delivered the final message, but not yet the trailers
+  | RecvWithoutTrailers (Trailers flow)
+
+    -- | We delivered the final message and the trailers
+  | RecvFinal CallStack
+
+-- | Data flow state
+data FlowState flow =
+    FlowStateRegular (RegularFlowState flow)
+  | FlowStateNoMessages (NoMessages flow)
+
+-- | Regular (streaming) flow state
+data RegularFlowState flow = RegularFlowState {
+      -- | Headers
+      --
+      -- On the client side, the outbound headers are specified when the request
+      -- is made ('callRequestMetadata'), and the inbound headers are recorded
+      -- once the responds starts to come in; clients can block-and-wait for
+      -- these headers ('getInboundHeaders').
+      --
+      -- On the server side, the inbound headers are recorded when the request
+      -- comes in, and the outbound headers are specified
+      -- ('setResponseMetadata') before the response is initiated
+      -- ('initiateResponse'/'sendTrailersOnly').
+      flowHeaders :: Headers flow
+
+      -- | Messages
+      --
+      -- This TMVar is written to for incoming messages ('recvMessageLoop') and
+      -- read from for outgoing messages ('sendMessageLoop'). It acts as a
+      -- one-place buffer, providing backpressure in both directions.
+    , flowMsg :: TMVar (StreamElem (Trailers flow) (Message flow))
+
+      -- | Trailers
+      --
+      -- Unlike 'flowMsg', which is /written/ to in 'recvMessageLoop' and /read/
+      -- from in 'sendMessageLoop', both loops /set/ 'flowTerminated', once,
+      -- just before they terminate.
+      --
+      -- * For 'sendMessageLoop', this means that the last message has been
+      --   written (that is, the last call to 'writeChunk' has happened).
+      --   This has two consequences:
+      --
+      --   1. @http2@ can now construct the trailers ('outboundTrailersMaker')
+      --   2. Higher layers can wait on 'flowTerminated' to be /sure/ that the
+      --      last message has been written.
+      --
+      -- * For 'recvMessageLoop', this means that the trailers have been
+      --   received from the peer. Higher layers can use this to check for, or
+      --   block-and-wait, to receive those trailers.
+      --
+      -- == Relation to 'channelSentFinal'/'channelRecvFinal'
+      --
+      -- 'flowTerminated' is set at different times than 'channelSentFinal' and
+      -- 'channelRecvFinal' are:
+      --
+      -- * 'channelSentFinal' is set on the last call to 'send', but /before/
+      --   the message is processed by 'sendMessageLoop'.
+      -- * 'channelRecvFinal', dually, is set on the last call to 'recv, which
+      --   must (necessarily) happen /before/ that message is actually made
+      --   available by 'recvMessageLoop'.
+      --
+      -- /Their/ sole purpose is to catch user errors, not capture data flow.
+    , flowTerminated :: TMVar (Trailers flow)
+    }
+
+-- | 'Show' instance is useful in combination with @stm-debug@ only
+deriving instance (
+    Show (Headers flow)
+  , Show (TMVar (StreamElem (Trailers flow) (Message flow)))
+  , Show (TMVar (Trailers flow))
+  ) => Show (RegularFlowState flow)
+
+{-------------------------------------------------------------------------------
+  Initialization
+-------------------------------------------------------------------------------}
+
+initChannel :: HasCallStack => IO (Channel sess)
+initChannel = do
+    channelInbound   <- newThreadState
+    channelOutbound  <- newThreadState
+    channelSentFinal <- newTVarIO Nothing
+    channelRecvFinal <- newTVarIO RecvNotFinal
+    return Channel{
+        channelInbound
+      , channelOutbound
+      , channelSentFinal
+      , channelRecvFinal
+      }
+
+initFlowStateRegular :: Headers flow -> IO (RegularFlowState flow)
+initFlowStateRegular flowHeaders = do
+   flowMsg        <- newEmptyTMVarIO
+   flowTerminated <- newEmptyTMVarIO
+   return RegularFlowState {
+       flowHeaders
+     , flowMsg
+     , flowTerminated
+     }
+
+{-------------------------------------------------------------------------------
+  Working with an open channel
+-------------------------------------------------------------------------------}
+
+-- | The inbound headers
+--
+-- Will block if the inbound headers have not yet been received.
+getInboundHeaders ::
+     Channel sess
+  -> IO (Either (NoMessages (Inbound sess)) (Headers (Inbound sess)))
+getInboundHeaders Channel{channelInbound} =
+    withThreadInterface channelInbound (return . aux)
+  where
+    aux :: forall flow.
+         FlowState flow
+      -> Either (NoMessages flow) (Headers flow)
+    aux (FlowStateRegular    regular)  = Right $ flowHeaders regular
+    aux (FlowStateNoMessages trailers) = Left trailers
+
+-- | Send a message to the node's peer
+--
+-- It is a bug to call 'send' again after the final message (that is, a message
+-- which 'StreamElem.whenDefinitelyFinal' considers to be final). Doing so will
+-- result in a 'SendAfterFinal' exception.
+send :: forall sess.
+     (HasCallStack, NFData (Message (Outbound sess)))
+  => Channel sess
+  -> StreamElem (Trailers (Outbound sess)) (Message (Outbound sess))
+  -> IO ()
+send Channel{channelOutbound, channelSentFinal} = \msg -> do
+    msg' <- evaluate $ force <$> msg
+    withThreadInterface channelOutbound $ aux msg'
+  where
+    aux ::
+         StreamElem (Trailers (Outbound sess)) (Message (Outbound sess))
+      -> FlowState (Outbound sess)
+      -> STM ()
+    aux msg st = do
+        -- By checking that we haven't sent the final message yet, we know that
+        -- this call to 'putMVar' will not block indefinitely: the thread that
+        -- sends messages to the peer will get to it eventually (unless it dies,
+        -- in which case the thread status will change and the call to
+        -- 'getThreadInterface' will be retried).
+        sentFinal <- readTVar channelSentFinal
+        case sentFinal of
+          Just cs -> throwSTM $ SendAfterFinal cs
+          Nothing -> return ()
+        case st of
+          FlowStateRegular regular -> do
+            StreamElem.whenDefinitelyFinal msg $ \_trailers ->
+              writeTVar channelSentFinal $ Just callStack
+
+            putTMVar (flowMsg regular) msg
+          FlowStateNoMessages _ ->
+            -- For outgoing messages, the caller decides to use Trailers-Only,
+            -- so if they then subsequently call 'send', we throw an exception.
+            -- This is different for /inbound/ messages; see 'recv', below.
+            throwSTM $ SendButTrailersOnly
+
+-- | Receive a message from the node's peer
+--
+-- If the sender indicates that the message is final /when/ they send it, by
+-- sending the HTTP trailers in the same frame, then we will return the message
+-- and the trailers together. It is a bug to call 'recvBoth' again after this;
+-- doing so will result in a 'RecvAfterFinal' exception.
+recvBoth :: forall sess.
+     HasCallStack
+  => Channel sess
+  -> IO ( Either
+            (NoMessages (Inbound sess))
+            (StreamElem (Trailers (Inbound sess)) (Message (Inbound sess)))
+        )
+recvBoth =
+    recv'
+      StreamElem
+      NoMoreElems
+      ((,Nothing) . uncurry FinalElem)
+
+-- | Variant on 'recvBoth' where trailers are always returned separately
+--
+-- Unlike in 'recvBoth', even if the sender indicates that the final message is
+-- final when they send it, we will store these trailers internally and return
+-- only that final message. The trailers are then returned on the /next/ call to
+-- 'recvEither'. Call 'recvEither' again /after/ receiving the trailers is a
+-- bug; doing so will result in a 'RecvAfterFinal' exception.
+recvEither ::
+     HasCallStack
+  => Channel sess
+  -> IO ( Either
+            (NoMessages (Inbound sess))
+            (Either (Trailers (Inbound sess)) (Message (Inbound sess)))
+        )
+recvEither =
+    recv'
+      Right
+      Left
+      (bimap Right Just)
+
+-- | Internal generalization of 'recvBoth' and 'recvEither'
+recv' :: forall sess b.
+     HasCallStack
+  => (Message    (Inbound sess) -> b)  -- ^ Message without trailers
+  -> (Trailers   (Inbound sess) -> b)  -- ^ Trailers without (final) message
+  -> (    (Message (Inbound sess), Trailers (Inbound sess))
+       -> (b, Maybe (Trailers (Inbound sess)))
+     )
+     -- ^ Message with trailers
+     --
+     -- In addition to the result, should also return the trailers to keep for
+     -- the next call to 'recv'' (if any).
+  -> Channel sess
+  -> IO (Either (NoMessages (Inbound sess)) b)
+recv' messageWithoutTrailers
+      trailersWithoutMessage
+      messageWithTrailers
+      Channel{channelInbound, channelRecvFinal} =
+    withThreadInterface channelInbound aux
+  where
+    aux ::
+         FlowState (Inbound sess)
+      -> STM (Either (NoMessages (Inbound sess)) b)
+    aux st = do
+        -- By checking that we haven't received the final message yet, we know
+        -- that this call to 'takeTMVar' will not block indefinitely: the thread
+        -- that receives messages from the peer will get to it eventually
+        -- (unless it dies, in which case the thread status will change and the
+        -- call to 'getThreadInterface' will be retried).
+        readFinal <- readTVar channelRecvFinal
+        case readFinal of
+          RecvNotFinal ->
+            case st of
+              FlowStateRegular regular -> Right <$> do
+                streamElem <- takeTMVar (flowMsg regular)
+                -- We update 'channelRecvFinal' in the same tx as the read, to
+                -- atomically change "there is a value" to "all values read".
+                case streamElem of
+                  StreamElem msg ->
+                    return $ messageWithoutTrailers msg
+                  FinalElem msg trailers -> do
+                    let (b, mTrailers) = messageWithTrailers (msg, trailers)
+                    writeTVar channelRecvFinal $
+                      maybe (RecvFinal callStack) RecvWithoutTrailers mTrailers
+                    return $ b
+                  NoMoreElems trailers -> do
+                    writeTVar channelRecvFinal $ RecvFinal callStack
+                    return $ trailersWithoutMessage trailers
+              FlowStateNoMessages trailers -> do
+                writeTVar channelRecvFinal $ RecvFinal callStack
+                return $ Left trailers
+          RecvWithoutTrailers trailers -> do
+            writeTVar channelRecvFinal $ RecvFinal callStack
+            return $ Right $ trailersWithoutMessage trailers
+          RecvFinal cs ->
+            throwSTM $ RecvAfterFinal cs
+
+-- | Thrown by 'send'
+--
+-- The 'CallStack' is the callstack of the final call to 'send'.
+--
+-- See 'send' for additional discussion.
+data SendAfterFinal =
+    -- | Call to 'send' after the final message was sent
+    SendAfterFinal CallStack
+
+    -- | Call to 'send', but we are in the Trailers-Only case
+  | SendButTrailersOnly
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | Thrown by 'recv'
+--
+-- The 'CallStack' is the callstack of the final call to 'recv'.
+--
+-- See 'recv' for additional discussion.
+data RecvAfterFinal =
+     -- | Call to 'recv' after the final message was already received
+     RecvAfterFinal CallStack
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+{-------------------------------------------------------------------------------
+  Closing
+-------------------------------------------------------------------------------}
+
+-- | Wait for the outbound thread to terminate
+--
+-- See 'close' for discussion.
+waitForOutbound :: Channel sess -> IO ()
+waitForOutbound Channel{channelOutbound} = atomically $
+    waitForNormalThreadTermination channelOutbound
+
+-- | Close the channel
+--
+-- Before a channel can be closed, you should 'send' the final outbound message
+-- and then 'waitForOutbound' until all outbound messages have been processed.
+-- Not doing so is considered a bug (it is not possible to do this implicitly,
+-- because the final call to 'send' involves a choice of trailers, and calling
+-- 'waitForOutbound' /without/ a final close to 'send' will result in deadlock).
+-- Typically code will also process all /incoming/ messages, but doing so is of
+-- course not mandatory.
+--
+-- Calling 'close' will kill the outbound thread ('sendMessageLoop'), /if/ it is
+-- still running. If the thread was terminated with an exception, this could
+-- mean one of two things:
+--
+-- 1. The connection to the peer was lost
+-- 2. Proper procedure for outbound messages was not followed (see above)
+--
+-- In the case of (2) this is bug in the caller, and so 'close' will return an
+-- exception. In the case of (1), however, very likely an exception will
+-- /already/ have been thrown when a communication attempt was made, and 'close'
+-- will return 'Nothing'. This matches the design philosophy in @grapesy@ that
+-- exceptions are thrown \"lazily\" rather than \"strictly\".
+close ::
+     HasCallStack
+  => Channel sess
+  -> ExitCase a    -- ^ The reason why the channel is being closed
+  -> IO (Maybe SomeException)
+close Channel{channelOutbound} reason = do
+    -- We leave the inbound thread running. Although the channel is closed,
+    -- there might still be unprocessed messages in the queue. The inbound
+    -- thread will terminate once it reaches the end of the queue.
+    outbound <- cancelThread channelOutbound channelClosed
+    case outbound of
+      AlreadyTerminated _ ->
+        return $ Nothing
+      AlreadyAborted _err ->
+        -- Connection to the peer was lost prior to closing
+        return $ Nothing
+      Cancelled ->
+        -- Proper procedure for outbound messages was not followed
+        return $ Just channelClosed
+  where
+    channelClosed :: SomeException
+    channelClosed =
+        case reason of
+          ExitCaseSuccess _   -> toException $ ChannelDiscarded callStack
+          ExitCaseAbort       -> toException $ ChannelAborted   callStack
+          ExitCaseException e -> e
+
+-- | Channel was closed because it was discarded
+--
+-- This typically corresponds to leaving the scope of 'runHandler' or
+-- 'withRPC' (without throwing an exception).
+data ChannelDiscarded = ChannelDiscarded CallStack
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | Channel was closed for an unknown reason
+--
+-- This will only be used in monad stacks that have error mechanisms other
+-- than exceptions.
+data ChannelAborted = ChannelAborted CallStack
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+{-------------------------------------------------------------------------------
+  Support for half-closing
+-------------------------------------------------------------------------------}
+
+type InboundResult sess =
+       Either (NoMessages (Inbound sess))
+              (Trailers   (Inbound sess))
+
+-- | Should we allow for a half-clsoed connection state?
+--
+-- In HTTP2, streams are bidirectional and can be half-closed in either
+-- direction. This is however not true for all applications /of/ HTTP2. For
+-- example, in gRPC the stream can be half-closed from the client to the server
+-- (indicating that the client will not send any more messages), but not from
+-- the server to the client: when the server half-closes their connection, it
+-- sends the gRPC trailers and this terminates the call.
+data AllowHalfClosed sess =
+    ContinueWhenInboundClosed
+  | TerminateWhenInboundClosed (InboundResult sess -> SomeException)
+
+-- | Link outbound thread to the inbound thread
+--
+-- This should be wrapped around the body of the inbound thread. It ensures that
+-- when the inbound thread throws an exception, the outbound thread dies also.
+-- This improves predictability of exceptions: the inbound thread spends most of
+-- its time blocked on messages from the peer, and will therefore notice when
+-- the connection is lost. This is not true for the outbound thread, which
+-- spends most of its time blocked waiting for messages to send to the peer.
+linkOutboundToInbound :: forall sess.
+     IsSession sess
+  => AllowHalfClosed sess
+  -> Channel sess
+  -> IO (InboundResult sess)
+  -> IO ()
+linkOutboundToInbound allowHalfClosed channel inbound = do
+    mResult <- try inbound
+
+    -- Implementation note: After cancelThread returns, 'channelOutbound' has
+    -- been updated, and considered dead, even if perhaps the thread is still
+    -- cleaning up.
+
+    case (mResult, allowHalfClosed) of
+      (Right _result, ContinueWhenInboundClosed) ->
+        return ()
+      (Right result, TerminateWhenInboundClosed f) ->
+        void $ cancelThread (channelOutbound channel) (f result)
+      (Left (exception :: SomeException), _) -> do
+        void $ cancelThread (channelOutbound channel) exception
+        throwIO exception
+  where
+    _ = addConstraint @(IsSession sess)
+
+{-------------------------------------------------------------------------------
+  Constructing channels
+
+  Both 'sendMessageLoop' and 'recvMessageLoop' will be run in newly forked
+  threads, using the 'Thread' API from "Network.GRPC.Util.Thread". We are
+  therefore not particularly worried about these loops being interrupted by
+  asynchronous exceptions: this only happens if the threads are explicitly
+  terminated (when the corresponding channels are closed), in which case any
+  attempt to interact with them after they have been killed will be handled by
+  'getThreadInterface' throwing 'ThreadInterfaceUnavailable'.
+-------------------------------------------------------------------------------}
+
+-- | Send all messages to the node's peer
+sendMessageLoop :: forall sess.
+     IsSession sess
+  => sess
+  -> RegularFlowState (Outbound sess)
+  -> OutputStream
+  -> IO ()
+sendMessageLoop sess st stream = do
+    trailers <- loop
+    atomically $ putTMVar (flowTerminated st) trailers
+  where
+    build :: (Message (Outbound sess) -> Builder)
+    build = buildMsg sess (flowHeaders st)
+
+    loop :: IO (Trailers (Outbound sess))
+    loop = do
+        msg <- atomically $ takeTMVar (flowMsg st)
+        case msg of
+          StreamElem x -> do
+            writeChunk stream $ build x
+            flush stream
+            loop
+          FinalElem x trailers -> do
+            writeChunkFinal stream $ build x
+            return trailers
+          NoMoreElems trailers -> do
+            -- It is crucial to still 'writeChunkFinal' here to guarantee that
+            -- cancellation is a no-op. Without it, cancellation may result in a
+            -- @RST_STREAM@ frame may being sent to the peer.
+            --
+            -- This does not necessarily write a DATA frame, since http2 avoids
+            -- writing empty data frames unless they are marked @END_OF_STREAM@.
+            writeChunkFinal stream $ mempty
+            return trailers
+
+-- | Receive all messages sent by the node's peer
+recvMessageLoop :: forall sess.
+     IsSession sess
+  => sess
+  -> RegularFlowState (Inbound sess)
+  -> InputStream
+  -> IO (Trailers (Inbound sess))
+recvMessageLoop sess st stream =
+    go $ parseMsg sess (flowHeaders st)
+  where
+    go :: Parser String (Message (Inbound sess)) -> IO (Trailers (Inbound sess))
+    go parser = do
+        mProcessedFinal <- throwParseErrors =<< Parser.processAll
+          (getChunk stream)
+          processOne
+          processFinal
+          parser
+        case mProcessedFinal of
+          Just trailers ->
+            return trailers
+          Nothing -> do
+            trailers <- processTrailers
+            atomically $ putTMVar (flowMsg st) $ NoMoreElems trailers
+            return trailers
+
+    processOne :: Message (Inbound sess) -> IO ()
+    processOne msg = do
+        atomically $ putTMVar (flowMsg st) $ StreamElem msg
+
+    processFinal :: Message (Inbound sess) -> IO (Trailers (Inbound sess))
+    processFinal msg = do
+        trailers <- processTrailers
+        atomically $ putTMVar (flowMsg st) $ FinalElem msg trailers
+        return trailers
+
+    processTrailers :: IO (Trailers (Inbound sess))
+    processTrailers = do
+        trailers <- parseInboundTrailers sess =<< getTrailers stream
+        atomically $ putTMVar (flowTerminated st) $ trailers
+        return trailers
+
+    throwParseErrors :: Parser.ProcessResult String b -> IO (Maybe b)
+    throwParseErrors (Parser.ProcessError err) =
+        throwIO $ PeerSentMalformedMessage err
+    throwParseErrors (Parser.ProcessedWithFinal b leftover) = do
+        unless (BS.Lazy.null leftover) $ throwIO PeerSentIncompleteMessage
+        return $ Just b
+    throwParseErrors (Parser.ProcessedWithoutFinal leftover) = do
+        unless (BS.Lazy.null leftover) $ throwIO PeerSentIncompleteMessage
+        return $ Nothing
+
+outboundTrailersMaker :: forall sess.
+     IsSession sess
+  => sess
+  -> Channel sess
+  -> RegularFlowState (Outbound sess)
+  -> HTTP2.TrailersMaker
+outboundTrailersMaker sess Channel{channelOutbound} regular = go
+  where
+    go :: HTTP2.TrailersMaker
+    go (Just _) = return $ HTTP2.NextTrailersMaker go
+    go Nothing  = do
+        mFlowState <- atomically $
+          unlessAbnormallyTerminated channelOutbound $
+            readTMVar (flowTerminated regular)
+        case mFlowState of
+            Right trailers ->
+              return $ HTTP2.Trailers $ buildOutboundTrailers sess trailers
+            Left _exception ->
+              return $ HTTP2.Trailers []
diff --git a/src/Network/GRPC/Util/Session/Client.hs b/src/Network/GRPC/Util/Session/Client.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/Session/Client.hs
@@ -0,0 +1,223 @@
+-- | Node with client role (i.e., its peer is a server)
+module Network.GRPC.Util.Session.Client (
+    ConnectionToServer(..)
+  , NoTrailers(..)
+  , CancelRequest
+  , setupRequestChannel
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.STM
+import Control.Monad
+import Control.Monad.Catch
+import Data.ByteString qualified as BS.Strict
+import Data.ByteString qualified as Strict (ByteString)
+import Data.ByteString.Lazy qualified as BS.Lazy
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+import Data.Proxy
+import Network.HTTP.Types qualified as HTTP
+import Network.HTTP2.Client qualified as Client
+
+import Network.GRPC.Util.HTTP2 (fromHeaderTable)
+import Network.GRPC.Util.HTTP2.Stream
+import Network.GRPC.Util.RedundantConstraint (addConstraint)
+import Network.GRPC.Util.Session.API
+import Network.GRPC.Util.Session.Channel
+import Network.GRPC.Util.Thread
+
+{-------------------------------------------------------------------------------
+  Connection
+-------------------------------------------------------------------------------}
+
+-- | Connection to the server, as provided by @http2@
+data ConnectionToServer = ConnectionToServer {
+      sendRequest :: forall a.
+           Client.Request
+        -> (Client.Response -> IO a)
+        -> IO a
+    }
+
+{-------------------------------------------------------------------------------
+  Initiate request
+
+  Control flow and exception handling here is a little tricky.
+
+  * 'sendRequest' (coming from @http2@) will itself spawn a separate thread to
+    deal with sending inputs to the server (here, that is 'sendMessageLoop').
+
+  * As the last thing it does, 'sendRequest' will then call its continuation
+    argument in whatever thread it was called. Here, that continuation argument
+    is 'recvMessageLoop' (dealing with outputs sent by the server), which we
+    want to run in a separate thread also. We must therefore call 'sendRequest'
+    in a newly forked thread.
+
+    Note that 'sendRequest' will /only/ call its continuation once it receives
+    a response from the server. Some servers will not send the (start of the)
+    response until it has received (part of) the request, so it is important
+    that we do not wait on 'sendRequest' before we return control to the caller.
+
+  * We need to decide what to do with any exceptions that might arise in these
+    threads. One option might be to rethrow those exceptions to the parent
+    thread, but this presupposes a certain level of hygiene in client code: if
+    the client code spawns threads of their own, and shares the open RPC call
+    between them, then we rely on the client code to propagate the exception
+    further.
+
+    We therefore choose a different approach: we do not try to propagate the
+    exception at all, but instead ensure that any (current or future) call to
+    'read' or 'write' (or 'push') on the open 'Peer' will result in an exception
+    when the respective threads have died.
+
+  * This leaves one final problem to deal with: if setting up the request
+    /itself/ throws an exception, one or both threads might never get started.
+    To avoid client code blocking indefinitely we will therefore catch any
+    exceptions that arise during the call setup, and use them to 'cancel' both
+    threads (which will kill them or ensure they never get started).
+-------------------------------------------------------------------------------}
+
+-- | No trailers
+--
+-- We do not support outbound trailers in the client. This simplifies control
+-- flow: when the inbound stream closes (because the server terminates the RPC),
+-- we kill the outbound thread; by not supporting outbound trailers, we avoid
+-- that exception propagating to the trailers maker, which causes http2 to
+-- panic and shut down the entire connection.
+class NoTrailers sess where
+  -- | There is no interesting information in the trailers
+  noTrailers :: Proxy sess -> Trailers (Outbound sess)
+
+type CancelRequest = Maybe SomeException -> IO ()
+
+-- | Setup request channel
+--
+-- This initiates a new request.
+--
+setupRequestChannel :: forall sess.
+     (InitiateSession sess, NoTrailers sess)
+  => sess
+  -> ConnectionToServer
+  -> (InboundResult sess -> SomeException)
+  -- ^ We assume that when the server closes their outbound connection to us,
+  -- the entire conversation is over (i.e., the server cannot "half-close").
+  -> FlowStart (Outbound sess)
+  -> IO (Channel sess, CancelRequest)
+setupRequestChannel sess
+                    ConnectionToServer{sendRequest}
+                    terminateCall
+                    outboundStart
+                  = do
+    channel <- initChannel
+    let requestInfo = buildRequestInfo sess outboundStart
+
+    cancelRequestVar <- newEmptyMVar
+    let cancelRequest :: CancelRequest
+        cancelRequest e = join . (fmap ($ e)) $ readMVar cancelRequestVar
+
+    case outboundStart of
+      FlowStartRegular headers -> do
+        regular <- initFlowStateRegular headers
+        let req :: Client.Request
+            req = Client.requestStreamingIface
+                    (requestMethod  requestInfo)
+                    (requestPath    requestInfo)
+                    (requestHeaders requestInfo)
+                $ outboundThread channel cancelRequestVar regular
+        forkRequest channel req
+      FlowStartNoMessages trailers -> do
+        let state :: FlowState (Outbound sess)
+            state = FlowStateNoMessages trailers
+
+            req :: Client.Request
+            req = Client.requestNoBody
+                    (requestMethod  requestInfo)
+                    (requestPath    requestInfo)
+                    (requestHeaders requestInfo)
+        -- Can't cancel non-streaming request
+        putMVar cancelRequestVar $ \_ -> return ()
+        atomically $
+          modifyTVar (channelOutbound channel) $ \oldState ->
+            case oldState of
+              ThreadNotStarted debugId ->
+                ThreadDone debugId state
+              _otherwise ->
+                error "setupRequestChannel: expected thread state"
+        forkRequest channel req
+
+    return (channel, cancelRequest)
+  where
+    _ = addConstraint @(NoTrailers sess)
+
+    forkRequest :: Channel sess -> Client.Request -> IO ()
+    forkRequest channel req =
+        forkThread "grapesy:clientInbound" (channelInbound channel) $ \unmask markReady _debugId -> unmask $
+          linkOutboundToInbound (TerminateWhenInboundClosed terminateCall) channel $
+            sendRequest req $ \resp -> do
+              responseStatus <-
+                case Client.responseStatus resp of
+                  Just x  -> return x
+                  Nothing -> throwM PeerMissingPseudoHeaderStatus
+
+              -- Read the entire response body in case of a non-OK response
+              responseBody :: Maybe Lazy.ByteString <-
+                if HTTP.statusIsSuccessful responseStatus then
+                  return Nothing
+                else
+                  Just <$> readResponseBody resp
+
+              let responseHeaders =
+                    fromHeaderTable $ Client.responseHeaders resp
+                  responseInfo = ResponseInfo {
+                    responseHeaders
+                  , responseStatus
+                  , responseBody
+                  }
+
+              flowStart <- parseResponse sess responseInfo
+              case flowStart of
+                FlowStartRegular headers -> do
+                  state <- initFlowStateRegular headers
+                  stream  <- clientInputStream resp
+                  markReady $ FlowStateRegular state
+                  Right <$> recvMessageLoop sess state stream
+                FlowStartNoMessages trailers -> do
+                  markReady $ FlowStateNoMessages trailers
+                  return $ Left trailers
+
+    outboundThread ::
+         Channel sess
+      -> MVar CancelRequest
+      -> RegularFlowState (Outbound sess)
+      -> Client.OutBodyIface
+      -> IO ()
+    outboundThread channel cancelRequestVar regular iface =
+        threadBody "grapesy:clientOutbound" (channelOutbound channel) $ \markReady _debugId -> do
+          markReady $ FlowStateRegular regular
+          putMVar cancelRequestVar (Client.outBodyCancel iface)
+          stream <- clientOutputStream iface
+          -- Unlike the client inbound thread, or the inbound/outbound threads
+          -- of the server, http2 knows about this particular thread and may
+          -- raise an exception on it when the server dies. This results in a
+          -- race condition between that exception and the exception we get from
+          -- attempting to read the next message. No matter who wins that race,
+          -- we need to mark that as 'ServerDisconnected'.
+          --
+          -- We don't have this top-level exception handler in other places
+          -- because we don't want to mark /our own/ exceptions as
+          -- 'ServerDisconnected' or 'ClientDisconnected'.
+          wrapStreamExceptionsWith ServerDisconnected $
+            Client.outBodyUnmask iface $ sendMessageLoop sess regular stream
+
+{-------------------------------------------------------------------------------
+   Auxiliary http2
+-------------------------------------------------------------------------------}
+
+readResponseBody :: Client.Response -> IO Lazy.ByteString
+readResponseBody resp = go []
+  where
+    go :: [Strict.ByteString] -> IO Lazy.ByteString
+    go acc = do
+        chunk <- Client.getResponseBodyChunk resp
+        if BS.Strict.null chunk then
+          return $ BS.Lazy.fromChunks (reverse acc)
+        else
+          go (chunk:acc)
diff --git a/src/Network/GRPC/Util/Session/Server.hs b/src/Network/GRPC/Util/Session/Server.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/Session/Server.hs
@@ -0,0 +1,110 @@
+-- | Node with server role (i.e., its peer is a client)
+module Network.GRPC.Util.Session.Server (
+    ConnectionToClient(..)
+  , setupResponseChannel
+  ) where
+
+import Network.HTTP2.Server qualified as Server
+
+import Network.GRPC.Util.HTTP2.Stream
+import Network.GRPC.Util.Session.API
+import Network.GRPC.Util.Session.Channel
+import Network.GRPC.Util.Thread
+
+{-------------------------------------------------------------------------------
+  Connection
+-------------------------------------------------------------------------------}
+
+-- | Connection to the client, as provided by @http2@
+data ConnectionToClient = ConnectionToClient {
+      request :: Server.Request
+    , respond :: Server.Response -> IO ()
+    }
+
+{-------------------------------------------------------------------------------
+  Initiate response
+-------------------------------------------------------------------------------}
+
+-- | Setup response channel
+--
+-- Notes:
+--
+-- * The actual response will not immediately be initiated; see below.
+-- * We assume that the client is allowed to close their outbound stream to us.
+-- * 'setupResponseChannel' will not throw any exceptions.
+setupResponseChannel :: forall sess.
+     IsSession sess
+  => sess
+  -> ConnectionToClient
+  -> FlowStart (Inbound sess)
+  -> IO (FlowStart (Outbound sess), ResponseInfo)
+  -- ^ Construct headers for the initial response
+  --
+  -- This function is allowed to block. If it does, no response will not be
+  -- initiated until it returns.
+  --
+  -- If this function throws an exception, the response is never initiated;
+  -- this is treated the same was as when we fail to set up the outbound
+  -- connection due to a network failure.
+  -> IO (Channel sess)
+setupResponseChannel sess
+                     conn
+                     inboundStart
+                     startOutbound
+                   = do
+    channel <- initChannel
+
+    forkThread "grapesy:serverInbound" (channelInbound channel) $
+      \unmask markReady _debugId -> unmask $
+        linkOutboundToInbound ContinueWhenInboundClosed channel $ do
+          case inboundStart of
+            FlowStartRegular headers -> do
+              regular <- initFlowStateRegular headers
+              stream  <- serverInputStream (request conn)
+              markReady $ FlowStateRegular regular
+              Right <$> recvMessageLoop sess regular stream
+            FlowStartNoMessages trailers -> do
+              -- The client sent a request with an empty body
+              markReady $ FlowStateNoMessages trailers
+              return $ Left trailers
+              -- Thread terminates immediately
+
+    forkThread "grapesy:serverOutbound" (channelOutbound channel) $
+      \unmask markReady _debugId -> unmask $ do
+        (outboundStart, responseInfo) <- startOutbound
+        case outboundStart of
+          FlowStartRegular headers -> do
+            regular <- initFlowStateRegular headers
+            markReady $ FlowStateRegular regular
+            let resp :: Server.Response
+                resp = setResponseTrailers sess channel regular
+                     $ Server.responseStreamingIface
+                             (responseStatus  responseInfo)
+                             (responseHeaders responseInfo)
+                     $ \iface -> do
+                          stream <- serverOutputStream iface
+                          sendMessageLoop sess regular stream
+            respond conn resp
+          FlowStartNoMessages trailers -> do
+            markReady $ FlowStateNoMessages trailers
+            let resp :: Server.Response
+                resp = Server.responseNoBody
+                         (responseStatus  responseInfo)
+                         (responseHeaders responseInfo)
+            respond conn $ resp
+
+    return channel
+
+{-------------------------------------------------------------------------------
+  Auxiliary http2
+-------------------------------------------------------------------------------}
+
+setResponseTrailers ::
+     IsSession sess
+  => sess
+  -> Channel sess
+  -> RegularFlowState (Outbound sess)
+  -> Server.Response -> Server.Response
+setResponseTrailers sess channel regular resp =
+    Server.setResponseTrailersMaker resp $
+      outboundTrailersMaker sess channel regular
diff --git a/src/Network/GRPC/Util/TLS.hs b/src/Network/GRPC/Util/TLS.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/TLS.hs
@@ -0,0 +1,152 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | TLS utilities
+--
+-- Intended for qualified import.
+--
+-- > import Network.GRPC.Util.TLS (ServerValidation(..))
+-- > import Network.GRPC.Util.TLS qualified as Util.TLS
+module Network.GRPC.Util.TLS (
+    -- * Certificate store
+    CertificateStoreSpec(..)
+  , certStoreFromSystem
+  , certStoreFromCerts
+  , certStoreFromPath
+  , loadCertificateStore
+    -- * Configuration
+    -- ** Parameters
+  , ServerValidation(..)
+  , validationCAStore
+    -- ** Common to server and client
+  , SslKeyLog(..)
+  , keyLogger
+  ) where
+
+import Control.Exception
+import Data.Default
+import Data.X509 qualified as X509
+import Data.X509.CertificateStore qualified as X509
+import GHC.Generics (Generic)
+import System.Environment
+import System.X509 qualified as X509
+
+{-------------------------------------------------------------------------------
+  Certificate store
+-------------------------------------------------------------------------------}
+
+-- | Certificate store specification (for certificate validation)
+--
+-- This is a deep embedding, describing how to construct a certificate store.
+-- The actual construction happens in 'loadCertificateStore'.
+--
+-- There are three primitive ways to construct a 'CertificateStore':
+-- 'certStoreFromSystem', 'certStoreFromCerts', and 'certStoreFromPath'; please
+-- refer to the corresponding documentation.
+--
+-- You can also combine 'CertificateStore's through the 'Monoid' instance.
+data CertificateStoreSpec =
+    CertStoreEmpty
+  | CertStoreAppend CertificateStoreSpec CertificateStoreSpec
+  | CertStoreFromSystem
+  | CertStoreFromCerts [X509.SignedCertificate]
+  | CertStoreFromPath FilePath
+  deriving (Show)
+
+instance Semigroup CertificateStoreSpec where
+  (<>) = CertStoreAppend
+
+instance Monoid CertificateStoreSpec where
+  mempty = CertStoreEmpty
+
+-- | Use the system's certificate store
+certStoreFromSystem :: CertificateStoreSpec
+certStoreFromSystem = CertStoreFromSystem
+
+-- | Construct a certificate store with the given certificates
+certStoreFromCerts :: [X509.SignedCertificate] -> CertificateStoreSpec
+certStoreFromCerts = CertStoreFromCerts
+
+-- | Load certificate store from disk
+--
+-- The path may point to single file (multiple PEM formatted certificates
+-- concanated) or directory (one certificate per file, file names are hashes
+-- from certificate).
+certStoreFromPath :: FilePath -> CertificateStoreSpec
+certStoreFromPath = CertStoreFromPath
+
+-- | Load the certificate store
+loadCertificateStore :: CertificateStoreSpec -> IO X509.CertificateStore
+loadCertificateStore = go
+  where
+    go :: CertificateStoreSpec -> IO X509.CertificateStore
+    go  CertStoreEmpty         = return mempty
+    go (CertStoreAppend c1 c2) = (<>) <$> go c1 <*> go c2
+    go  CertStoreFromSystem    = X509.getSystemCertificateStore
+    go (CertStoreFromCerts cs) = return $ X509.makeCertificateStore cs
+    go (CertStoreFromPath fp)  = X509.readCertificateStore fp >>= \case
+                                   Nothing -> throwIO $ NoCertificatesAtPath fp
+                                   Just cs -> return cs
+
+data LoadCertificateStoreException =
+    NoCertificatesAtPath FilePath
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+{-------------------------------------------------------------------------------
+  Parameters
+-------------------------------------------------------------------------------}
+
+-- | How does the client want to validate the server?
+data ServerValidation =
+    -- | Validate the server
+    --
+    -- The 'CertificateStore' is a collection of trust anchors. If 'Nothing'
+    -- is specified, the system certificate store will be used.
+    ValidateServer CertificateStoreSpec
+
+    -- | Skip server validation
+    --
+    -- WARNING: This is dangerous. Although communication with the server will
+    -- still be encrypted, you cannot be sure that the server is who they claim
+    -- to be.
+  | NoServerValidation
+  deriving (Show)
+
+validationCAStore :: ServerValidation -> IO X509.CertificateStore
+validationCAStore (ValidateServer storeSpec) = loadCertificateStore storeSpec
+validationCAStore NoServerValidation         = return mempty
+
+{-------------------------------------------------------------------------------
+  Configuration common to server and client
+-------------------------------------------------------------------------------}
+
+-- | SSL key log file
+--
+-- An SSL key log file can be used by tools such as Wireshark to decode TLS
+-- network traffic. It is used for debugging only.
+data SslKeyLog =
+    -- | Don't use a key log file
+    SslKeyLogNone
+
+    -- | Use the specified path
+  | SslKeyLogPath FilePath
+
+    -- | Use the @SSLKEYLOGFILE@ environment variable to determine the key log
+    --
+    -- This is the default.
+  | SslKeyLogFromEnv
+  deriving stock (Show, Eq, Generic)
+
+instance Default SslKeyLog where
+  def = SslKeyLogFromEnv
+
+keyLogger :: SslKeyLog -> IO (String -> IO ())
+keyLogger sslKeyLog = do
+    keyLogFile <- case sslKeyLog of
+                    SslKeyLogNone    -> return $ Nothing
+                    SslKeyLogPath fp -> return $ Just fp
+                    SslKeyLogFromEnv -> lookupEnv "SSLKEYLOGFILE"
+    return $
+      case keyLogFile of
+        Nothing -> \_   -> return ()
+        Just fp -> \str -> appendFile fp (str ++ "\n")
diff --git a/src/Network/GRPC/Util/Thread.hs b/src/Network/GRPC/Util/Thread.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/GRPC/Util/Thread.hs
@@ -0,0 +1,379 @@
+-- | Monitored threads
+--
+-- Intended for unqualified import.
+module Network.GRPC.Util.Thread (
+    ThreadState(..)
+    -- * Creating threads
+  , ThreadBody
+  , newThreadState
+  , forkThread
+  , threadBody
+    -- * Thread debug ID
+  , DebugThreadId -- opaque
+  , threadDebugId
+    -- * Access thread state
+  , CancelResult(..)
+  , cancelThread
+  , ThreadState_(..)
+  , getThreadState_
+  , unlessAbnormallyTerminated
+  , withThreadInterface
+  , waitForNormalThreadTermination
+  , waitForNormalOrAbnormalThreadTermination
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.STM
+import Control.Exception
+import Control.Monad
+import Data.Void (Void, absurd)
+import Foreign (newStablePtr, freeStablePtr)
+import GHC.Stack
+import System.IO.Unsafe (unsafePerformIO)
+
+import Network.GRPC.Util.GHC
+
+{-------------------------------------------------------------------------------
+  Debug thread IDs
+-------------------------------------------------------------------------------}
+
+-- | Debug thread IDs
+--
+-- Unlike 'ThreadId', these do not correspond to a /running/ thread necessarily,
+-- but just enable us to distinguish one thread from another.
+data DebugThreadId = DebugThreadId {
+      debugThreadId        :: Word
+    , debugThreadCreatedAt :: CallStack
+    }
+  deriving stock (Show)
+
+nextDebugThreadId :: MVar Word
+{-# NOINLINE nextDebugThreadId #-}
+nextDebugThreadId = unsafePerformIO $ newMVar 0
+
+newDebugThreadId :: HasCallStack => IO DebugThreadId
+newDebugThreadId =
+    modifyMVar nextDebugThreadId $ \x -> do
+      let !nextId = succ x
+      return (
+          nextId
+        , DebugThreadId x (popIrrelevant callStack)
+        )
+  where
+    -- Pop off the call to 'newDebugThreadId'
+    --
+    -- We leave the call to 'newThreadState' on the stack because it is useful
+    -- to know where that was called /from/.
+    popIrrelevant :: CallStack -> CallStack
+    popIrrelevant = popCallStack
+
+{-------------------------------------------------------------------------------
+  State
+-------------------------------------------------------------------------------}
+
+-- | State of a thread with public interface of type @a@
+data ThreadState a =
+    -- | The thread has not yet started
+    --
+    -- If the thread is cancelled before it is started, then the exception will
+    -- be delivered once started. This is important, because it gives the thread
+    -- control over /when/ the exception is delivered (that is, when it chooses
+    -- to unmask async exceptions).
+    --
+    -- The alternative would be not to start the thread at all in this case, but
+    -- this takes away the control mentioned above; if the thread /needs/ to do
+    -- something before it can be killed, it must be given that chance. It may
+    -- /seem/ that this alternative would give the caller (which /created/ the
+    -- thread) more control, but actually that control is illusory, since the
+    -- timing of async exceptions is anyway unpredictable.
+    ThreadNotStarted DebugThreadId
+
+    -- | The externally visible thread interface is still being initialized
+  | ThreadInitializing DebugThreadId ThreadId
+
+    -- | Thread is ready
+  | ThreadRunning DebugThreadId ThreadId a
+
+    -- | Thread terminated normally
+    --
+    -- This still carries the thread interface: we may need it to query the
+    -- thread's final status, for example.
+  | ThreadDone DebugThreadId a
+
+    -- | Thread terminated with an exception
+  | ThreadException DebugThreadId SomeException
+  deriving stock (Show, Functor)
+
+threadDebugId :: ThreadState a -> DebugThreadId
+threadDebugId (ThreadNotStarted   debugId    ) = debugId
+threadDebugId (ThreadInitializing debugId _  ) = debugId
+threadDebugId (ThreadRunning      debugId _ _) = debugId
+threadDebugId (ThreadDone         debugId   _) = debugId
+threadDebugId (ThreadException    debugId   _) = debugId
+
+{-------------------------------------------------------------------------------
+  Creating threads
+-------------------------------------------------------------------------------}
+
+type ThreadBody a =
+          (forall x. IO x -> IO x) -- ^ Unmask exceptions
+       -> (a -> IO ())             -- ^ Mark thread ready
+       -> DebugThreadId            -- ^ Unique identifier for this thread
+       -> IO ()
+
+newThreadState :: HasCallStack => IO (TVar (ThreadState a))
+newThreadState = do
+    debugId <- newDebugThreadId
+    newTVarIO $ ThreadNotStarted debugId
+
+forkThread ::
+     HasCallStack
+  => ThreadLabel -> TVar (ThreadState a) -> ThreadBody a -> IO ()
+forkThread label state body =
+    void $ mask_ $ forkIOWithUnmask $ \unmask ->
+      threadBody label state $ body unmask
+
+-- | Wrap the thread body
+--
+-- This should be wrapped around the body of the thread, and should be called
+-- with exceptions masked.
+--
+-- This is intended for integration with existing libraries (such as @http2@),
+-- which might do the forking under the hood.
+--
+-- If the 'ThreadState' is anything other than 'ThreadNotStarted' on entry,
+-- this function terminates immediately.
+threadBody :: forall a.
+     HasCallStack
+  => ThreadLabel
+  -> TVar (ThreadState a)
+  -> ((a -> IO ()) -> DebugThreadId -> IO ())
+  -> IO ()
+threadBody label state body = do
+    labelThisThread label
+    threadId  <- myThreadId
+    initState <- atomically $ readTVar state
+
+    -- See discussion of 'ThreadNotStarted'
+    -- It's critical that async exceptions are masked at this point.
+    case initState of
+      ThreadNotStarted debugId -> do
+        atomically $ writeTVar state $ ThreadInitializing debugId threadId
+      ThreadException _ exception ->
+        -- We don't change the thread status here: 'cancelThread' offers the
+        -- guarantee that the thread status /will/ be in aborted or done state
+        -- on return. This means that /externally/ the thread will be
+        -- considered done, even if perhaps the thread must still execute some
+        -- actions before it can actually terminate.
+        void . forkIO $ throwTo threadId exception
+      _otherwise -> do
+        unexpected "initState" initState
+
+    let markReady :: a -> STM ()
+        markReady a = do
+            modifyTVar state $ \oldState ->
+              case oldState of
+                ThreadInitializing debugId _ ->
+                  ThreadRunning debugId threadId a
+                ThreadException _ _ ->
+                  oldState -- leave alone (see discussion above)
+                _otherwise ->
+                  unexpected "markReady" oldState
+
+        markDone :: Either SomeException () -> STM ()
+        markDone mDone = do
+            modifyTVar state $ \oldState ->
+              case (oldState, mDone) of
+                (ThreadRunning debugId _ iface, Right ()) ->
+                  ThreadDone debugId iface
+                (ThreadException{}, _) ->
+                  oldState -- record /first/ exception
+                (_, Left e) ->
+                  ThreadException (threadDebugId oldState) e
+                _otherwise ->
+                  unexpected "markDone" oldState
+
+    res <- try $ body (atomically . markReady) (threadDebugId initState)
+    atomically $ markDone res
+  where
+    unexpected :: String -> ThreadState a -> x
+    unexpected msg st = error $ concat [
+          msg
+        , ": unexpected "
+        , show (const () <$> st)
+        ]
+
+{-------------------------------------------------------------------------------
+  Stopping
+-------------------------------------------------------------------------------}
+
+-- | Result of cancelling a thread
+data CancelResult a =
+    -- | The thread terminated normally before we could cancel it
+    AlreadyTerminated a
+
+    -- | The thread terminated with an exception before we could cancel it
+  | AlreadyAborted SomeException
+
+    -- | We killed the thread with the specified exception
+  | Cancelled
+
+-- | Kill thread if it is running
+--
+-- * If the thread is in `ThreadNotStarted` state, we merely change the state to
+--   'ThreadException'. The thread may still be started (see discussion of
+--   'ThreadNotStarted'), but /externally/ the thread will be considered to have
+--   terminated.
+--
+-- * If the thread is initializing or running, we update the state to
+--   'ThreadException' and then throw the specified exception to the thread.
+--
+-- * If the thread is /already/ in 'ThreadException' state, or if the thread is
+--   in 'ThreadDone' state, we do nothing.
+--
+-- In all cases, the caller is guaranteed that the thread state has been updated
+-- even if perhaps the thread is still shutting down.
+cancelThread :: forall a.
+     TVar (ThreadState a)
+  -> SomeException
+  -> IO (CancelResult a)
+cancelThread state e = do
+    (result, mTid) <- atomically aux
+    forM_ mTid $ flip throwTo e
+    return result
+  where
+    aux :: STM (CancelResult a, Maybe ThreadId)
+    aux = do
+        st <- readTVar state
+        case st of
+          ThreadNotStarted debugId -> do
+            writeTVar state $ ThreadException debugId e
+            return (Cancelled, Nothing)
+          ThreadInitializing debugId threadId -> do
+            writeTVar state $ ThreadException debugId e
+            return (Cancelled, Just threadId)
+          ThreadRunning debugId threadId _ -> do
+            writeTVar state $ ThreadException debugId e
+            return (Cancelled, Just threadId)
+          ThreadException _debugId e' ->
+            return (AlreadyAborted e', Nothing)
+          ThreadDone _debugId a ->
+            return (AlreadyTerminated a, Nothing)
+
+{-------------------------------------------------------------------------------
+  Interacting with the thread
+-------------------------------------------------------------------------------}
+
+-- | Get the thread's interface
+--
+-- The behaviour of this 'getThreadInterface' depends on the thread state; it
+--
+-- * blocks if the thread in case of 'ThreadNotStarted' or 'ThreadInitializing'
+-- * throws 'ThreadInterfaceUnavailable' in case of 'ThreadException'.
+-- * returns the thread interface otherwise
+--
+-- We do /not/ distinguish between 'ThreadDone' and 'ThreadRunning' here, as
+-- doing so is inherently racy (we might return that the client is still
+-- running, and then it terminates before the calling code can do anything with
+-- that information).
+--
+-- NOTE: This turns off deadlock detection for the duration of the transaction.
+-- It should therefore only be used for transactions that can never be blocked
+-- indefinitely.
+--
+-- Usage note: in practice we use this to interact with threads that in turn
+-- interact with @http2@ (running 'sendMessageLoop' or 'recvMessageLoop').
+-- Although calls into @http2@ may in fact block indefinitely, we will /catch/
+-- those exception and treat them as network failures. If a @grapesy@ function
+-- ever throws a "blocked indefinitely" exception, this should be reported as a
+-- bug in @grapesy@.
+withThreadInterface :: forall a b.
+     TVar (ThreadState a)
+  -> (a -> STM b)
+  -> IO b
+withThreadInterface state k =
+    withoutDeadlockDetection . atomically $
+      k =<< getThreadInterface
+  where
+    getThreadInterface :: STM a
+    getThreadInterface = do
+        st <- readTVar state
+        case st of
+          ThreadNotStarted   _     -> retry
+          ThreadInitializing _ _   -> retry
+          ThreadRunning      _ _ a -> return a
+          ThreadDone         _   a -> return a
+          ThreadException    _   e -> throwSTM e
+
+-- | Wait for the thread to terminate normally
+--
+-- If the thread terminated with an exception, this rethrows that exception.
+waitForNormalThreadTermination :: TVar (ThreadState a) -> STM ()
+waitForNormalThreadTermination state =
+    waitUntilInitialized state >>= \case
+      ThreadNotYetRunning_ v -> absurd v
+      ThreadRunning_         -> retry
+      ThreadDone_            -> return ()
+      ThreadException_ e     -> throwSTM e
+
+-- | Wait for the thread to terminate normally or abnormally
+waitForNormalOrAbnormalThreadTermination ::
+     TVar (ThreadState a)
+  -> STM (Maybe SomeException)
+waitForNormalOrAbnormalThreadTermination state =
+    waitUntilInitialized state >>= \case
+      ThreadNotYetRunning_ v -> absurd v
+      ThreadRunning_         -> retry
+      ThreadDone_            -> return $ Nothing
+      ThreadException_ e     -> return $ Just e
+
+-- | Run the specified transaction, unless the thread terminated with an
+-- exception
+unlessAbnormallyTerminated ::
+     TVar (ThreadState a)
+  -> STM b
+  -> STM (Either SomeException b)
+unlessAbnormallyTerminated state f =
+    waitUntilInitialized state >>= \case
+      ThreadNotYetRunning_ v -> absurd v
+      ThreadRunning_         -> Right <$> f
+      ThreadDone_            -> Right <$> f
+      ThreadException_ e     -> return $ Left e
+
+waitUntilInitialized ::
+     TVar (ThreadState a)
+  -> STM (ThreadState_ Void)
+waitUntilInitialized state = getThreadState_ state retry
+
+-- | An abstraction of 'ThreadState' without the public interface type.
+data ThreadState_ notRunning =
+      ThreadNotYetRunning_ notRunning
+    | ThreadRunning_
+    | ThreadDone_
+    | ThreadException_ SomeException
+
+getThreadState_ ::
+     TVar (ThreadState a)
+  -> STM notRunning
+  -> STM (ThreadState_ notRunning)
+getThreadState_ state onNotRunning = do
+    st <- readTVar state
+    case st of
+      ThreadNotStarted   _     -> ThreadNotYetRunning_ <$> onNotRunning
+      ThreadInitializing _ _   -> ThreadNotYetRunning_ <$> onNotRunning
+      ThreadRunning      _ _ _ -> return $ ThreadRunning_
+      ThreadDone         _   _ -> return $ ThreadDone_
+      ThreadException    _   e -> return $ ThreadException_ e
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary
+-------------------------------------------------------------------------------}
+
+-- | Locally turn off deadlock detection
+--
+-- See also <https://well-typed.com/blog/2024/01/when-blocked-indefinitely-is-not-indefinite/>.
+withoutDeadlockDetection :: IO a -> IO a
+withoutDeadlockDetection k = do
+    threadId <- myThreadId
+    bracket (newStablePtr threadId) freeStablePtr $ \_ -> k
+
diff --git a/test-grapesy/Main.hs b/test-grapesy/Main.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Main.hs
@@ -0,0 +1,72 @@
+{-# LANGUAGE CPP #-}
+
+module Main (main) where
+
+import Control.Concurrent
+import Control.Exception
+import Data.Maybe (fromMaybe)
+import GHC.Conc (setUncaughtExceptionHandler)
+import System.IO
+import Test.Tasty
+
+#if MIN_VERSION_base(4,18,0)
+import GHC.Conc.Sync (threadLabel)
+#endif
+
+import Test.Prop.Dialogue                     qualified as Dialogue
+import Test.Regression.Issue102               qualified as Issue102
+import Test.Regression.Issue238               qualified as Issue238
+import Test.Sanity.Any                        qualified as Any
+import Test.Sanity.BrokenDeployments          qualified as BrokenDeployments
+import Test.Sanity.Compression                qualified as Compression
+import Test.Sanity.Disconnect                 qualified as Disconnect
+import Test.Sanity.EndOfStream                qualified as EndOfStream
+import Test.Sanity.Interop                    qualified as Interop
+import Test.Sanity.Reclamation                qualified as Reclamation
+import Test.Sanity.StreamingType.CustomFormat qualified as StreamingType.CustomFormat
+import Test.Sanity.StreamingType.NonStreaming qualified as StreamingType.NonStreaming
+
+main :: IO ()
+main = do
+    setUncaughtExceptionHandler uncaughtExceptionHandler
+
+    defaultMain $ testGroup "grapesy" [
+        testGroup "Sanity" [
+            Disconnect.tests
+          , EndOfStream.tests
+          , testGroup "StreamingType" [
+                StreamingType.NonStreaming.tests
+              , StreamingType.CustomFormat.tests
+              ]
+          , Compression.tests
+          , Any.tests
+          , Interop.tests
+          , Reclamation.tests
+          , BrokenDeployments.tests
+          ]
+      , testGroup "Regression" [
+            Issue102.tests
+          , Issue238.tests
+          ]
+      , testGroup "Prop" [
+            Dialogue.tests
+          ]
+      ]
+
+uncaughtExceptionHandler :: SomeException -> IO ()
+uncaughtExceptionHandler e = do
+    tid    <- myThreadId
+    mLabel :: Maybe String <-
+#if MIN_VERSION_base(4,18,0)
+      threadLabel tid
+#else
+      return $ Just "unknown label"
+#endif
+    hPutStrLn stderr $ concat [
+         "Uncaught exception in "
+      , show tid
+      , " ("
+      , fromMaybe "unlabelled" mLabel
+      , "): "
+      , displayException e
+      ]
diff --git a/test-grapesy/Test/Driver/ClientServer.hs b/test-grapesy/Test/Driver/ClientServer.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Driver/ClientServer.hs
@@ -0,0 +1,612 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Driver.ClientServer (
+    ClientServerTest(..)
+  , testClientServer
+  , propClientServer
+    -- * Configuration
+  , ClientServerConfig(..)
+  , ContentTypeOverride(..)
+  , TlsSetup(..)
+  , TlsFail(..)
+  , TlsOk(..)
+    -- ** Expected exceptions
+  , DeliberateException(..)
+  , isDeliberateException
+  , isClientDisconnected
+  , isInvalidRequestHeaders
+  , isGrpc415
+  , isGrpc400
+  , isGrpcCancelled
+  , isHandshakeFailed
+  , isServerUnsupportedCompression
+  , isClientUnsupportedCompression
+  , isHandlerTerminated
+    -- * Constructing clients
+  , TestClient
+  , simpleTestClient
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.Async
+import Control.Concurrent.STM
+import Control.Exception (throwIO)
+import Control.Monad
+import Control.Monad.Catch
+import Control.Monad.IO.Class
+import Data.Text qualified as Text
+import Network.HTTP2.Server qualified as HTTP2.Server
+import Network.Socket (PortNumber)
+import Network.TLS
+import Test.QuickCheck.Monadic qualified as QuickCheck
+import Test.Tasty.QuickCheck qualified as QuickCheck
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.Run qualified as Server
+import Test.Util.Exception
+
+import Paths_grapesy
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+-- | Run client server test, and check for expected failures
+testClientServer :: ClientServerTest -> IO ()
+testClientServer test =
+    runTestClientServer test
+
+-- | Turn client server test into property
+propClientServer :: IO ClientServerTest -> QuickCheck.Property
+propClientServer mkTest =
+    QuickCheck.monadicIO $ liftIO $ runTestClientServer =<< mkTest
+
+{-------------------------------------------------------------------------------
+  Configuration
+-------------------------------------------------------------------------------}
+
+data ClientServerConfig = ClientServerConfig {
+      -- | Port number used by the server
+      --
+      -- The client will query the server for its port; this makes it possible
+      -- to use @0@ for 'serverPort', so that the server picks a random
+      -- available port (this is the default).
+      serverPort :: PortNumber
+
+      -- | Compression algorithms supported by the client
+    , clientCompr :: Compr.Negotation
+
+      -- | Initial compression algorithm used by the client (if any)
+    , clientInitCompr :: Maybe Compr.Compression
+
+      -- | Compression algorithms supported the server
+    , serverCompr :: Compr.Negotation
+
+      -- | TLS setup (if using)
+    , useTLS :: Maybe TlsSetup
+
+      -- | Override content-type used by the client
+    , clientContentType :: ContentTypeOverride
+
+      -- | Override content-type used by the server
+    , serverContentType :: ContentTypeOverride
+
+      -- | Is this exception expected on the client?
+    , isExpectedClientException :: SomeException -> Bool
+
+      -- | Is this exception expected on the server?
+    , isExpectedServerException :: SomeException -> Bool
+    }
+
+data ContentTypeOverride =
+    -- | Use the default content-type
+    NoOverride
+
+    -- | Override with a valid alternative content-type
+    --
+    -- It is the responsibility of the test to make sure that this content-type
+    -- is in fact valid.
+  | ValidOverride Server.ContentType
+
+    -- | Override with an invalid (possibly missing) content-type
+  | InvalidOverride (Maybe Server.ContentType)
+
+instance Default ClientServerConfig where
+  def = ClientServerConfig {
+        serverPort                = 0
+      , clientCompr               = def
+      , clientInitCompr           = Nothing
+      , serverCompr               = def
+      , useTLS                    = Nothing
+      , clientContentType         = NoOverride
+      , serverContentType         = NoOverride
+      , isExpectedClientException = const False
+      , isExpectedServerException = const False
+      }
+
+{-------------------------------------------------------------------------------
+  Configuration: TLS
+-------------------------------------------------------------------------------}
+
+-- | TLS setup
+data TlsSetup = TlsOk TlsOk | TlsFail TlsFail
+
+-- | TLS setup that we expect to work
+data TlsOk =
+    -- | Configure the client so that the server's cert is a known root
+    --
+    -- This means that client can validate the server's cert, even though it is
+    -- self signed.
+    TlsOkCertAsRoot
+
+    -- | Configure the client to not validate the server's cert at all
+  | TlsOkSkipValidation
+
+-- | TLS setup that should result in an error
+data TlsFail =
+    -- | Don't take any special provisions in the client
+    --
+    -- This means that TLS validation will fail, since the server's cert is
+    -- self signed.
+    TlsFailValidation
+
+    -- | The server is not configured for TLS
+  | TlsFailUnsupported
+
+{-------------------------------------------------------------------------------
+  Expected exceptions
+
+  Ideally 'isExpectedServerException' and 'isExpectedClientException' should
+  have identical structure, illustrating that the exceptions are consistent
+  between the server API and the client API. This ideal isn't /quite/ reached:
+
+  * If a server handler throws an exception, the client is informed,
+    but the reverse is not true (the client simply disconnects).
+  * TLS exceptions are thrown to the client, but since no handler is ever run,
+    we don't see these exceptions server-side.
+-------------------------------------------------------------------------------}
+
+isDeliberateException :: SomeException -> Bool
+isDeliberateException e =
+    case fromException e of
+      Just DeliberateException{} -> True
+      _otherwise -> False
+
+isClientDisconnected :: SomeException -> Bool
+isClientDisconnected e =
+    case fromException e of
+      Just Server.ClientDisconnected{} -> True
+      _otherwise -> False
+
+isInvalidRequestHeaders :: SomeException -> Bool
+isInvalidRequestHeaders e =
+    case fromException e of
+      Just Server.CallSetupInvalidRequestHeaders{} -> True
+      _otherwise -> False
+
+isGrpc415 :: SomeException -> Bool
+isGrpc415 e =
+    case fromException e of
+      Just err' | Just msg <- grpcErrorMessage err' -> and [
+           grpcError err' == GrpcUnknown
+        , "415" `Text.isInfixOf` msg
+        ]
+      _otherwise -> False
+
+-- | Client choose unsupported compression
+--
+-- We respond with 400 Bad Request, which gets turned into GrpcInternal
+-- by 'classifyServerResponse'.
+isGrpc400 :: SomeException -> Bool
+isGrpc400 e =
+    case fromException e of
+      Just err' | Just msg <- grpcErrorMessage err' -> and [
+           grpcError err' == GrpcInternal
+        , "400" `Text.isInfixOf` msg
+        ]
+      _otherwise -> False
+
+isGrpcCancelled :: SomeException -> Bool
+isGrpcCancelled e =
+    case fromException e of
+      Just err'  -> grpcError err' == GrpcCancelled
+      _otherwise -> False
+
+isHandshakeFailed :: SomeException -> Bool
+isHandshakeFailed e =
+    case fromException e of
+      Just HandshakeFailed{} -> True
+      _otherwise -> False
+
+isServerUnsupportedCompression :: SomeException -> Bool
+isServerUnsupportedCompression e =
+    case fromException e of
+      Just Server.CallSetupUnsupportedCompression{} -> True
+      _otherwise -> False
+
+isClientUnsupportedCompression :: SomeException -> Bool
+isClientUnsupportedCompression e =
+    case fromException e of
+      Just Client.CallSetupUnsupportedCompression{} -> True
+      _otherwise -> False
+
+isHandlerTerminated :: SomeException -> Bool
+isHandlerTerminated e =
+    case fromException e of
+      Just Server.HandlerTerminated{} -> True
+      _otherwise -> False
+
+{-------------------------------------------------------------------------------
+  Test failures
+-------------------------------------------------------------------------------}
+
+-- | Test failure
+--
+-- When a test fails, we want to report the /first/ test failure; anything else
+-- might result in difficult to debug test cases, because that first test
+-- failure (first exception) might have all kinds of hard-to-predict
+-- consequences. This is somewhat tricky to achieve in a concurrent test
+-- setting; for example, if a server handler throws an exception, this exception
+-- will be raised in the client also, but we want a guarantee that we see the
+-- /handler/ exception, not the client one. We therefore wrap every client test
+-- and every handler in an exception wrapper which, after verifying that the
+-- exception was not expected, will write the exception (i.e., the test failure)
+-- to a test-wide 'FirstTestFailure'.
+--
+-- We then run the client in a separate thread, and wait for it to finish, /or/
+-- for a test failure to be reported. Doing these two checks independently means
+-- that if the client deadlocks because of some test failure somewhere else, we
+-- don't wait but instead report the test failure. In the client we throw
+-- 'TestFailure' if we do see a test failure; this helps in tests where we run
+-- multiple clients, as it signals that there is no point waiting for the other
+-- tests to terminate.
+--
+-- In a similar fashion we then wait for all handlers to terminate also or,
+-- again, for some test failure to be reported. (In this case the exception is
+-- not rethrown, because handlers should never throw at all.)
+--
+-- Finally, we check 'FirstTestFailure', report failure if it's set, or test
+-- success otherwise.
+--
+-- Note: if we have multiple independent clients, running independent tests,
+-- then we have multiple concurrent test failures, there /is/ no clear notion
+-- of a \"first\" test failure. However, in this case which exception we report
+-- as \"the\" test failure is not very important; by definition, in this case
+-- the one exception cannot be the /cause/ for the other exception (if it was,
+-- then one must happen /before/ the other).
+data FirstTestFailure =
+    FirstFailureInClient SomeException
+  | FirstFailureInServer SomeException
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+data TestFailure = TestFailure
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | Mark test failure
+--
+-- Does nothing if an earlier test failure has already been marked.
+markTestFailure :: TMVar FirstTestFailure -> FirstTestFailure  -> IO ()
+markTestFailure firstTestFailure err =
+    void $ atomically $ tryPutTMVar firstTestFailure err
+
+{-------------------------------------------------------------------------------
+  Server handler lock
+-------------------------------------------------------------------------------}
+
+-- |  Server handler lock
+--
+-- Handlers are initiated by calls from clients, but may outlive the connection
+-- to the client. Therefore, after we wait for the clients to terminate, we
+-- should also wait for all handlers to terminate.
+--
+-- See 'FirstTestFailure' for discussion of handler exceptions.
+newtype ServerHandlerLock = ServerHandlerLock (TVar Int)
+
+newServerHandlerLock :: IO ServerHandlerLock
+newServerHandlerLock = ServerHandlerLock <$> newTVarIO 0
+
+waitForHandlerTermination :: ServerHandlerLock -> STM ()
+waitForHandlerTermination (ServerHandlerLock lock) = do
+    activeHandlers <- readTVar lock
+    when (activeHandlers > 0) retry
+
+topLevelWithHandlerLock ::
+     ClientServerConfig
+  -> TMVar FirstTestFailure
+  -> ServerHandlerLock
+  -> Server.RequestHandler ()
+  -> Server.RequestHandler ()
+topLevelWithHandlerLock cfg
+                        firstTestFailure
+                        (ServerHandlerLock lock)
+                        handler
+                        unmask =
+    handler'
+  where
+    handler' ::
+         HTTP2.Server.Request
+      -> (HTTP2.Server.Response -> IO ())
+      -> IO ()
+    handler' req respond = do
+        markActive
+        result <- try $ handler unmask req respond
+        case result of
+          Right () ->
+            return ()
+          Left err | isExpectedServerException cfg err ->
+            return ()
+          Left err ->
+            markTestFailure firstTestFailure (FirstFailureInServer err)
+        markDone
+
+    markActive, markDone :: IO ()
+    markActive = atomically $ modifyTVar lock (\n -> n + 1)
+    markDone   = atomically $ modifyTVar lock (\n -> n - 1)
+
+{-------------------------------------------------------------------------------
+  Server
+-------------------------------------------------------------------------------}
+
+withTestServer ::
+     ClientServerConfig
+  -> TMVar FirstTestFailure
+  -> ServerHandlerLock
+  -> [Server.SomeRpcHandler IO]
+  -> (Server.RunningServer -> IO a)
+  -> IO a
+withTestServer cfg firstTestFailure handlerLock serverHandlers k = do
+    pubCert <- getDataFileName "grpc-demo.pem"
+    privKey <- getDataFileName "grpc-demo.key"
+
+    let serverConfig :: Server.ServerConfig
+        serverConfig =
+            case useTLS cfg of
+              Nothing -> Server.ServerConfig {
+                  serverInsecure = Just Server.InsecureConfig {
+                      insecureHost = Just "127.0.0.1"
+                    , insecurePort = serverPort cfg
+                    }
+                , serverSecure   = Nothing
+                }
+              Just (TlsFail TlsFailUnsupported) -> Server.ServerConfig {
+                  serverInsecure = Just Server.InsecureConfig {
+                      insecureHost = Just "127.0.0.1"
+                    , insecurePort = serverPort cfg
+                    }
+                , serverSecure   = Nothing
+                }
+              Just _tlsSetup -> Server.ServerConfig {
+                  serverInsecure = Nothing
+                , serverSecure   = Just $ Server.SecureConfig {
+                      secureHost       = "127.0.0.1"
+                    , securePort       = serverPort cfg
+                    , securePubCert    = pubCert
+                    , secureChainCerts = []
+                    , securePrivKey    = privKey
+                    , secureSslKeyLog  = SslKeyLogNone
+                    }
+                }
+
+        serverParams :: Server.ServerParams
+        serverParams = def {
+              Server.serverCompression =
+                serverCompr cfg
+            , Server.serverTopLevel =
+                topLevelWithHandlerLock cfg firstTestFailure handlerLock
+            , Server.serverContentType =
+                case serverContentType cfg of
+                  NoOverride            -> Just Server.ContentTypeDefault
+                  ValidOverride   ctype -> Just ctype
+                  InvalidOverride ctype -> ctype
+            , Server.serverVerifyHeaders =
+                -- We want to check that we can spot invalid headers
+                -- (and that we don't generate any in the client)
+                True
+            }
+
+    server <- Server.mkGrpcServer serverParams serverHandlers
+    Server.forkServer def serverConfig server k
+
+{-------------------------------------------------------------------------------
+  Client
+-------------------------------------------------------------------------------}
+
+type TestClient =
+          Client.ConnParams
+          -- ^ Test-appropriate connection parameters
+       -> Client.Server
+          -- ^ Test server to connect to
+       -> (IO () -> IO ())
+          -- ^ Delimit test scope
+          --
+          -- Any test failures will be limited to this scope. Important when
+          -- running multiple tests.
+       -> IO ()
+
+simpleTestClient :: (Client.Connection -> IO ()) -> TestClient
+simpleTestClient test params testServer delimitTestScope =
+    Client.withConnection params testServer $ \conn ->
+      delimitTestScope $ test conn
+
+runTestClient ::
+     ClientServerConfig
+  -> TMVar FirstTestFailure
+  -> PortNumber
+  -> TestClient
+  -> IO ()
+runTestClient cfg firstTestFailure port clientRun = do
+    pubCert <- getDataFileName "grpc-demo.pem"
+
+    let clientParams :: Client.ConnParams
+        clientParams = Client.ConnParams {
+              connCompression           = clientCompr cfg
+            , connInitCompression       = clientInitCompr cfg
+            , connDefaultTimeout        = Nothing
+            , connVerifyHeaders         = True
+            , connHTTP2Settings         = defaultHTTP2Settings
+
+              -- Content-type
+            , connContentType =
+                case clientContentType cfg of
+                  NoOverride            -> Just Server.ContentTypeDefault
+                  ValidOverride   ctype -> Just ctype
+                  InvalidOverride ctype -> ctype
+
+              -- We need a single reconnect, to enable wait-for-ready.
+              -- This avoids a race condition between the server starting first
+              -- and the client starting first.
+            , connReconnectPolicy =
+                  Client.ReconnectAfter def $ do
+                    threadDelay 100_000
+                    return Client.DontReconnect
+            }
+
+        clientServer :: Client.Server
+        clientServer =
+            case useTLS cfg of
+              Just tlsSetup ->
+                Client.ServerSecure
+                  ( case tlsSetup of
+                      TlsOk TlsOkCertAsRoot ->
+                        correctClientSetup
+                      TlsOk TlsOkSkipValidation ->
+                        Client.NoServerValidation
+                      TlsFail TlsFailValidation ->
+                        Client.ValidateServer mempty
+                      TlsFail TlsFailUnsupported ->
+                        correctClientSetup
+                  )
+                  -- We enable key logging in the client and disable it in the
+                  -- server. This avoids the client and server trying to write
+                  -- to the same file.
+                  SslKeyLogFromEnv
+                  clientAuthority
+
+              Nothing ->
+                Client.ServerInsecure
+                  clientAuthority
+          where
+            correctClientSetup :: Client.ServerValidation
+            correctClientSetup =
+                Client.ValidateServer $
+                  Client.certStoreFromPath pubCert
+
+        clientAuthority :: Client.Address
+        clientAuthority =
+            case useTLS cfg of
+              Just _tlsSetup -> Client.Address {
+                  addressHost      = "127.0.0.1"
+                , addressPort      = port
+                , addressAuthority = Nothing
+                }
+
+              Nothing -> Client.Address {
+                  addressHost      = "127.0.0.1"
+                , addressPort      = port
+                , addressAuthority = Nothing
+                }
+
+        delimitTestScope :: IO () -> IO ()
+        delimitTestScope test = do
+            result :: Either SomeException () <- try test
+            case result of
+              Right () ->
+                return ()
+              Left err | isExpectedClientException cfg err ->
+                return ()
+              Left err -> do
+                markTestFailure firstTestFailure (FirstFailureInClient err)
+                throwIO TestFailure
+
+    clientRun clientParams clientServer delimitTestScope
+
+{-------------------------------------------------------------------------------
+  Main entry point: run server and client together
+-------------------------------------------------------------------------------}
+
+data ClientServerTest = ClientServerTest {
+      config :: ClientServerConfig
+    , client :: TestClient
+    , server :: [Server.SomeRpcHandler IO]
+    }
+
+runTestClientServer :: ClientServerTest -> IO ()
+runTestClientServer (ClientServerTest cfg clientRun handlers) = do
+    -- Setup client and server
+    firstTestFailure  <- newEmptyTMVarIO
+    serverHandlerLock <- newServerHandlerLock
+
+    let server :: (Server.RunningServer -> IO a) -> IO a
+        server = withTestServer cfg firstTestFailure serverHandlerLock handlers
+
+    let client :: PortNumber -> IO ()
+        client port = runTestClient cfg firstTestFailure port clientRun
+
+    -- Run the test
+    server $ \runningServer -> do
+      port <- Server.getServerPort runningServer
+
+      withAsync (client port) $ \clientThread -> do
+        let failure = waitForFailure runningServer clientThread firstTestFailure
+
+        -- Wait for client to terminate (or test failure)
+        -- (the 'orElse' is only relevant if a /handler/ throws an exception)
+        atomically $
+            (void $ waitCatchSTM clientThread)
+          `orElse`
+            (void failure)
+
+        -- Wait for handlers to terminate (or test failure)
+        -- (Note that the server /itself/ normally never terminates)
+        atomically $
+            (waitForHandlerTermination serverHandlerLock)
+          `orElse`
+            (void failure)
+
+        atomically $ do
+            (failure >>= throwSTM)
+          `orElse`
+            return ()
+
+-- | Wait for test failure (retries/blocks if tests have not yet failed)
+--
+-- /If/ a first test failure has been reported, we prefer to report it. It is
+-- however possible that either the server or the client threw an exception
+-- /without/ the 'FirstTestFailure' being populated; for example, this can
+-- happen if the server fails to start at all, or if there is a bug in the test
+-- framework itself.
+waitForFailure ::
+     Server.RunningServer    -- ^ Server
+  -> Async ()                -- ^ Client
+  -> TMVar FirstTestFailure  -- ^ First test failure
+  -> STM FirstTestFailure
+waitForFailure server client firstTestFailure =
+      (readTMVar firstTestFailure)
+    `orElse`
+      (Server.waitServerSTM server >>= serverAux)
+    `orElse`
+      (waitCatchSTM client >>= clientAux)
+  where
+    serverAux ::
+         ( Either SomeException ()
+         , Either SomeException ()
+         )
+      -> STM FirstTestFailure
+    serverAux (Left e, _) = return (FirstFailureInServer e)
+    serverAux (_, Left e) = return (FirstFailureInServer e)
+    serverAux _otherwise  = throwSTM $ UnexpectedServerTermination
+
+    clientAux :: Either SomeException () -> STM FirstTestFailure
+    clientAux (Left e)   = return (FirstFailureInClient e)
+    clientAux _otherwise = retry
+
+-- | We don't expect the server to shutdown until we kill it
+data UnexpectedServerTermination = UnexpectedServerTermination
+  deriving stock (Show)
+  deriving anyclass (Exception)
diff --git a/test-grapesy/Test/Driver/Dialogue.hs b/test-grapesy/Test/Driver/Dialogue.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Driver/Dialogue.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Driver.Dialogue (
+    module X
+  ) where
+
+import Test.Driver.Dialogue.Definition as X
+import Test.Driver.Dialogue.Execution  as X
+import Test.Driver.Dialogue.Generation as X
diff --git a/test-grapesy/Test/Driver/Dialogue/Definition.hs b/test-grapesy/Test/Driver/Dialogue/Definition.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Driver/Dialogue/Definition.hs
@@ -0,0 +1,174 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Driver.Dialogue.Definition (
+    -- * Local
+    LocalStep(..)
+  , Action(..)
+  , ClientAction
+  , ServerAction
+  , RPC(..)
+  , TestMetadata(..)
+    -- * Bird's-eye view
+  , GlobalSteps(..)
+  , LocalSteps(..)
+    -- * Exceptions
+    -- ** User exceptions
+  , SomeClientException(..)
+  , SomeServerException(..)
+  , ExceptionId
+    -- * Utility
+  , hasEarlyTermination
+  ) where
+
+import Control.Monad.State (StateT, execStateT, modify)
+import Data.Bifunctor
+import Data.ByteString qualified as Strict (ByteString)
+
+import Network.GRPC.Common
+
+import Test.Driver.Dialogue.TestClock qualified as TestClock
+import Test.Util.Exception
+import Control.Monad.Catch
+import GHC.Show (appPrec1, showCommaSpace)
+
+{-------------------------------------------------------------------------------
+  Single RPC
+-------------------------------------------------------------------------------}
+
+data LocalStep =
+    ClientAction ClientAction
+  | ServerAction ServerAction
+  deriving stock (Show, Eq)
+
+type ClientAction = Action (TestMetadata, RPC) NoMetadata   SomeClientException
+type ServerAction = Action TestMetadata        TestMetadata SomeServerException
+
+data Action a b e =
+    -- | Initiate request and response
+    --
+    -- When the client initiates a request, they can specify a timeout, initial
+    -- metadata for the request, as well as which endpoint to connect to. This
+    -- must happen before anything else.
+    --
+    -- On the server side an explicit 'Initiate' is not required; if not
+    -- present, there will be an implicit one, with empty metadata, on the first
+    -- 'Send'.
+    Initiate a
+
+    -- | Send a message to the peer
+  | Send (StreamElem b Int)
+
+    -- | Early termination (cleanly or with an exception)
+  | Terminate (Maybe e)
+  deriving stock (Show, Eq)
+
+data RPC = RPC1 | RPC2 | RPC3
+  deriving stock (Show, Eq)
+
+{-------------------------------------------------------------------------------
+  Metadata
+-------------------------------------------------------------------------------}
+
+data TestMetadata = TestMetadata {
+      metadataAsc1 :: Maybe Strict.ByteString
+    , metadataAsc2 :: Maybe Strict.ByteString
+    , metadataBin3 :: Maybe Strict.ByteString
+    , metadataBin4 :: Maybe Strict.ByteString
+    }
+  deriving (Eq)
+
+-- | Hand-written 'Show' instance which shows @def :: TestMetadata@ as @def@
+--
+-- This is by far the most common value that shows up in test failures, so this
+-- improves readability.
+instance Show TestMetadata where
+  showsPrec _ (TestMetadata Nothing Nothing Nothing Nothing) = showString "def"
+  showsPrec p (TestMetadata asc1 asc2 bin3 bin4) = showParen (p >= appPrec1) $
+        showString "TestMetadata {"
+      . showString "metadataAsc1 = "
+      . showVal asc1
+      . showCommaSpace
+      . showString "metadataAsc2 = "
+      . showVal asc2
+      . showCommaSpace
+      . showString "metadataBin3 = "
+      . showVal bin3
+      . showCommaSpace
+      . showString "metadataBin4 = "
+      . showVal bin4
+      . showString "}"
+    where
+      showVal Nothing  = showString "def"
+      showVal (Just x) = showsPrec 0 (Just x)
+
+instance Default TestMetadata where
+  def = TestMetadata {
+        metadataAsc1 = Nothing
+      , metadataAsc2 = Nothing
+      , metadataBin3 = Nothing
+      , metadataBin4 = Nothing
+      }
+
+instance BuildMetadata TestMetadata where
+  buildMetadata md = concat [
+        [ CustomMetadata "md1"     x | Just x <- [metadataAsc1 md]]
+      , [ CustomMetadata "md2"     x | Just x <- [metadataAsc2 md]]
+      , [ CustomMetadata "md3-bin" x | Just x <- [metadataBin3 md]]
+      , [ CustomMetadata "md4-bin" x | Just x <- [metadataBin4 md]]
+      ]
+
+instance ParseMetadata TestMetadata where
+  parseMetadata = flip execStateT def . mapM go
+    where
+      go :: MonadThrow m => CustomMetadata -> StateT TestMetadata m ()
+      go md
+        | customMetadataName md == "md1"
+        = modify $ \x -> x{metadataAsc1 = Just $ customMetadataValue md}
+
+        | customMetadataName md == "md2"
+        = modify $ \x -> x{metadataAsc2 = Just $ customMetadataValue md}
+
+        | customMetadataName md == "md3-bin"
+        = modify $ \x -> x{metadataBin3 = Just $ customMetadataValue md}
+
+        | customMetadataName md == "md4-bin"
+        = modify $ \x -> x{metadataBin4 = Just $ customMetadataValue md}
+
+        | otherwise
+        = throwM $ UnexpectedMetadata [md]
+
+instance StaticMetadata TestMetadata where
+  metadataHeaderNames _ = ["md1", "md2", "md3-bin", "md4-bin"]
+
+{-------------------------------------------------------------------------------
+  Many RPCs (bird's-eye view)
+-------------------------------------------------------------------------------}
+
+newtype LocalSteps = LocalSteps {
+      getLocalSteps :: [(TestClock.Tick, LocalStep)]
+    }
+  deriving stock (Show)
+
+newtype GlobalSteps = GlobalSteps {
+      getGlobalSteps :: [LocalSteps]
+    }
+  deriving stock (Show)
+
+{-------------------------------------------------------------------------------
+  Utility
+-------------------------------------------------------------------------------}
+
+-- | Check if the client or server terminate early
+hasEarlyTermination :: GlobalSteps -> (Bool, Bool)
+hasEarlyTermination =
+      bimap or or
+    . unzip
+    . map (isEarlyTermination . snd)
+    . concatMap getLocalSteps
+    . getGlobalSteps
+  where
+    isEarlyTermination :: LocalStep -> (Bool, Bool)
+    isEarlyTermination (ClientAction (Terminate _)) = (True, False)
+    isEarlyTermination (ServerAction (Terminate _)) = (False, True)
+    isEarlyTermination _                            = (False, False)
+
diff --git a/test-grapesy/Test/Driver/Dialogue/Execution.hs b/test-grapesy/Test/Driver/Dialogue/Execution.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Driver/Dialogue/Execution.hs
@@ -0,0 +1,547 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Test.Driver.Dialogue.Execution (
+    ConnUsage(..)
+  , execGlobalSteps
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.Async
+import Control.Monad
+import Control.Monad.Catch
+import Control.Monad.State
+import Data.List (sortBy)
+import Data.Ord (comparing)
+import Data.Proxy
+import Data.Text qualified as Text
+import GHC.Stack
+import GHC.TypeLits
+import Network.HTTP2.Client qualified as HTTP2.Client
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.Binary qualified as Client.Binary
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.Binary qualified as Server.Binary
+
+import Test.Driver.ClientServer
+import Test.Driver.Dialogue.Definition
+import Test.Driver.Dialogue.TestClock (TestClock)
+import Test.Driver.Dialogue.TestClock qualified as TestClock
+import Test.Util
+
+{-------------------------------------------------------------------------------
+  Endpoints
+-------------------------------------------------------------------------------}
+
+type TestProtocol meth = RawRpc "dialogue" meth
+
+type instance RequestMetadata          (TestProtocol meth) = TestMetadata
+type instance ResponseInitialMetadata  (TestProtocol meth) = TestMetadata
+type instance ResponseTrailingMetadata (TestProtocol meth) = TestMetadata
+
+type TestRpc1 = TestProtocol "test1"
+type TestRpc2 = TestProtocol "test2"
+type TestRpc3 = TestProtocol "test3"
+
+withClientProxy ::
+     RPC
+  -> (forall meth.
+          SupportsClientRpc (TestProtocol meth)
+       => Proxy meth
+       -> a)
+  -> a
+withClientProxy RPC1 k = k (Proxy @"test1")
+withClientProxy RPC2 k = k (Proxy @"test2")
+withClientProxy RPC3 k = k (Proxy @"test3")
+
+{-------------------------------------------------------------------------------
+  Test failures
+-------------------------------------------------------------------------------}
+
+data TestFailure = TestFailure CallStack Failure
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+data Failure =
+    -- | Thrown by the server when an unexpected new RPC is initiated
+    UnexpectedRequest
+
+    -- | Received an unexpected value
+  | Unexpected ReceivedUnexpected
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+data ReceivedUnexpected = forall a b. (Show a, Show b) => ReceivedUnexpected {
+      received   :: a -- The value we received
+    , expectInfo :: b -- Some additional info that can help debug the issue
+    }
+
+deriving stock instance Show ReceivedUnexpected
+
+expect ::
+     (MonadThrow m, Show a, Show info, HasCallStack)
+  => info
+  -> (a -> Bool)  -- ^ Expected
+  -> a            -- ^ Actually received
+  -> m ()
+expect expectInfo isExpected received
+  | isExpected received
+  = return ()
+
+  | otherwise
+  = throwM $ TestFailure callStack $
+      Unexpected $ ReceivedUnexpected{
+          received
+        , expectInfo
+        }
+
+{-------------------------------------------------------------------------------
+  Timeouts
+-------------------------------------------------------------------------------}
+
+-- | Timeout for waiting for the test clock
+timeoutClock :: Int
+timeoutClock = 5
+
+-- | Timeout for waiting for the green liht
+timeoutGreenLight :: Int
+timeoutGreenLight = 5
+
+-- | Timeout for executing all the actions in a client or handler
+timeoutLocal :: Int
+timeoutLocal = 20
+
+-- | Timeout for waiting for a call to fail
+timeoutFailure :: Int
+timeoutFailure = 5
+
+-- | Timeout for receiving a stream element
+timeoutReceive :: Int
+timeoutReceive = 5
+
+{-------------------------------------------------------------------------------
+  Health
+-------------------------------------------------------------------------------}
+
+-- | Health of the peer (server/client)
+--
+-- When the client is expecting a response from the server, it needs to know the
+-- "health" of the server, that is, is the server still alive, or did it fail
+-- with some kind exception? The same is true for the server when it expects a
+-- response from the client. Therefore, the client interpretation keeps track of
+-- the health of the server, and vice versa.
+data PeerHealth =
+    PeerAlive
+
+    -- | Peer terminated
+    --
+    -- The peer might have thrown a deliberate exception, or simply terminated
+    -- early without properly closing the connection.
+  | PeerTerminated (Maybe DeliberateException)
+  deriving stock (Show)
+
+ifPeerAlive :: PeerHealth -> PeerHealth -> PeerHealth
+ifPeerAlive PeerAlive             = id
+ifPeerAlive (PeerTerminated mErr) = const (PeerTerminated mErr)
+
+{-------------------------------------------------------------------------------
+  Client-side interpretation
+-------------------------------------------------------------------------------}
+
+clientLocal ::
+     HasCallStack
+  => TestClock
+  -> Client.Call (TestProtocol meth)
+  -> LocalSteps
+  -> IO ()
+clientLocal clock call = \(LocalSteps steps) ->
+    evalStateT (go steps) PeerAlive
+  where
+    go :: [(TestClock.Tick, LocalStep)] -> StateT PeerHealth IO ()
+    go []                     = return ()
+    go ((tick, step) : steps) = do
+        case step of
+          ClientAction action -> do
+            within timeoutClock step $ TestClock.waitForTick clock tick
+            continue <- clientAct tick action `finally` TestClock.advance clock
+            when continue $ go steps
+          ServerAction action -> do
+            TestClock.giveGreenLight clock tick
+            reactToServer tick action
+            go steps
+
+    -- Client action
+    --
+    -- Returns 'True' if we should continue executing more actions, or
+    -- exit (thereby closing the RPC call)
+    clientAct :: TestClock.Tick -> ClientAction -> StateT PeerHealth IO Bool
+    clientAct tick action =
+        case action of
+          Initiate _ ->
+            error "clientLocal: unexpected Initiate"
+          Send x -> do
+            peerHealth <- get
+            case peerHealth of
+              PeerAlive        -> Client.Binary.sendInput call x
+              PeerTerminated _ -> liftIO $ waitForServerDisconnect
+            return True
+          Terminate mException -> do
+            -- See discussion in 'TestClock' for why we need to wait here
+            peerHealth <- get
+            case peerHealth of
+              PeerTerminated _ -> return ()
+              PeerAlive        -> within timeoutGreenLight action $
+                                    TestClock.waitForGreenLight clock tick
+            case mException of
+              Just ex -> throwM $ DeliberateException ex
+              Nothing -> return False
+
+    reactToServer :: TestClock.Tick -> ServerAction -> StateT PeerHealth IO ()
+    reactToServer tick action =
+        case action of
+          Initiate expectedMetadata -> liftIO $ do
+            receivedMetadata <- within timeoutReceive action $
+                                  Client.recvResponseInitialMetadata call
+            expect (tick, action) (== expectedMetadata) receivedMetadata
+          Send (FinalElem a b) -> do
+            -- On the client side, when the server sends the final message, we
+            -- will receive that final message in one HTTP data frame, and then
+            -- the trailers in another. This means that when we get the message,
+            -- we do not yet know if this is in fact the last.
+            -- (This is different on the server side, because gRPC does not
+            -- support trailers on the client side.)
+            reactToServer tick $ Send (StreamElem a)
+            reactToServer tick $ Send (NoMoreElems b)
+          Send expectedElem -> do
+            mOut <- try $ within timeoutReceive action $
+                      Client.Binary.recvOutput call
+            expect (tick, action) (isExpectedElem expectedElem) mOut
+          Terminate mErr -> do
+            mOut <- try $ within timeoutReceive action $
+                      Client.Binary.recvOutput call
+            let mErr'       = DeliberateException <$> mErr
+                expectation = isGrpcException mErr'
+            expect (tick, action) expectation mOut
+            modify $ ifPeerAlive $ PeerTerminated mErr'
+
+    -- Wait for the server disconnect to become visible
+    --
+    -- In principle we could check if we can still /receive/ messages from the
+    -- server to see if we can /send/ messages to the server: gRPC does not
+    -- allow the server to half-close the connection (only the client). For
+    -- consistency, however, we simply wait until sending fails.
+    --
+    -- See 'waitForClientDisconnect' for additional discussion.
+    waitForServerDisconnect :: IO ()
+    waitForServerDisconnect =
+        within timeoutFailure () $ loop
+      where
+        loop :: IO ()
+        -- We only do this when we know the client has terminated, so the
+        -- /type/ of the message we send here as a probe does not matter.
+        loop = do
+            mFailed <- try $ Client.Binary.sendNextInput call ()
+            case mFailed of
+              Left (_ :: GrpcException) ->
+                return ()
+              Right () -> do
+                threadDelay 10_000
+                loop
+
+    isExpectedElem ::
+         StreamElem TestMetadata Int
+      -> Either GrpcException (StreamElem TestMetadata Int)
+      -> Bool
+    isExpectedElem _ (Left _) = False
+    isExpectedElem expectedElem (Right streamElem) = expectedElem == streamElem
+
+    isGrpcException ::
+         Maybe DeliberateException
+      -> Either GrpcException (StreamElem TestMetadata Int)
+      -> Bool
+    isGrpcException mErr (Left err) = and [
+          grpcError        err == GrpcUnknown
+        , grpcErrorMessage err == Just (mconcat [
+              "Server-side exception: "
+            , case mErr of
+                Nothing   -> "HandlerTerminated"
+                Just err' -> Text.pack $ show err'
+            ])
+        ]
+    isGrpcException _ (Right _) = False
+
+clientGlobal ::
+     TestClock
+  -> ConnUsage
+     -- ^ Use new connection for each RPC call?
+     --
+     -- Multiple RPC calls on a single connection /ought/ to be independent of
+     -- each other. Something going wrong on one should not affect another.
+  -> GlobalSteps
+  -> TestClient
+clientGlobal clock connUsage global connParams testServer delimitTestScope =
+    case connUsage of
+      ConnPerRPC ->                  go Nothing  [] (getGlobalSteps global)
+      SharedConn -> withConn $ \c -> go (Just c) [] (getGlobalSteps global)
+  where
+    withConn :: (Client.Connection -> IO ()) -> IO ()
+    withConn = Client.withConnection connParams testServer
+
+    go :: Maybe Client.Connection -> [Async ()] -> [LocalSteps] -> IO ()
+    go _ threads [] = do
+        -- Wait for all threads to finish
+        --
+        -- This also ensures that if any of these threads threw an exception,
+        -- that is now rethrown here in the main test. This will also cause us
+        -- to leave the scope of all enclosing calls to @withAsync@, thereby
+        -- cancelling all other concurrent threads.
+        --
+        -- (It is therefore important that we catch any /excepted/ exceptions
+        -- locally; this is done by the call to @delimitTestScope@.)
+        mapM_ wait threads
+    go mConn threads (c:cs) =
+        withAsync (within timeoutLocal c $ runLocalSteps mConn c) $ \thread ->
+          go mConn (thread:threads) cs
+
+    runLocalSteps :: Maybe Client.Connection -> LocalSteps -> IO ()
+    runLocalSteps mConn (LocalSteps steps) = delimitTestScope $ do
+        case steps of
+          (tick, ClientAction (Initiate (metadata, rpc))) : steps' -> do
+            TestClock.waitForTick clock tick
+
+            withClientProxy rpc $ startCall mConn metadata steps'
+          _otherwise ->
+            error $ "clientGlobal: expected Initiate, got " ++ show steps
+
+    startCall :: forall (meth :: Symbol).
+         SupportsClientRpc (TestProtocol meth)
+      => Maybe Client.Connection
+      -> TestMetadata
+      -> [(TestClock.Tick, LocalStep)]
+      -> Proxy meth -> IO ()
+    startCall mConn metadata steps' _ = do
+        (case mConn of
+            Just conn -> ($ conn)
+            Nothing   -> withConn) $ \conn ->
+          Client.withRPC conn params (Proxy @(TestProtocol meth)) $ \call -> do
+            -- We wait for the /server/ to advance the test clock (so that
+            -- we are sure the next step doesn't happen until the
+            -- connection is established).
+            --
+            -- NOTE: We could instead wait for the server to send the
+            -- initial metadata; this too would provide evidence that the
+            -- connection has been established. However, doing so
+            -- precludes a class of correct behaviour: the server might
+            -- not respond with that initial metadata until the client has
+            -- sent some messages.
+            clientLocal clock call (LocalSteps steps')
+     where
+       -- Timeouts are outside the scope of these tests: it's too finicky
+       -- to relate timeouts (in seconds) to specific test execution. We
+       -- do test exceptions in general here; the specific exception
+       -- arising from a timeout we test elsewhere.
+       params = def {
+           Client.callRequestMetadata = metadata
+         }
+
+{-------------------------------------------------------------------------------
+  Server-side interpretation
+
+  The server-side is slightly different, since the infrastructure spawns
+  threads on our behalf (one for each incoming RPC).
+-------------------------------------------------------------------------------}
+
+serverLocal ::
+     TestClock
+  -> Server.Call (TestProtocol meth)
+  -> LocalSteps -> IO ()
+serverLocal clock call = \(LocalSteps steps) -> do
+    evalStateT (go steps) PeerAlive
+  where
+    go :: [(TestClock.Tick, LocalStep)] -> StateT PeerHealth IO ()
+    go []                     = return ()
+    go ((tick, step) : steps) =
+        case step of
+          ServerAction action -> do
+            within timeoutClock step $ TestClock.waitForTick clock tick
+            continue <- serverAct tick action `finally` TestClock.advance clock
+            when continue $ go steps
+          ClientAction action -> do
+            TestClock.giveGreenLight clock tick
+            reactToClient tick action
+            go steps
+
+    -- Server action
+    --
+    -- Returns 'True' if we should continue executing the other actions, or
+    -- terminate (thereby terminating the handler)
+    serverAct :: TestClock.Tick -> ServerAction -> StateT PeerHealth IO Bool
+    serverAct tick action =
+        case action of
+          Initiate metadata -> liftIO $ do
+            Server.setResponseInitialMetadata call metadata
+            Server.initiateResponse call
+            return True
+          Send x -> do
+            peerHealth <- get
+            case peerHealth of
+              PeerAlive        -> liftIO $ Server.Binary.sendOutput call x
+              PeerTerminated _ -> liftIO $ waitForClientDisconnect
+            return True
+          Terminate mException -> do
+            peerHealth <- get
+            case peerHealth of
+              PeerTerminated _ -> return ()
+              PeerAlive        -> within timeoutGreenLight action $
+                                    TestClock.waitForGreenLight clock tick
+            case mException of
+              Just ex -> throwM $ DeliberateException ex
+              Nothing -> return False
+
+    reactToClient :: TestClock.Tick -> ClientAction -> StateT PeerHealth IO ()
+    reactToClient tick action =
+        case action of
+          Initiate _ ->
+            error "serverLocal: unexpected ClientInitiateRequest"
+          Send expectedElem -> do
+            mInp <- liftIO $ try $ within timeoutReceive action $
+                      Server.Binary.recvInput call
+            expect (tick, action) (isExpectedElem expectedElem) mInp
+          Terminate mErr -> do
+            mInp <- liftIO $ try $ within timeoutReceive action $
+                      Server.Binary.recvInput call
+            expect (tick, action) isExpectedDisconnect mInp
+            modify $ ifPeerAlive $ PeerTerminated $ DeliberateException <$> mErr
+
+    -- Wait for the client disconnect to become visible
+    --
+    -- The only way to know that we cannot send messages anymore to a client
+    -- that has terminated is by trying. Although the /receiving/ thread may
+    -- terminate more-or-less immediately, this does not necessarily indicate
+    -- any kind of failure: the client may simply have put the call in
+    -- half-closed mode.
+    waitForClientDisconnect :: IO ()
+    waitForClientDisconnect =
+        within timeoutFailure () $ loop
+      where
+        loop :: IO ()
+        -- We only do this when we know the client has terminated, so the
+        -- /type/ of the message we send here as a probe does not matter.
+        loop = do
+            mFailed <- try $ Server.Binary.sendNextOutput call ()
+            case mFailed of
+              Left (_ :: Server.ClientDisconnected) ->
+                return ()
+              Right () -> do
+                threadDelay 10_000
+                loop
+
+    isExpectedElem ::
+         StreamElem NoMetadata Int
+      -> Either Server.ClientDisconnected (StreamElem NoMetadata Int)
+      -> Bool
+    isExpectedElem _ (Left _) = False
+    isExpectedElem expectedElem (Right streamElem) = expectedElem == streamElem
+
+    isExpectedDisconnect ::
+         Either Server.ClientDisconnected (StreamElem NoMetadata Int)
+      -> Bool
+    isExpectedDisconnect (Left (Server.ClientDisconnected e _))
+      | Just HTTP2.Client.ConnectionIsClosed <- fromException e
+      = True
+      | otherwise
+      = False
+    isExpectedDisconnect _ = False
+
+serverGlobal ::
+     HasCallStack
+  => TestClock
+  -> MVar GlobalSteps
+    -- ^ Unlike in the client case, the grapesy infrastructure spawns a new
+    -- thread for each incoming connection. To know which part of the test this
+    -- particular handler corresponds to, we take the next 'LocalSteps' from
+    -- this @MVar@. Since all requests are started by the client from /one/
+    -- thread, the order of these incoming requests is deterministic.
+  -> Server.Call (TestProtocol meth)
+  -> IO ()
+serverGlobal clock globalStepsVar call = do
+    steps <- modifyMVar globalStepsVar (getNextSteps . getGlobalSteps)
+
+    -- See discussion in clientGlobal (runLocalSteps)
+    TestClock.advance clock
+
+    case getLocalSteps steps of
+      (tick, step@(ClientAction (Initiate (metadata, _rpc)))) : steps' -> do
+        receivedMetadata <- Server.getRequestMetadata call
+        -- It is important that we do this 'expect' outside the scope of the
+        -- @modifyMVar@: if we do not, then if the expect fails, we'd leave the
+        -- @MVar@ unchanged, and the next request would use the wrong steps.
+        expect (tick, step) (== metadata) $ receivedMetadata
+        within timeoutLocal steps' $ serverLocal clock call (LocalSteps steps')
+      _otherwise ->
+         error "serverGlobal: expected ClientInitiateRequest"
+  where
+    getNextSteps :: [LocalSteps] -> IO (GlobalSteps, LocalSteps)
+    getNextSteps [] = do
+        throwM $ TestFailure callStack $ UnexpectedRequest
+    getNextSteps (LocalSteps steps:global') =
+        return (GlobalSteps global', LocalSteps steps)
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+data ConnUsage = SharedConn | ConnPerRPC
+
+execGlobalSteps :: ConnUsage -> GlobalSteps -> IO ClientServerTest
+execGlobalSteps connUsage steps = do
+    globalStepsVar <- newMVar (order steps)
+    clock          <- TestClock.new
+
+    let handler :: forall (meth :: Symbol).
+             SupportsServerRpc (TestProtocol meth)
+          => Proxy (TestProtocol meth)
+          -> Server.SomeRpcHandler IO
+        handler _ = Server.someRpcHandler $
+          Server.mkRpcHandler @(TestProtocol meth) $ \call ->
+            serverGlobal clock globalStepsVar call
+
+    return ClientServerTest {
+        config = def {
+            isExpectedClientException = \e -> or [
+                isDeliberateException e
+              , clientTerminatesEarly && isGrpcCancelled e
+              ]
+          , isExpectedServerException = \e -> or [
+                isDeliberateException e
+              , serverTerminatesEarly && isHandlerTerminated e
+              ]
+          }
+      , client = clientGlobal clock connUsage steps
+      , server = [
+            handler (Proxy @TestRpc1)
+          , handler (Proxy @TestRpc2)
+          , handler (Proxy @TestRpc3)
+          ]
+      }
+  where
+    clientTerminatesEarly, serverTerminatesEarly :: Bool
+    (clientTerminatesEarly, serverTerminatesEarly) = hasEarlyTermination steps
+
+    -- For 'clientGlobal' the order doesn't matter, because it spawns a thread
+    -- for each 'LocalSteps'. The server however doesn't get this option; the
+    -- threads /get/ spawnwed for each incoming connection, and must feel off
+    -- the appropriate steps. It's therefore important that it will get these
+    -- in the order that they come in.
+    order :: GlobalSteps -> GlobalSteps
+    order (GlobalSteps threads) = GlobalSteps $
+        sortBy (comparing firstTick) threads
+     where
+       firstTick :: LocalSteps -> TestClock.Tick
+       firstTick (LocalSteps []) =
+           error "execGlobalSteps: unexpected empty LocalSteps"
+       firstTick (LocalSteps ((tick, _):_)) =
+           tick
diff --git a/test-grapesy/Test/Driver/Dialogue/Generation.hs b/test-grapesy/Test/Driver/Dialogue/Generation.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Driver/Dialogue/Generation.hs
@@ -0,0 +1,519 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Driver.Dialogue.Generation (
+    Dialogue(..)
+  , dialogueGlobalSteps
+  , DialogueWithoutExceptions(..)
+  , DialogueWithExceptions(..)
+  , ensureCorrectUsage
+  ) where
+
+import Control.Monad
+import Data.ByteString qualified as BS.Strict
+import Data.ByteString qualified as Strict (ByteString)
+import Data.Map.Strict (Map)
+import Data.Map.Strict qualified as Map
+import Data.Maybe (fromMaybe)
+import GHC.Stack
+import Test.QuickCheck
+
+import Network.GRPC.Common
+
+import Test.Driver.Dialogue.Definition
+import Test.Driver.Dialogue.TestClock qualified as TestClock
+
+{-------------------------------------------------------------------------------
+  Metadata
+
+  We don't (usually) want to have to look at tests failures with unnecessarily
+  complicated names or values, this simply distracts. The only case where we
+  /do/ want that is if we are specifically testing parsers/builders; we do this
+  in separate serialization tests ("Test.Prop.Serialization").
+-------------------------------------------------------------------------------}
+
+simpleAsciiValue :: [Strict.ByteString]
+simpleAsciiValue = ["a", "b", "c"]
+
+genMetadata :: Gen TestMetadata
+genMetadata =
+    TestMetadata
+      <$> liftArbitrary genAsciiValue
+      <*> liftArbitrary genAsciiValue
+      <*> liftArbitrary genBinaryValue
+      <*> liftArbitrary genBinaryValue
+  where
+    genAsciiValue :: Gen Strict.ByteString
+    genAsciiValue = elements simpleAsciiValue
+
+    genBinaryValue :: Gen Strict.ByteString
+    genBinaryValue = sized $ \sz -> do
+        n <- choose (0, sz)
+        BS.Strict.pack <$> replicateM n arbitrary
+
+{-------------------------------------------------------------------------------
+  Local steps
+-------------------------------------------------------------------------------}
+
+-- | Generate 'LocalStep's
+--
+-- We do not insert timing here; we do this globally.
+genLocalSteps ::
+     Bool  -- ^ Should we generate exceptions?
+  -> Gen [LocalStep]
+genLocalSteps genExceptions = sized $ \sz -> do
+    n <- choose (0, sz)
+    (:) <$> genInitStep <*> replicateM n genStep
+  where
+    genInitStep :: Gen LocalStep
+    genInitStep = do
+        metadata <- genMetadata
+        rpc      <- elements [RPC1, RPC2, RPC3]
+        return $ ClientAction $ Initiate (metadata, rpc)
+
+    genStep :: Gen LocalStep
+    genStep = frequency [
+          (if genExceptions then 1 else 0, genException)
+        , (3, ServerAction . Initiate <$> genMetadata)
+        , (3, ClientAction . Send     <$> genElem (pure NoMetadata))
+        , (3, ServerAction . Send     <$> genElem genMetadata)
+        ]
+
+    genException :: Gen LocalStep
+    genException = oneof [
+          ClientAction . Terminate . Just . SomeClientException <$> choose (0, 5)
+        , ServerAction . Terminate . Just . SomeServerException <$> choose (0, 5)
+        , pure $ ClientAction . Terminate $ Nothing
+        , pure $ ServerAction . Terminate $ Nothing
+        ]
+
+    genElem :: Gen b -> Gen (StreamElem b Int)
+    genElem genTrailers = oneof [
+           StreamElem  <$> genMsg
+         , FinalElem   <$> genMsg <*> genTrailers
+         , NoMoreElems <$> genTrailers
+        ]
+
+    genMsg :: Gen Int
+    genMsg = choose (0, 99)
+
+{-------------------------------------------------------------------------------
+  Ensure correct library usage
+
+  We have two essentially different kinds of tests: correctness of the library
+  given correct library usage, and reasonable error reporting given incorrect
+  library usage. We focus on the former here. For example:
+
+  * We /are/ interested in testing what happens when a client sends a message
+    to the server, but the server handler threw an exception.
+  * We are /not/ interested in testing what happens when a client tries to send
+    another message after having told the server that they sent their last
+    message, or after the server told the client that the call is over.
+
+  We also want to make sure the tests are not non-sensical (for example, it does
+  not make sense for the client to send a message after it has terminated).
+-------------------------------------------------------------------------------}
+
+-- | State of a single RPC call
+--
+-- We use this to determine when certain actions can happen.
+--
+-- Invariants:
+--
+-- * The server response cannot be initiated until the client request has been
+--   (until that time the server handler is not even running).
+-- * The client request must be closed when the server response closes.
+--
+-- That second point is a bit subtle. Normally it is the responsibility of both
+-- the client and the server to indicate when they won't send any more messages;
+-- if they do not, an exception is raised. There is however one exception to
+-- this rule: the server can unilaterally decide to close the entire RPC. When
+-- this happens, the client (of course) does not have to send any more messages.
+-- (Under normal circumstance this does not happen: the server would not close
+-- the RPC until the client has closed their end.) We treat the case where the
+-- server throws an exception the same: in both cases the RPC is closed and the
+-- client does not need to send its final message.
+--
+-- Of course, this /does/ mean that the client needs to /notice/ that the server
+-- has closed the call, even when it's an exception. We therefore implement a
+-- 'Terminate' on one side as a receive on the other (see 'clientLocal' and
+-- 'serverLocal').
+--
+-- One consequence of all this worth spelling out once more is that we rule
+-- out tests such as
+--
+-- > NormalizedDialogue [
+-- >    (0, ClientAction $ Initiate (def, RPC1))
+-- >  , (0, ServerAction $ Terminate (Just $ SomeServerException 0))
+-- >  , (0, ServerAction $ Send (StreamElem 1))
+-- >  ]
+--
+-- where the server sends a message after throwing an exception; at one level,
+-- it may seem obvious that we must rule such tests out (it doesn't make sense
+-- for the server to send messages after terminating, after all). However, a
+-- server 'Send' action is also a client @recv@ action, so one could think that
+-- we need such tests to make sure that clients get an appropriate exception
+-- when they try to receive a message but the server aborted. However, this case
+-- is dealt with by the fact that that we treat a 'Terminate' on one side as a
+-- receive on the other, as discussed above. This means that in the tests, a
+-- 'Send' on one side /must/ be a /successful/ receive on the other.
+data LocalGenState = LocalGenState {
+      localGenClient :: LocalUniState
+    , localGenServer :: LocalUniState
+    }
+  deriving (Show)
+
+-- | Unidirectional state
+--
+-- The tests describe a dialogue in a one-sided manner: we talk about /sending/,
+-- but not about receiving. In a way \"sending\" is something you /do/, whereas
+-- \"receiving\" is something that's done /to/ you. The state we record here is
+-- therefore the /outbound/ state only.
+data LocalUniState =
+    -- | The outbound stream has yet been initialized
+    --
+    -- Nothing can happen until the client initiates the request. The server can
+    -- choose to initiate the response at any point during the conversation.
+    UniUninit
+
+    -- | The outbound stream has been established
+  | UniOpen
+
+    -- | The outbound stream has been closed
+    --
+    -- In the case of the client, closing the stream (cleanly) is referred to
+    -- in gRPC documentation as \"putting the call in half-closed state\".
+    -- In the case of the server, closing the stream involves sending the
+    -- trailers and signals the end of the RPC.
+    --
+    -- The stream is closed \"uncleanly\" if the client or server handler
+    -- simply disappears, or when it throws an exception.
+  | UniClosed
+  deriving (Show)
+
+initLocalGenState :: LocalGenState
+initLocalGenState = LocalGenState {
+      localGenClient = UniUninit
+    , localGenServer = UniUninit
+    }
+
+establishInvariant :: HasCallStack => LocalGenState -> LocalGenState
+establishInvariant st =
+    case (localGenClient st, localGenServer st) of
+      (UniUninit , UniUninit) -> st
+      (UniUninit , _)         -> error "Response initiated before request"
+      (_         , UniClosed) -> st { localGenClient = UniClosed }
+      _otherwise              -> st
+
+ensureCorrectUsage :: [(Int, LocalStep)] -> [(Int, LocalStep)]
+ensureCorrectUsage = go Map.empty []
+  where
+    go ::
+         Map Int LocalGenState  -- State of each concurrent conversation
+      -> [(Int, LocalStep)]     -- Accumulator (reverse order)
+      -> [(Int, LocalStep)]     -- Still to consider
+      -> [(Int, LocalStep)]     -- Result
+    go sts acc [] = concat [
+          reverse acc
+        , concatMap (\(i, st) -> (i,) <$> ensureCleanClose st) $ Map.toList sts
+        ]
+      where
+        -- Make sure all channels are closed cleanly
+        --
+        -- We could do this in two ways: we can either have the server close
+        -- the call unilaterally, or we could first have the client close their
+        -- end and then the server its own. We opt for the latter, as it is the
+        -- more "clean" one, but if a particular test case is generated in which
+        -- the client does not close its own end before the server does, that is
+        -- also ok (see further discussion in 'LocalGenState').
+        ensureCleanClose :: LocalGenState -> [LocalStep]
+        ensureCleanClose st = concat [
+              [ ClientAction $ Send $ NoMoreElems NoMetadata
+              | case localGenClient st of
+                  UniUninit -> False
+                  UniOpen   -> True
+                  UniClosed -> False
+              ]
+            , [ ServerAction $ Send $ NoMoreElems def
+              | case (localGenClient st, localGenServer st) of
+                  (UniUninit, _) -> False
+                  (_, UniUninit) -> True
+                  (_, UniOpen)   -> True
+                  (_, UniClosed) -> False
+              ]
+            ]
+    go sts acc ((i, s):ss) =
+        case s of
+          ClientAction Initiate{} ->
+            case localGenClient st of
+              UniUninit  -> contWith $ updClient UniOpen
+              _otherwise -> skip
+
+          ClientAction Terminate{} ->
+            case localGenClient st of
+              UniUninit  -> skip
+              UniOpen    -> contWith $ updClient UniClosed
+              UniClosed  -> skip
+
+          ClientAction (Send (StreamElem _)) ->
+            case localGenClient st of
+              UniUninit  -> insert $ ClientAction (Initiate (def, RPC1))
+              UniOpen    -> contWith $ id
+              UniClosed  -> skip
+
+          ClientAction (Send _) -> -- FinalElem or NoMoreElems
+            case localGenClient st of
+              UniUninit  -> insert (ClientAction (Initiate (def, RPC1)))
+              UniOpen    -> contWith $ updClient UniClosed
+              UniClosed  -> skip
+
+          -- The server cannot do anything until the request is initiated
+          -- (until that point the server handler is not even running)
+          ServerAction _ | UniUninit <- localGenClient st ->
+            skip
+
+          ServerAction Initiate{} ->
+            case localGenServer st of
+             UniUninit   -> contWith $ updServer UniOpen
+             _otherwise  -> skip
+
+          ServerAction (Send (StreamElem _)) ->
+            case localGenServer st of
+              UniUninit  -> contWith $ updServer UniOpen -- implicitly opened
+              UniOpen    -> contWith $ id
+              UniClosed  -> skip
+
+          ServerAction (Send _) -> -- FinalElem or NoMoreElems
+            case localGenServer st of
+              UniClosed  -> skip
+              _otherwise -> contWith $ updServer UniClosed
+
+          ServerAction Terminate{} ->
+            case localGenServer st of
+              UniClosed  -> skip
+              _otherwise -> contWith $ updServer UniClosed
+      where
+        --
+        -- Three different ways to continue
+        --
+
+        -- 1. Normal case: update the state and move on the next action
+        contWith ::
+             (Map Int LocalGenState -> Map Int LocalGenState)
+          -> [(Int, LocalStep)]
+        contWith f = go (Map.map establishInvariant $ f sts) ((i, s) : acc) ss
+
+        -- 2. Skip this action
+        skip :: [(Int, LocalStep)]
+        skip = go sts acc ss
+
+        -- 3. First execute a different action
+        insert :: LocalStep -> [(Int, LocalStep)]
+        insert newStep = go sts acc ((i, newStep) : (i, s) : ss)
+
+        --
+        -- Updating the state
+        --
+
+        st :: LocalGenState
+        st = Map.findWithDefault initLocalGenState i sts
+
+        updClient ::
+             LocalUniState
+          -> Map Int LocalGenState -> Map Int LocalGenState
+        updClient client' =
+            Map.alter (Just . aux . fromMaybe initLocalGenState) i
+          where
+            aux :: LocalGenState -> LocalGenState
+            aux st' = st' { localGenClient = client' }
+
+        updServer ::
+             LocalUniState
+          -> Map Int LocalGenState -> Map Int LocalGenState
+        updServer server' =
+            Map.alter (Just . aux . fromMaybe initLocalGenState) i
+          where
+            aux :: LocalGenState -> LocalGenState
+            aux st' = st' { localGenServer = server' }
+
+{-------------------------------------------------------------------------------
+  Dialogue
+
+  We generate the steps for each channel separately first, and then choose a
+  particular interleaving ('interleave'). Before execution, we then assign
+  timings ('assignTimings'), separating the channels again. The advantage of
+  this representation is that it is easier to shrink: we can shrink the /global/
+  step of steps, whilst keeping the choice of interleaving; that is much harder
+  to do when the channels are kept separate.
+
+  In addition, we apply 'ensureCorrectUsage' just before execution. We do /not/
+  do this as part of generation/shrinking, as doing so could shrinking
+  non-wellfounded (shrinking might remove some action which gets reinserted by
+  'ensureCorrectUsage', and shrinking will loop).
+-------------------------------------------------------------------------------}
+
+data Dialogue =
+    -- | Dialogue that is already in "correct" form
+    --
+    -- Calling 'ensureCorrectUsage' on such a dialogue should be a no-op.
+    NormalizedDialogue [(Int, LocalStep)]
+
+    -- | Dialogue that may still need to be corrected
+  | UnnormalizedDialogue [(Int, LocalStep)]
+  deriving stock (Show, Eq)
+
+getNormalizedDialogue :: HasCallStack => Dialogue -> [(Int, LocalStep)]
+getNormalizedDialogue (UnnormalizedDialogue steps) = ensureCorrectUsage steps
+getNormalizedDialogue (NormalizedDialogue   steps)
+  | steps == normalized
+  = steps
+
+  | otherwise
+  = error $ "getNormalizedDialogue: normal form is " ++ show normalized
+  where
+    normalized :: [(Int, LocalStep)]
+    normalized = ensureCorrectUsage steps
+
+getRawDialogue :: Dialogue -> [(Int, LocalStep)]
+getRawDialogue (NormalizedDialogue   steps) = steps
+getRawDialogue (UnnormalizedDialogue steps) = steps
+
+dialogueGlobalSteps :: Dialogue -> GlobalSteps
+dialogueGlobalSteps =
+      GlobalSteps
+    . map LocalSteps
+    . TestClock.assignTimings
+    . getNormalizedDialogue
+
+-- | Shrink dialogue
+shrinkDialogue :: Dialogue -> [Dialogue]
+shrinkDialogue =
+      map UnnormalizedDialogue
+    . shrinkList (shrinkInterleaved shrinkLocalStep)
+    . getRawDialogue
+
+{-------------------------------------------------------------------------------
+  Shrinking
+-------------------------------------------------------------------------------}
+
+shrinkLocalStep :: LocalStep -> [LocalStep]
+shrinkLocalStep = \case
+    ClientAction (Initiate (metadata, rpc)) -> concat [
+        [ ClientAction $ Initiate (metadata', rpc)
+        | metadata' <- shrinkMetadata metadata
+        ]
+      , [ ClientAction $ Initiate (metadata, rpc')
+        | rpc' <- shrinkRPC rpc
+        ]
+      ]
+    ServerAction (Initiate metadata) ->
+      map (ServerAction . Initiate) $ shrinkMetadata metadata
+    ClientAction (Send x) ->
+      map (ClientAction . Send) $ shrinkElem (const []) x
+    ServerAction (Send x) ->
+      map (ServerAction . Send) $ shrinkElem shrinkMetadata x
+    ClientAction (Terminate (Just (SomeClientException n))) ->
+      map (ClientAction . Terminate . Just . SomeClientException) (shrink n)
+    ServerAction (Terminate (Just (SomeServerException n))) ->
+      map (ServerAction . Terminate . Just . SomeServerException) (shrink n)
+    ClientAction (Terminate Nothing) ->
+      []
+    ServerAction (Terminate Nothing) ->
+      []
+
+shrinkRPC :: RPC -> [RPC]
+shrinkRPC RPC1 = []
+shrinkRPC RPC2 = [RPC1]
+shrinkRPC RPC3 = [RPC1, RPC2]
+
+-- | Shrink metadata
+--
+-- For now we just shrink individual values. In principle we could also try to
+-- /replace/ a binary header with an ASCII one.
+shrinkMetadata :: TestMetadata -> [TestMetadata]
+shrinkMetadata md = concat [
+      [ md{metadataAsc1 = x}
+      | x <- liftShrink shrinkAsciiValue (metadataAsc1 md)
+      ]
+    , [ md{metadataAsc2 = x}
+      | x <- liftShrink shrinkAsciiValue (metadataAsc2 md)
+      ]
+    , [ md{metadataBin3 = x}
+      | x <- liftShrink shrinkBinaryValue (metadataBin3 md)
+      ]
+    , [ md{metadataBin4 = x}
+      | x <- liftShrink shrinkBinaryValue (metadataBin4 md)
+      ]
+    ]
+  where
+    shrinkAsciiValue :: Strict.ByteString -> [Strict.ByteString]
+    shrinkAsciiValue val = filter (< val) simpleAsciiValue
+
+    shrinkBinaryValue :: Strict.ByteString -> [Strict.ByteString]
+    shrinkBinaryValue val = concat [
+          -- aggressively try to shrink to a single byte
+          [ BS.Strict.pack [x]
+          | x:_:_ <- [BS.Strict.unpack val]
+          ]
+
+          -- normal shrinking of binary values
+        , [ BS.Strict.pack val'
+          | val' <- shrink (BS.Strict.unpack val)
+          ]
+        ]
+
+-- | Shrink element
+--
+-- For now we don't change the nature of the elem. Not sure what the right
+-- definition of "simpler" is here.
+shrinkElem :: (a -> [a]) -> StreamElem a Int -> [StreamElem a Int]
+shrinkElem _ (StreamElem x) = concat [
+      [ StreamElem x'
+      | x' <- shrink x
+      ]
+    ]
+shrinkElem f (FinalElem x y) = concat [
+      [ FinalElem x' y
+      | x' <- shrink x
+      ]
+    , [ FinalElem x y'
+      | y' <- f y
+      ]
+    ]
+shrinkElem f (NoMoreElems y) = concat [
+      [ NoMoreElems y'
+      | y' <- f y
+      ]
+    ]
+
+shrinkInterleaved :: (a -> [a]) -> (Int, a) -> [(Int, a)]
+shrinkInterleaved f (i, a) = (i, ) <$> f a
+
+{-------------------------------------------------------------------------------
+  Arbitrary instance
+-------------------------------------------------------------------------------}
+
+newtype DialogueWithoutExceptions = DialogueWithoutExceptions Dialogue
+  deriving stock (Show, Eq)
+
+newtype DialogueWithExceptions = DialogueWithExceptions Dialogue
+  deriving stock (Show, Eq)
+
+instance Arbitrary DialogueWithoutExceptions where
+  arbitrary = do
+      concurrency <- choose (1, 3)
+      threads     <- replicateM concurrency $ genLocalSteps False
+      DialogueWithoutExceptions . UnnormalizedDialogue <$>
+        TestClock.interleave threads
+
+  shrink (DialogueWithoutExceptions dialogue) =
+      DialogueWithoutExceptions <$> shrinkDialogue dialogue
+
+instance Arbitrary DialogueWithExceptions where
+  arbitrary = do
+      concurrency <- choose (1, 3)
+      threads     <- replicateM concurrency $ genLocalSteps True
+      DialogueWithExceptions . UnnormalizedDialogue <$>
+        TestClock.interleave threads
+
+  shrink (DialogueWithExceptions dialogue) =
+      DialogueWithExceptions <$> shrinkDialogue dialogue
diff --git a/test-grapesy/Test/Driver/Dialogue/TestClock.hs b/test-grapesy/Test/Driver/Dialogue/TestClock.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Driver/Dialogue/TestClock.hs
@@ -0,0 +1,236 @@
+module Test.Driver.Dialogue.TestClock (
+    TestClock -- opaque
+  , Tick      -- opaque
+  , new
+    -- * Current time
+  , waitForTick
+  , advance
+    -- * Green light
+  , waitForGreenLight
+  , giveGreenLight
+    -- * Interleavings
+  , interleave
+  , assignTimings
+  ) where
+
+import Prelude hiding (id)
+
+import Control.Concurrent.STM
+import Control.Exception
+import Control.Monad
+import Control.Monad.IO.Class
+import Data.List.NonEmpty (NonEmpty(..))
+import Data.List.NonEmpty qualified as NE
+import Data.Map (Map)
+import Data.Map qualified as Map
+import Data.Maybe (mapMaybe)
+import Data.Set (Set)
+import Data.Set qualified as Set
+import GHC.Stack
+import Test.QuickCheck (Gen, choose)
+
+{-------------------------------------------------------------------------------
+  Definition
+-------------------------------------------------------------------------------}
+
+-- | Test clock
+--
+-- When we are testing concurrent code, we may get different results depending
+-- on the exact way that the various threads are scheduled, potentially making
+-- test outcomes difficult to specify. Moreover, even if the final outcome does
+-- not depend on the exact scheduling, debugging tests is much simpler if they
+-- are deterministic and do the same thing each time. Consider tracing a
+-- particular test execution, or inspecting it through Wireshark: if the test
+-- execution is different each time, debugging becomes much more difficult.
+--
+-- We therefore introduce a global \"test clock\", and randomly assign each
+-- action to be executed a \"clock tick\" (formally, we are exploring a /random
+-- interleaving/). This then begs the question of when the clock gets advanced.
+-- We could just have a thread tick the test clock every @n@ milliseconds on the
+-- wallclock, but choosing @n@ is hard: too low, and we /still/ execute actions
+-- concurrently; too high, and the tests run much slower than they need to.
+-- Instead, we say that the actions /themselves/ are responsible for advancing
+-- the test clock when appropriate.
+--
+-- In a concurrent setting, the \"when appropriate\" part is however not always
+-- easy to determine. Suppose we have thread A sending messages to thread B,
+-- then there is no need to wait for each message to have been /received/ by B
+-- (this would reduce the test to effectively using the network layer in a
+-- synchronous manner); this would suggest we can tick the clock immediately
+-- after sending (rather than waiting for the message to be received first).
+-- However, if at some point later A throws a (deliberate) exception, then A
+-- /should/ wait for B to have received all messages first, or risk that the
+-- exception could \"overtake\" some message, leading to flaky tests.
+--
+-- Getting this right is surprisingly subtle. A knows to wait for B, but only
+-- once it gets to the action that throws the exception; at that point it wants
+-- to know that B received the messages it sent /in some previous action/. The
+-- approach we take attempts to avoid this \"spooky action at a distance\" as
+-- follows: when A is about to throw a deliberate exception at tick T, it waits
+-- to get the green light for T; on B's side, when B is ready to /react/ to this
+-- exception (implying any previous actions have been verified already), it
+-- /gives/ the green light for T. Since A knows when it needs to wait for the
+-- green light (e.g., throwing a deliberate exception) and when it doesn't
+-- (e.g., sending a message), we avoid over-sychronization. Meanwhile, B giving
+-- the green light for an action rather than acknowledging some previous action
+-- keeps the tests easier to understand: A and B are both talking about the same
+-- tick T.
+newtype TestClock = TestClock (TVar State)
+
+-- | State of the clock
+data State = State {
+      stateNow   :: Tick
+    , stateGreen :: Set Tick
+    }
+
+-- | Clock tick
+newtype Tick = Tick Word
+  deriving stock (Show)
+  deriving newtype (Eq, Ord, Enum)
+
+-- | Start the clock
+new :: IO TestClock
+new = TestClock <$> newTVarIO initState
+  where
+    initState :: State
+    initState = State {
+        stateNow   = Tick 0
+      , stateGreen = Set.empty
+      }
+
+{-------------------------------------------------------------------------------
+  Current time
+-------------------------------------------------------------------------------}
+
+-- | Thrown by 'waitForTick'
+data TimePassed = TimePassed {
+      timePassedNow    :: Tick
+    , timePassedWanted :: Tick
+    , timePassedAt     :: CallStack
+    }
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+-- | Wait for specified clock tick
+--
+-- If the clock has already gone past the specified time, throws 'TimePassed'.
+waitForTick :: MonadIO m => TestClock -> Tick -> m ()
+waitForTick (TestClock clock) t = liftIO . atomically $ do
+    State{stateNow} <- readTVar clock
+    if | stateNow < t  -> retry
+       | stateNow == t -> return ()
+       | otherwise     -> throwSTM $ TimePassed {
+                              timePassedNow    = stateNow
+                            , timePassedWanted = t
+                            , timePassedAt     = callStack
+                            }
+
+-- | Advance the clock by one tick
+--
+-- There should only ever be /one/ thread responsible for advancing the clock
+-- at any given time.
+advance :: MonadIO m => TestClock -> m ()
+advance (TestClock clock) = liftIO . atomically $ do
+    modifyTVar clock $ \st@State{stateNow} ->
+      st{stateNow = succ stateNow}
+
+{-------------------------------------------------------------------------------
+  Green light
+-------------------------------------------------------------------------------}
+
+-- | Wait for green light
+--
+-- See 'TestClock' for discussion.
+waitForGreenLight :: MonadIO m => TestClock -> Tick -> m ()
+waitForGreenLight (TestClock clock) t = liftIO . atomically $ do
+    State{stateGreen} <- readTVar clock
+    unless (t `Set.member` stateGreen) retry
+
+-- | Give green light
+--
+-- See 'TestClock' for discussion.
+giveGreenLight :: MonadIO m => TestClock -> Tick -> m ()
+giveGreenLight (TestClock clock) t = liftIO . atomically $ do
+    modifyTVar clock $ \st@State{stateGreen} ->
+      st{stateGreen = Set.insert t stateGreen}
+
+{-------------------------------------------------------------------------------
+  Computing interleavings
+
+  We assign timings /from/ interleavings. This is more suitable to shrinking;
+  during generation we pick an arbitrary interleaving, then as we shrink, we
+  leave the interleaving (mostly) alone, but re-assign timings.
+-------------------------------------------------------------------------------}
+
+-- | Pick an arbitrary interleaving
+--
+-- This flattens the list; each item in the result is an element from /one/
+-- of the input lists, annotated with the index of that particular list.
+--
+-- > ghci> sample (interleave ["abc", "de"])
+-- > [(0,'a'),(1,'d'),(0,'b'),(0,'c'),(1,'e')]
+-- > [(1,'d'),(0,'a'),(0,'b'),(1,'e'),(0,'c')]
+-- > [(1,'d'),(1,'e'),(0,'a'),(0,'b'),(0,'c')]
+interleave :: forall a. [[a]] -> Gen [(Int, a)]
+interleave =
+    go . mapMaybe (\(i, xs) -> (i,) <$> NE.nonEmpty xs) . zip [0..]
+  where
+    go :: [(Int, NonEmpty a)] -> Gen [(Int, a)]
+    go [] = return []
+    go xs = do
+        (as, (i, b :| bs), cs) <- isolate xs
+        fmap ((i, b) :) $
+          case bs of
+            []       -> go (as ++ cs)
+            b' : bs' -> go (as ++ [(i, b' :| bs')] ++ cs)
+
+-- | Assign timings, given an interleaving
+--
+-- In some sense this is an inverse to 'interleave':
+--
+-- >    assignTimings [(0,'a'),(0,'b'),(1,'d'),(1,'e'),(0,'c')]
+-- > == [ [ (Tick 0,'a')
+-- >      , (Tick 2,'b')
+-- >      , (Tick 8,'c')
+-- >      ]
+-- >    , [ (Tick 4,'d')
+-- >      ,( Tick 6,'e')
+-- >      ]
+-- >    ]
+--
+-- Put another way
+--
+-- > map (map snd) . assignTimings <$> interleave xs
+--
+-- will just generate @xs@.
+assignTimings :: forall id a. Ord id => [(id, a)] -> [[(Tick, a)]]
+assignTimings = separate . assignClockTicks
+  where
+    separate :: [(id, x)] -> [[x]]
+    separate = go Map.empty
+      where
+        go :: Map id [x] -> [(id, x)] -> [[x]]
+        go acc []             = map reverse $ Map.elems acc
+        go acc ((id, x) : xs) = go (Map.alter (Just . maybe [x] (x:)) id acc) xs
+
+    assignClockTicks :: [(id, a)] -> [(id, (Tick, a))]
+    assignClockTicks = go (Tick 0)
+      where
+        go :: Tick -> [(id, a)] -> [(id, (Tick, a))]
+        go _ []           = []
+        go t ((id, a):as) = (id, (t, a)) : go (succ t) as
+
+{-------------------------------------------------------------------------------
+  Internal auxiliary
+-------------------------------------------------------------------------------}
+
+isolate :: [a] -> Gen ([a], a, [a])
+isolate = \case
+    [] -> error "isolate: empty list"
+    xs -> do n <- choose (0, length xs - 1)
+             return $ go [] xs n
+  where
+    go :: [a] -> [a] -> Int -> ([a], a, [a])
+    go _    []     _ = error "isolate: impossible"
+    go prev (x:xs) 0 = (reverse prev, x, xs)
+    go prev (x:xs) n = go (x:prev) xs (pred n)
diff --git a/test-grapesy/Test/Prop/Dialogue.hs b/test-grapesy/Test/Prop/Dialogue.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Prop/Dialogue.hs
@@ -0,0 +1,441 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Prop.Dialogue (tests) where
+
+import Control.Exception
+import Test.Tasty
+import Test.Tasty.HUnit
+import Test.Tasty.QuickCheck
+
+import Network.GRPC.Common
+
+import Test.Driver.ClientServer
+import Test.Driver.Dialogue
+
+tests :: TestTree
+tests = testGroup "Test.Prop.Dialogue" [
+      testGroup "Regression" [
+          testCase "trivial1"               $ regression SharedConn trivial1
+        , testCase "trivial2"               $ regression SharedConn trivial2
+        , testCase "trivial3"               $ regression SharedConn trivial3
+        , testCase "concurrent1"            $ regression SharedConn concurrent1
+        , testCase "concurrent2"            $ regression SharedConn concurrent2
+        , testCase "concurrent3"            $ regression SharedConn concurrent3
+        , testCase "concurrent4"            $ regression SharedConn concurrent4
+        , testCase "exception1"             $ regression ConnPerRPC exception1
+        , testCase "exception2"             $ regression ConnPerRPC exception2
+        , testCase "earlyTermination01"     $ regression ConnPerRPC earlyTermination01
+        , testCase "earlyTermination02"     $ regression ConnPerRPC earlyTermination02
+        , testCase "earlyTermination03"     $ regression ConnPerRPC earlyTermination03
+        , testCase "earlyTermination04"     $ regression ConnPerRPC earlyTermination04
+        , testCase "earlyTermination05"     $ regression ConnPerRPC earlyTermination05
+        , testCase "earlyTermination06"     $ regression ConnPerRPC earlyTermination06
+        , testCase "earlyTermination07"     $ regression ConnPerRPC earlyTermination07
+        , testCase "earlyTermination08"     $ regression ConnPerRPC earlyTermination08
+        , testCase "earlyTermination09"     $ regression ConnPerRPC earlyTermination09
+        , testCase "earlyTermination10"     $ regression ConnPerRPC earlyTermination10
+        , testCase "earlyTermination11"     $ regression ConnPerRPC earlyTermination11
+        , testCase "earlyTermination12"     $ regression ConnPerRPC earlyTermination12
+        , testCase "earlyTermination13"     $ regression ConnPerRPC earlyTermination13
+        , testCase "earlyTermination14"     $ regression ConnPerRPC earlyTermination14
+        , testCase "unilateralTermination1" $ regression SharedConn unilateralTermination1
+        , testCase "unilateralTermination2" $ regression SharedConn unilateralTermination2
+        , testCase "unilateralTermination3" $ regression SharedConn unilateralTermination3
+        , testCase "allowHalfClosed1"       $ regression SharedConn allowHalfClosed1
+        , testCase "allowHalfClosed2"       $ regression SharedConn allowHalfClosed2
+        , testCase "allowHalfClosed3"       $ regression ConnPerRPC allowHalfClosed3
+        ]
+    , testGroup "Setup" [
+          testProperty "shrinkingWellFounded" prop_shrinkingWellFounded
+        ]
+    , testGroup "Arbitrary" [
+          testGroup "WithoutExceptions" [
+            testProperty "connPerRPC" $ arbitraryWithoutExceptions ConnPerRPC
+          , testProperty "sharedConn" $ arbitraryWithoutExceptions SharedConn
+          ]
+        , testGroup "WithExceptions" [
+            testProperty "connPerRPC" $ arbitraryWithExceptions ConnPerRPC
+          , testProperty "sharedConn" $ arbitraryWithExceptions SharedConn
+          ]
+        ]
+    ]
+
+{-------------------------------------------------------------------------------
+  Verify setup is correct
+-------------------------------------------------------------------------------}
+
+prop_shrinkingWellFounded :: Property
+prop_shrinkingWellFounded =
+    -- Explicit 'forAll' so that we can disable shrinking here
+    -- (If shrinking is /not/ well-founded, then we should not try to shrink!)
+    forAll arbitrary $ \(d :: DialogueWithoutExceptions) ->
+      d `notElem` shrink d
+
+{-------------------------------------------------------------------------------
+  Running the tests
+-------------------------------------------------------------------------------}
+
+arbitraryWithoutExceptions :: ConnUsage -> DialogueWithoutExceptions -> Property
+arbitraryWithoutExceptions connUsage (DialogueWithoutExceptions dialogue) =
+    propDialogue connUsage dialogue
+
+arbitraryWithExceptions :: ConnUsage -> DialogueWithExceptions -> Property
+arbitraryWithExceptions connUsage (DialogueWithExceptions dialogue) =
+    propDialogue connUsage dialogue
+
+propDialogue :: ConnUsage -> Dialogue -> Property
+propDialogue connUsage dialogue =
+    counterexample (show globalSteps) $
+      propClientServer $ execGlobalSteps connUsage globalSteps
+  where
+    globalSteps :: GlobalSteps
+    globalSteps = dialogueGlobalSteps dialogue
+
+regression :: ConnUsage -> Dialogue -> IO ()
+regression connUsage dialogue =
+    handle (throwIO . RegressionTestFailed globalSteps) $
+      testClientServer =<< execGlobalSteps connUsage globalSteps
+  where
+    globalSteps :: GlobalSteps
+    globalSteps = dialogueGlobalSteps dialogue
+
+data RegressionTestFailed = RegressionTestFailed {
+      regressionGlobalSteps :: GlobalSteps
+    , regressionException   :: SomeException
+    }
+  deriving stock (Show)
+  deriving anyclass (Exception)
+
+{-------------------------------------------------------------------------------
+  Regression tests
+
+  We use only 'NormalizedDialogue' here, so that /if/ we change normalization
+  (because some additional invariant needs to be preserved, for example), we
+  will get a useful test failure indicating which tests need to be adjusted.
+-------------------------------------------------------------------------------}
+
+-- | Sanity check: server tells client immediately that there is nothing to say
+--
+-- One of the things this test verifies (apart from the testing infrastructure
+-- itself) is that the server gets the chance to terminate cleanly.
+trivial1 :: Dialogue
+trivial1 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Variation on 'trivial1' where the client sends a message before the
+-- server closed the call
+trivial2 :: Dialogue
+trivial2 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (StreamElem 1234))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Variation on 'trivial1' where the server closes the call unilaterally
+trivial3 :: Dialogue
+trivial3 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Verify that the test infrastructure does not confuse client/server threads
+--
+-- It's trickier than one might think to make sure that the server handler and
+-- a client agree on a set of steps to execute. This test, along with
+-- 'concurrent2' and 'concurrent3', and sanity checks to make sure that this
+-- goes well.
+concurrent1 :: Dialogue
+concurrent1 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    ]
+
+concurrent2 :: Dialogue
+concurrent2 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    ]
+
+concurrent3 :: Dialogue
+concurrent3 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def{metadataAsc2 = Just "b"}, RPC1))
+    , (0, ClientAction $ Initiate (def{metadataAsc1 = Just "a"}, RPC1))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    , (1, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Test that the final message is received
+--
+-- See also <https://github.com/kazu-yamamoto/http2/issues/86>.
+concurrent4 :: Dialogue
+concurrent4 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ClientAction $ Send (FinalElem 1 NoMetadata))
+    , (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (FinalElem 2 NoMetadata))
+    , (1, ServerAction $ Send (FinalElem 3 def))
+    , (0, ServerAction $ Send (FinalElem 4 def))
+    ]
+
+-- | Server-side exception
+--
+-- Since the handler throws an exception without sending /anything/, the
+-- exception will be reported to the client using the gRPC trailers-only case.
+-- This test also verifies that the client can /receive/ this message
+exception1 :: Dialogue
+exception1 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Terminate (Just $ SomeServerException 0))
+    ]
+
+-- | Client-side exception
+exception2 :: Dialogue
+exception2 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Server handler terminates before the client expects it
+earlyTermination01 :: Dialogue
+earlyTermination01 = NormalizedDialogue [
+      (0, ClientAction (Initiate (def, RPC1)))
+    , (0, ServerAction (Terminate Nothing))
+    ]
+
+-- | Client terminates before the server handler expects it
+earlyTermination02 :: Dialogue
+earlyTermination02 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Terminate Nothing)
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Variation on early client-side termination that tends to trigger a
+-- different code path, where we get a stream error; in @grapesy@ these
+-- various kinds of exceptions we can get from @http2@ should all be reported
+-- in the same manner (as 'ClientDisconnected' exceptions).
+earlyTermination03 :: Dialogue
+earlyTermination03 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def, RPC1 ))
+    , (0, ClientAction $ Initiate (def, RPC1))
+    , (1, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Another minor variation on 'earlyTermination03', which tends to trigger yet
+-- another codepath
+earlyTermination04 :: Dialogue
+earlyTermination04 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Initiate def)
+    , (1, ClientAction $ Initiate (def, RPC1 ))
+    , (1, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- Test that early termination in one call does not affect the other. This is
+-- currently /only/ true if they use separate connections; see discussion in
+-- 'clientGlobal'.
+earlyTermination05 :: Dialogue
+earlyTermination05 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def,RPC1))
+    , (1, ServerAction $ Terminate Nothing)
+    , (0, ClientAction $ Initiate (def,RPC1))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Variation where the client does send some messages before throwing an
+-- exception
+--
+-- This is mostly a check on the test infrastructure itself. In a test case
+-- like this where a message is enqueued and then an exception is thrown, the
+-- exception might " overtake " that message and the server will never
+-- receive it. This motivates the " conservative " test mode where we test
+-- each operation in a synchronous manner.
+earlyTermination06 :: Dialogue
+earlyTermination06 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (StreamElem 0))
+    , (0, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Server-side early termination
+earlyTermination07 :: Dialogue
+earlyTermination07 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Initiate def)
+    , (0, ServerAction $ Terminate (Just (SomeServerException 0)))
+    ]
+
+-- | Server-side early termination, Trailers-Only case
+--
+-- This is like 'earlyTermination07', but in this case the server does not send
+-- the initial metadata, which causes the server handler to use the gRPC
+-- Trailers-Only case to send the error to the client.
+earlyTermination08 :: Dialogue
+earlyTermination08 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Terminate (Just (SomeServerException 0)))
+    ]
+
+-- | Like 'earlyTermination07', but now without an exception
+earlyTermination09 :: Dialogue
+earlyTermination09 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Initiate def)
+    , (0, ServerAction $ Terminate Nothing)
+    ]
+
+-- | Client throws after the server sends their initial metadata
+earlyTermination10 :: Dialogue
+earlyTermination10 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Initiate def)
+    , (0, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Like 'earlyTermination10', but server sends a message before closing
+earlyTermination11 :: Dialogue
+earlyTermination11 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Initiate def)
+    , (0, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (0, ServerAction $ Send (StreamElem 0))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Client tries to send message but server has already terminated
+--
+-- This gets sandwiched between another interaction with no unexpected early
+-- termination.
+--
+-- This is a test of the test suite itself: it verifies that we step the test
+-- clock correctly in the presence of failures.
+earlyTermination12 :: Dialogue
+earlyTermination12 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC2))
+    , (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ServerAction $ Terminate Nothing)
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Like earlyTermination12, but the sandwich the other way around
+--
+-- We also send more messages; this is mostly testing the test infrastructure
+-- itself (specifically, that the test clock is used correctly).
+earlyTermination13 :: Dialogue
+earlyTermination13 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Send (StreamElem 1))
+    , (0, ServerAction $ Send (StreamElem 2))
+    , (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    , (0, ServerAction $ Send (StreamElem 3))
+    , (0, ServerAction $ Terminate (Just (SomeServerException 0)))
+    ]
+
+-- | Both the server /and/ the client terminate early
+--
+-- This is primarily a test of the test infrastructure itself: after the client
+-- has terminated, it can no longer green-light the server.
+earlyTermination14 :: Dialogue
+earlyTermination14 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Terminate Nothing)
+    , (0, ServerAction $ Terminate (Just (SomeServerException 0)))
+    ]
+
+unilateralTermination1 :: Dialogue
+unilateralTermination1 = NormalizedDialogue [
+      (1,ClientAction (Initiate (def,RPC1)))
+    , (1,ServerAction (Send (FinalElem 0 def)))
+    , (0,ClientAction (Initiate (def,RPC1)))
+    , (0,ClientAction (Send (NoMoreElems NoMetadata)))
+    , (0,ServerAction (Send (NoMoreElems def)))
+    ]
+
+unilateralTermination2 :: Dialogue
+unilateralTermination2 = NormalizedDialogue [
+      (1,ClientAction (Initiate (def,RPC1)))
+    , (1,ServerAction (Send (FinalElem 0 def)))
+    , (0,ClientAction (Initiate (def,RPC1)))
+    , (0,ClientAction (Send (NoMoreElems NoMetadata)))
+    , (0,ServerAction (Send (NoMoreElems def)))
+    , (2,ClientAction (Initiate (def,RPC1)))
+    , (2,ServerAction (Send (FinalElem 0 def)))
+    ]
+
+unilateralTermination3 :: Dialogue
+unilateralTermination3 = NormalizedDialogue [
+      (0, ClientAction (Initiate (def,RPC1)))
+    , (0, ServerAction (Send (NoMoreElems def)))
+    , (1, ClientAction (Initiate (def,RPC1)))
+    , (1, ClientAction (Send (FinalElem 0 NoMetadata)))
+    , (1, ServerAction (Send (NoMoreElems def)))
+    ]
+
+{-------------------------------------------------------------------------------
+  Dealing correctly with 'AllowHalfClosed'
+
+  NOTE: Once the client puts the connection in half-closed state, if it then
+  subsequently crashes, the server may not notice as it is not listening for
+  messages from the client anymore (it may notice it when it sends, though).
+  For this reason we rule out test cases in which the client terminates "early"
+  after having already put the connection in half-closed mode.
+-------------------------------------------------------------------------------}
+
+-- | We close the outbound stream in the client
+--
+-- This was previously causing the connection to break; see 'NoTrailers' for
+-- detailed discussion.
+allowHalfClosed1 :: Dialogue
+allowHalfClosed1 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    , (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ServerAction $ Initiate def)
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Variation on 'allowHalfClosed1' without an explicit server initiation.
+allowHalfClosed2 :: Dialogue
+allowHalfClosed2 = NormalizedDialogue [
+      (1, ClientAction $ Initiate (def, RPC1))
+    , (1, ServerAction $ Send (NoMoreElems def))
+    , (0, ClientAction $ Initiate (def, RPC1))
+    , (0, ClientAction $ Send (NoMoreElems NoMetadata))
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
+
+-- | Server initiates response after client half-closes
+allowHalfClosed3 :: Dialogue
+allowHalfClosed3 = NormalizedDialogue [
+      (0, ClientAction $ Initiate (def,RPC1))
+    , (0, ClientAction $ Terminate (Just (SomeClientException 0)))
+    , (0, ServerAction $ Initiate def)
+    , (0, ServerAction $ Send (NoMoreElems def))
+    ]
diff --git a/test-grapesy/Test/Regression/Issue102.hs b/test-grapesy/Test/Regression/Issue102.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Regression/Issue102.hs
@@ -0,0 +1,193 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-orphans   #-}
+
+-- | Handling of exceptions occurring in an RPC on a shared connection.
+--
+-- These tests check for the behavior described in
+-- <https://github.com/well-typed/grapesy/issues/102>. In particular, there are
+-- two conditions that should hold when an exception occurs in the scope of a
+-- call (on either the server or client, e.g. inside either 'mkRpcHandler' or
+-- 'withRPC'):
+--
+-- 1. Other ongoing calls on that connection are not terminated (client), and
+--    handlers dealing with other calls on that connection are not terminated
+--    (server), and
+-- 2. future calls are still possible (client), and more handlers can be started
+--    to deal with future calls (server).
+module Test.Regression.Issue102 (tests) where
+
+import Control.Concurrent.Async
+import Control.Exception
+import Control.Monad
+import Data.Either
+import Data.IORef
+import Data.Text qualified as Text
+import Data.Word
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.Binary qualified as Binary
+import Network.GRPC.Common
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.Binary qualified as Binary
+
+import Proto.API.Trivial
+
+import Test.Driver.ClientServer
+import Test.Util.Exception
+
+tests :: TestTree
+tests = testGroup "Issue102" [
+      testCase "client" test_clientException
+    , testCase "server" test_serverException
+
+    , testCase "earlyTerminationNoWait"  test_earlyTerminationNoWait
+    ]
+
+-- | Client makes many concurrent calls, throws an exception during one of them.
+test_clientException :: IO ()
+test_clientException = testClientServer $ ClientServerTest {
+      config = def {
+           isExpectedClientException = isDeliberateException
+         , isExpectedServerException = isClientDisconnected
+         }
+    , client = simpleTestClient $ \conn -> do
+        -- Make 100 concurrent calls. 99 of them counting to 50, and one
+        -- more that throws an exception once it reaches 10.
+        let
+          predicate  = (> 50)
+          predicates =
+            replicate 99 predicate ++
+              [ \n ->
+                     (n > 10)
+                  && throw (DeliberateException $ SomeClientException 1)
+              ]
+
+        results <-
+          mapConcurrently
+            (   try @DeliberateException
+              . Client.withRPC conn def (Proxy @Trivial)
+              . countUntil
+            )
+            predicates
+
+        -- Only one of the calls failed
+        assertEqual "" (length $ lefts results) 1
+
+        -- All others terminated with results satisfying the predicate
+        assertBool "" (all predicate $ rights results)
+
+        -- New calls still succeed
+        assertBool "" . predicate
+          =<< Client.withRPC conn def (Proxy @Trivial) (countUntil predicate)
+    , server = [
+          Server.someRpcHandler $
+            Server.mkRpcHandler @Trivial incUntilFinal
+        ]
+    }
+
+-- | Client makes many concurrent calls, the handler throws an exception during
+-- one of them.
+test_serverException :: IO ()
+test_serverException = do
+    handlerCounter <- newIORef @Int 0
+    testClientServer $ ClientServerTest {
+        config = def { isExpectedServerException = isDeliberateException }
+      , client = simpleTestClient $ \conn -> do
+          -- Make 100 concurrent calls counting to 50.
+          let predicate = (> 50)
+          results <-
+            replicateConcurrently 100 $
+                  try @GrpcException
+                . Client.withRPC conn def (Proxy @Trivial)
+                $ countUntil predicate
+
+          -- Only one of the calls failed, and we got the appropriate
+          -- exception
+          case lefts results of
+            [GrpcException GrpcUnknown (Just msg) Nothing []] -> do
+              assertBool "" $ "DeliberateException"   `Text.isInfixOf` msg
+              assertBool "" $ "SomeServerException 1" `Text.isInfixOf` msg
+            _ ->
+              assertFailure ""
+
+          -- All others terminated with results satisfying the predicate
+          assertBool "" (all predicate $ rights results)
+
+          -- New calls still succeed
+          assertBool "" . predicate
+            =<< Client.withRPC conn def (Proxy @Trivial) (countUntil predicate)
+      , server = [
+              Server.someRpcHandler $
+                Server.mkRpcHandler @Trivial $ \call -> do
+                    handlerCount <-
+                      atomicModifyIORef' handlerCounter (\n -> (n + 1, n))
+                    when (handlerCount == 25) $
+                      throwIO $
+                        DeliberateException $ SomeServerException 1
+                    incUntilFinal call
+          ]
+      }
+
+-- | This is essentially 'Test.Prop.Dialogue.earlyTermination15', but the server
+-- does not wait for client termination.
+test_earlyTerminationNoWait :: IO ()
+test_earlyTerminationNoWait = testClientServer $ ClientServerTest {
+      config = def {
+          isExpectedClientException = isDeliberateException
+        , isExpectedServerException = isClientDisconnected
+        }
+    , client = simpleTestClient $ \conn -> do
+        _mResult <-
+          try @DeliberateException $
+            Client.withRPC conn def (Proxy @Trivial) $ \_call ->
+              throwIO (DeliberateException $ SomeServerException 0)
+
+        result <- Client.withRPC conn def (Proxy @Trivial) $ \call -> do
+          Binary.sendFinalInput @Word8 call 0
+          Binary.recvFinalOutput @Word8 call
+
+        assertEqual "" (1, NoMetadata) result
+    , server = [
+          Server.someRpcHandler $
+            Server.mkRpcHandler @Trivial $ \call ->
+              Binary.recvInput @Word8 call >>= \case
+                _ -> Binary.sendFinalOutput @Word8 call (1, NoMetadata)
+        ]
+    }
+
+{-------------------------------------------------------------------------------
+  Client and handler functions
+-------------------------------------------------------------------------------}
+
+-- | Send numbers to the server until it responds with one that satisfies the
+-- given predicate.
+countUntil :: (Word64 -> Bool) -> Client.Call Trivial -> IO Word64
+countUntil = go 0
+  where
+    go :: Word64 -> (Word64 -> Bool) -> Client.Call Trivial -> IO Word64
+    go next p call
+      | p next
+      = do
+        Binary.sendFinalInput @Word64 call next
+        (_final, NoMetadata) <- Binary.recvFinalOutput @Word64 call
+        return next
+      | otherwise
+      = do
+        Binary.sendNextInput @Word64 call next
+        next' <- Binary.recvNextOutput @Word64 call
+        go next' p call
+
+-- | Reads numbers from the client and sends them back incremented by one.
+incUntilFinal :: Server.Call Trivial -> IO ()
+incUntilFinal call = do
+    Binary.recvInput call >>= \case
+      StreamElem n -> do
+        Binary.sendNextOutput @Word64 call $ succ n
+        incUntilFinal call
+      FinalElem n _ -> do
+        Binary.sendFinalOutput @Word64 call (succ n, NoMetadata)
+      NoMoreElems _ -> do
+        -- This is never hit, since our client never sends 'NoMoreElems'.
+        error "Test.Sanity.Exception.incUntilFinal: unexpected NoMoreElems"
diff --git a/test-grapesy/Test/Regression/Issue238.hs b/test-grapesy/Test/Regression/Issue238.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Regression/Issue238.hs
@@ -0,0 +1,219 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Tests for <https://github.com/well-typed/grapesy/issues/238>
+module Test.Regression.Issue238 (tests) where
+
+import Control.Exception
+import Data.ByteString.Lazy (ByteString)
+import Data.Text qualified as Text
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client (rpc)
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.Protobuf qualified as Server
+import Network.GRPC.Server.Run qualified as Server
+import Network.GRPC.Server.StreamType qualified as Server
+
+import Proto.API.RouteGuide
+import Proto.API.Trivial
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Issue238" [
+      testGroup "Trivial" [
+          testCase "nonStreaming1" test_trivial_nonStreaming1
+        , testCase "nonStreaming2" test_trivial_nonStreaming2
+        ]
+    , testGroup "LowLevel" [
+          testCase "nonStreaming1" test_lowLevel_nonStreaming1
+        , testCase "nonStreaming2" test_lowLevel_nonStreaming2
+        ]
+    , testGroup "RouteGuide" [
+          testCase "nonStreaming1" test_routeGuide_nonStreaming1
+        , testCase "nonStreaming2" test_routeGuide_nonStreaming2
+        , testCase "nonStreaming3" test_routeGuide_nonStreaming3
+        ]
+    ]
+
+{-------------------------------------------------------------------------------
+  Without Protobuf
+-------------------------------------------------------------------------------}
+
+-- | Undefined handler body
+test_trivial_nonStreaming1 :: Assertion
+test_trivial_nonStreaming1 =
+    testWith handlers client
+  where
+    handlers :: [Server.SomeRpcHandler IO]
+    handlers = [Server.someRpcHandler $ Server.mkRpcHandler @Trivial undefined]
+
+    client :: Client.Connection -> IO ByteString
+    client conn = Client.nonStreaming conn (rpc @Trivial) mempty
+
+-- | Like 'test_trivial_nonStreaming1', but without the call to @mkRpcHandler@
+--
+-- This matters, because 'mkRpcHandler' sets the initial metadata.
+test_trivial_nonStreaming2 :: Assertion
+test_trivial_nonStreaming2 =
+    testWith handlers client
+  where
+    handlers :: [Server.SomeRpcHandler IO]
+    handlers = [Server.someRpcHandler @Trivial undefined]
+
+    client :: Client.Connection -> IO ByteString
+    client conn = Client.nonStreaming conn (rpc @Trivial) mempty
+
+{-------------------------------------------------------------------------------
+  Low-level API
+
+  The ticket specifically says "when client uses high-level API". In this
+  section we therefore compare the behaviour of the @test_trivial@ tests (which
+  use the high-level API) to the corresponding behaviour with the low-level API.
+-------------------------------------------------------------------------------}
+
+-- | Direct equivalent of 'test_trivial_nonStreaming2'
+test_lowLevel_nonStreaming1 :: Assertion
+test_lowLevel_nonStreaming1 =
+    testWith handlers client
+  where
+    handlers :: [Server.SomeRpcHandler IO]
+    handlers = [Server.someRpcHandler @Trivial undefined]
+
+    client :: Client.Connection -> IO ByteString
+    client conn =
+        Client.withRPC conn def (Proxy @Trivial) $ \call -> do
+          Client.sendFinalInput call mempty
+          fst <$> Client.recvFinalOutput call
+
+-- | Like 'test_lowLevel_nonStreaming1, but without sending the input
+test_lowLevel_nonStreaming2 :: Assertion
+test_lowLevel_nonStreaming2 =
+    testWith handlers client
+  where
+    handlers :: [Server.SomeRpcHandler IO]
+    handlers = [Server.someRpcHandler @Trivial undefined]
+
+    client :: Client.Connection -> IO ByteString
+    client conn =
+        Client.withRPC conn def (Proxy @Trivial) $ \call -> do
+          fst <$> Client.recvFinalOutput call
+
+{-------------------------------------------------------------------------------
+  With Protobuf
+
+  Crucially, this uses 'fromMethods', which is not unlikely to have undefineds
+  in it during development.
+
+  The @test_routeGuide_nonStreaming<N>@ tests all use @undefined@ somewhere in
+  the declaration of the methods, but differ on how much is defined.
+-------------------------------------------------------------------------------}
+
+-- | Completely @undefined@ 'Methods'
+--
+-- This is different from 'test_routeGuide_nonStreaming2', where the /skeleton/
+-- is defined but the individual handlers are not: here we cannot even construct
+-- the list without triggering an exception, forcing us to be very careful with
+-- exception handling during lookup.
+test_routeGuide_nonStreaming1 :: Assertion
+test_routeGuide_nonStreaming1 =
+    testWith (Server.fromMethods methods) client
+  where
+    methods :: Server.Methods IO (Server.ProtobufMethodsOf RouteGuide)
+    methods = undefined
+
+    client :: Client.Connection -> IO (Proto Feature)
+    client conn = Client.nonStreaming conn (rpc @GetFeature) defMessage
+
+test_routeGuide_nonStreaming2 :: Assertion
+test_routeGuide_nonStreaming2 =
+    testWith (Server.fromMethods methods) client
+  where
+    methods :: Server.Methods IO (Server.ProtobufMethodsOf RouteGuide)
+    methods =
+          Server.Method undefined
+        $ Server.Method undefined
+        $ Server.Method undefined
+        $ Server.Method undefined
+        $ Server.NoMoreMethods
+
+    client :: Client.Connection -> IO (Proto Feature)
+    client conn = Client.nonStreaming conn (rpc @GetFeature) defMessage
+
+test_routeGuide_nonStreaming3 :: Assertion
+test_routeGuide_nonStreaming3 =
+    testWith (Server.fromMethods methods) client
+  where
+    methods :: Server.Methods IO (Server.ProtobufMethodsOf RouteGuide)
+    methods =
+          Server.Method (Server.mkNonStreaming undefined)
+        $ Server.Method undefined
+        $ Server.Method undefined
+        $ Server.Method undefined
+        $ Server.NoMoreMethods
+
+    client :: Client.Connection -> IO (Proto Feature)
+    client conn = Client.nonStreaming conn (rpc @GetFeature) defMessage
+
+{-------------------------------------------------------------------------------
+  Auxiliary: test setup
+
+  We don't use the test clients/server infrastructure here, since this issue
+  is about exception handling, and the test harnass does quite a bit of
+  exception processing.
+-------------------------------------------------------------------------------}
+
+testWith ::
+     [Server.SomeRpcHandler IO]
+  -> (Client.Connection -> IO a)
+  -> Assertion
+testWith handlers client = do
+    server <- Server.mkGrpcServer serverParams handlers
+    Server.forkServer def serverConfig server $ \runningServer -> do
+      serverPort <- Server.getServerPort runningServer
+
+      let serverAddr = Client.ServerInsecure $ Client.Address {
+           addressHost      = "127.0.0.1"
+         , addressPort      = serverPort
+         , addressAuthority = Nothing
+         }
+      Client.withConnection def serverAddr $ \conn ->
+        checkClientReceivesUndefined $ client conn
+  where
+    serverConfig :: Server.ServerConfig
+    serverConfig = Server.ServerConfig {
+          serverInsecure = Just $ Server.InsecureConfig (Just "127.0.0.1") 0
+        , serverSecure   = Nothing
+        }
+
+    serverParams :: Server.ServerParams
+    serverParams = def {
+          Server.serverTopLevel = \handler unmask req resp -> do
+            _result :: Either SomeException () <- try $ handler unmask req resp
+            -- Ignore any exceptions
+            return ()
+        }
+
+-- | Verify that the client  is notified of the undefined handler
+checkClientReceivesUndefined ::
+     HasCallStack
+  => IO a -> Assertion
+checkClientReceivesUndefined k = do
+    result <- try k
+    case result of
+      Right _ ->
+        assertFailure "Unexpected successful response"
+      Left err ->
+        case grpcErrorMessage err of
+          Just msg ->
+            assertBool (show (Text.unpack msg) ++ " contains \"undefined\"") $
+              "undefined" `Text.isInfixOf` msg
+          Nothing ->
+            assertFailure "Missing error message"
diff --git a/test-grapesy/Test/Sanity/Any.hs b/test-grapesy/Test/Sanity/Any.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/Any.hs
@@ -0,0 +1,101 @@
+{-# LANGUAGE OverloadedLabels  #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Sanity.Any (tests) where
+
+import Control.Exception
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client (rpc)
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Common.Protobuf.Any (Any)
+import Network.GRPC.Common.Protobuf.Any qualified as Any
+import Network.GRPC.Server.StreamType qualified as Server
+
+import Test.Driver.ClientServer
+
+import Proto.API.Ping
+import Proto.API.TestAny
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.Any" [
+      testCase "Any"    testAny
+    , testCase "Status" testStatus
+    ]
+
+{-------------------------------------------------------------------------------
+  Using the 'Any' wrapper
+-------------------------------------------------------------------------------}
+
+testAny :: Assertion
+testAny = testClientServer $ ClientServerTest {
+      config = def
+    , server = [Server.fromMethod @Reverse $ Server.ServerHandler handler]
+    , client = simpleTestClient $ \conn -> do
+        let req, expected :: Proto TestAnyMsg
+            req      = withDetails [Any.pack detail1, Any.pack detail2]
+            expected = withDetails [Any.pack detail2, Any.pack detail1]
+
+        resp <- Client.nonStreaming conn (rpc @Reverse) req
+        assertEqual "" expected $ resp
+    }
+  where
+    handler :: Proto TestAnyMsg -> IO (Proto TestAnyMsg)
+    handler msg = return $ msg & #details %~ reverse
+
+    detail1 :: Proto A
+    detail1 = defMessage & #a .~ 1
+
+    detail2 :: Proto B
+    detail2 = defMessage & #b .~ 1
+
+    withDetails :: [Proto Any] -> Proto TestAnyMsg
+    withDetails details =
+        defMessage
+          & #message .~ "foo"
+          & #details .~ details
+
+{-------------------------------------------------------------------------------
+  Protobuf-specific error details (which relies on 'Any')
+-------------------------------------------------------------------------------}
+
+testStatus :: Assertion
+testStatus = testClientServer $ ClientServerTest {
+      config = def {
+          isExpectedServerException = \e ->
+            case fromException e of
+              Just err'  -> grpcError err' == GrpcNotFound
+              _otherwise -> False
+        }
+    , server = [
+          Server.fromMethod @Ping $ Server.ServerHandler $ \_req ->
+            throwProtobufErrorHom protobufError
+        ]
+    , client = simpleTestClient $ \conn -> do
+        mResp :: Either GrpcException (Proto PongMessage) <-
+          try $ Client.nonStreaming conn (rpc @Ping) defMessage
+        case mResp of
+          Right _   -> assertFailure "Expected exception"
+          Left  err ->
+            assertEqual "" (Right protobufError) $
+              toProtobufErrorHom err
+    }
+  where
+    protobufError :: ProtobufError (Proto A)
+    protobufError = ProtobufError {
+          protobufErrorCode    = GrpcNotFound
+        , protobufErrorMessage = Just "Not found"
+        , protobufErrorDetails = [detail1, detail2]
+        }
+
+
+    detail1, detail2 :: Proto A
+    detail1 = defMessage & #a .~ 1
+    detail2 = defMessage & #a .~ 2
diff --git a/test-grapesy/Test/Sanity/BrokenDeployments.hs b/test-grapesy/Test/Sanity/BrokenDeployments.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/BrokenDeployments.hs
@@ -0,0 +1,426 @@
+-- Intentionally /NOT/ enabling OverloadedStrings.
+-- This forces us to be precise about encoding issues.
+
+{-# LANGUAGE OverloadedLabels #-}
+
+module Test.Sanity.BrokenDeployments (tests) where
+
+import Control.Concurrent
+import Control.Exception
+import Data.ByteString.Char8 qualified as BS.Strict.Char8
+import Data.ByteString.UTF8 qualified as BS.Strict.UTF8
+import Data.IORef
+import Data.Text qualified as Text
+import Network.HTTP.Types qualified as HTTP
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server.StreamType qualified as Server
+
+import Test.Driver.ClientServer
+import Test.Util.RawTestServer
+
+import Proto.API.Ping
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.BrokenDeployments" [
+      testGroup "status" [
+          testCase "non200"     test_statusNon200
+        , testCase "non200Body" test_statusNon200Body
+        ]
+    , testGroup "ContentType" [
+          testCase "nonGrpcRegular"      test_nonGrpcContentTypeRegular
+        , testCase "missingRegular"      test_missingContentTypeRegular
+        , testCase "nonGrpcTrailersOnly" test_nonGrpcContentTypeTrailersOnly
+        , testCase "missingTrailersOnly" test_missingContentTypeTrailersOnly
+      ]
+    , testGroup "Omit" [
+         testCase "status"        test_omitStatus
+       , testCase "statusMessage" test_omitStatusMessage
+       , testCase "allTrailers"   test_omitAllTrailers
+       ]
+    , testGroup "Invalid" [
+          testCase "statusMessage"   test_invalidStatusMessage
+        , testCase "requestMetadata" test_invalidRequestMetadata
+        , testCase "trailerMetadata" test_invalidTrailerMetadata
+        ]
+    , testGroup "Undefined" [
+          testCase "output" test_undefinedOutput
+        ]
+    , testGroup "Timeout" [
+          testCase "serverIgnoresTimeout" test_serverIgnoresTimeout
+        ]
+    ]
+
+connParams :: Client.ConnParams
+connParams = def {
+      Client.connVerifyHeaders = True
+    }
+
+{-------------------------------------------------------------------------------
+  HTTP Status
+-------------------------------------------------------------------------------}
+
+-- | Test HTTP to gRPC status code mapping
+--
+-- We don't test all codes here; we'd just end up duplicating the logic in
+-- 'classifyServerResponse'. We just check one representative value.
+test_statusNon200 :: Assertion
+test_statusNon200 = respondWith response $ \addr -> do
+    mResp :: Either GrpcException (Proto PongMessage) <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          fst <$> Client.recvFinalOutput call
+    case mResp of
+      Left err | grpcError err == GrpcInternal ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseStatus = HTTP.badRequest400
+        }
+
+-- | Ensure that we include the response body for errors, if any
+test_statusNon200Body :: Assertion
+test_statusNon200Body = respondWith response $ \addr -> do
+    mResp :: Either GrpcException (Proto PongMessage) <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          fst <$> Client.recvFinalOutput call
+    case mResp of
+      Left err
+        | grpcError err == GrpcInternal
+        , Just msg <- grpcErrorMessage err
+        , Text.pack "Server supplied custom error" `Text.isInfixOf` msg ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseStatus = HTTP.badRequest400
+        , responseBody   = BS.Strict.Char8.pack customError
+        }
+
+    customError :: String
+    customError = "Server supplied custom error"
+
+{-------------------------------------------------------------------------------
+  Content-type
+-------------------------------------------------------------------------------}
+
+test_invalidContentType :: Response -> Assertion
+test_invalidContentType response = respondWith response $ \addr -> do
+    mResp <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          fst <$> Client.recvFinalOutput call
+    case mResp of
+      Left GrpcException{grpcError = GrpcUnknown} ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+
+test_nonGrpcContentTypeRegular :: Assertion
+test_nonGrpcContentTypeRegular = test_invalidContentType def {
+      responseHeaders = [
+          asciiHeader "content-type" "someInvalidContentType"
+        ]
+    }
+
+test_missingContentTypeRegular :: Assertion
+test_missingContentTypeRegular = test_invalidContentType def {
+      responseHeaders = [ ]
+    }
+
+test_nonGrpcContentTypeTrailersOnly :: Assertion
+test_nonGrpcContentTypeTrailersOnly = test_invalidContentType def {
+      responseHeaders = [
+          asciiHeader "grpc-status" "0"
+        , asciiHeader "content-type" "someInvalidContentType"
+        ]
+    }
+
+test_missingContentTypeTrailersOnly :: Assertion
+test_missingContentTypeTrailersOnly = test_invalidContentType def {
+      responseHeaders = [
+          asciiHeader "grpc-status" "0"
+        ]
+    }
+
+{-------------------------------------------------------------------------------
+  Omit trailers
+-------------------------------------------------------------------------------}
+
+test_omitStatus :: Assertion
+test_omitStatus = respondWith response $ \addr -> do
+    mResp :: Either GrpcException
+                    (StreamElem NoMetadata (Proto PongMessage)) <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          Client.recvOutput call
+    case mResp of
+      Left err
+        | grpcError err == GrpcUnknown
+        , grpcMessageContains err "grpc-status" ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseTrailers = [
+              asciiHeader "grpc-message" "Message but no status"
+            ]
+        }
+
+test_omitStatusMessage :: Assertion
+test_omitStatusMessage = respondWith response $ \addr -> do
+    mResp :: Either GrpcException
+                    (StreamElem NoMetadata (Proto PongMessage)) <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          Client.recvOutput call
+    case mResp of
+      Right (NoMoreElems _) ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseTrailers = [
+              asciiHeader "grpc-status" "0"
+            ]
+        }
+
+test_omitAllTrailers :: Assertion
+test_omitAllTrailers = respondWith response $ \addr -> do
+    mResp :: Either GrpcException
+                    (StreamElem NoMetadata (Proto PongMessage)) <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          Client.recvOutput call
+    case mResp of
+      Left err
+        | grpcError err == GrpcUnknown
+        , grpcMessageContains err "closed without trailers" ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseTrailers = []
+        }
+
+{-------------------------------------------------------------------------------
+  Invalid headers
+
+  The gRPC spec mandates that we /MUST NOT/ throw away invalid headers. This
+  is done as a matter of default for all headers in grapesy, except the ones
+  that it really needs to operate. To access these invalid values, users do
+  however need to use the low-level API.
+-------------------------------------------------------------------------------}
+
+test_invalidStatusMessage :: Assertion
+test_invalidStatusMessage = respondWith response $ \addr -> do
+    mResp :: StreamElem
+               Client.ProperTrailers'
+               (InboundMeta, Proto PongMessage) <-
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          Client.recvOutputWithMeta call
+    case mResp of
+      NoMoreElems trailers
+        | Left invalid <- Client.properTrailersGrpcMessage trailers
+        , [ (_, headerValue) ] <- invalidHeaders invalid
+        , headerValue == BS.Strict.Char8.pack someInvalidMessage
+        ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseTrailers = [
+              asciiHeader "grpc-status" "13" -- 'GrpcInternal'
+            , asciiHeader "grpc-message" someInvalidMessage
+            ]
+        }
+
+    someInvalidMessage :: String
+    someInvalidMessage = "This is invalid: %X"
+
+test_invalidRequestMetadata :: Assertion
+test_invalidRequestMetadata = respondWith response $ \addr -> do
+    mResp :: Either
+               (Client.TrailersOnly'    HandledSynthesized)
+               (Client.ResponseHeaders' HandledSynthesized) <-
+      Client.withConnection connParams' (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendEndOfInput call
+          Client.recvInitialResponse call
+    case mResp of
+      Right headers
+        | Left invalid <- Client.responseUnrecognized headers
+        , [ (_, headerValue) ] <- invalidHeaders invalid
+        , headerValue == BS.Strict.UTF8.fromString someInvalidMetadata
+        ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    -- In this case we do /NOT/ want to verify all headers
+    -- (the whole point is that we can access the invalid header value)
+    connParams' :: Client.ConnParams
+    connParams' = def { Client.connVerifyHeaders = False }
+
+    response :: Response
+    response = def {
+          responseHeaders = [
+              asciiHeader "content-type" "application/grpc"
+            , utf8Header "some-custom-header" someInvalidMetadata
+            ]
+        }
+
+    someInvalidMetadata :: String
+    someInvalidMetadata = "This is invalid: 你好"
+
+test_invalidTrailerMetadata :: Assertion
+test_invalidTrailerMetadata = respondWith response $ \addr -> do
+    mResp :: StreamElem
+               Client.ProperTrailers'
+               (InboundMeta, Proto PongMessage) <-
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn def (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          Client.recvOutputWithMeta call
+    case mResp of
+      NoMoreElems trailers
+        | Left invalid <- Client.properTrailersUnrecognized trailers
+        , [ (_, headerValue) ] <- invalidHeaders invalid
+        , headerValue == BS.Strict.UTF8.fromString someInvalidMetadata
+        ->
+        return ()
+      _otherwise ->
+        assertFailure $ "Unexpected response: " ++ show mResp
+  where
+    response :: Response
+    response = def {
+          responseTrailers = [
+              asciiHeader "grpc-status" "0"
+            , utf8Header "some-custom-trailer" someInvalidMetadata
+            ]
+        }
+
+    someInvalidMetadata :: String
+    someInvalidMetadata = "This is invalid: 你好"
+
+grpcMessageContains :: GrpcException -> String -> Bool
+grpcMessageContains GrpcException{grpcErrorMessage} str =
+    case grpcErrorMessage of
+      Just msg -> Text.pack str `Text.isInfixOf` msg
+      Nothing  -> False
+
+{-------------------------------------------------------------------------------
+  Undefined values
+-------------------------------------------------------------------------------}
+
+test_undefinedOutput :: Assertion
+test_undefinedOutput = do
+    st <- newIORef 0
+    testClientServer $ ClientServerTest {
+        config = def {
+            isExpectedServerException = isDeliberateException
+          }
+      , server = [Server.fromMethod @Ping $ Server.mkNonStreaming (handler st)]
+      , client = simpleTestClient $ \conn -> do
+
+          -- The first time the handler is invoked, it attempts to enqueue a
+          -- an undefined message (one containing a pure exception). Prior to
+          -- #235 this would result in undefined behaviour, probably the server
+          -- disconnecting. What should happen instead is that this exception
+          -- is thrown in the handler, caught, sent to the client as a
+          -- 'GrpcException', and re-raised in the client.
+          mResp1 :: Either GrpcException (Proto PongMessage) <- try $
+            Client.nonStreaming conn (Client.rpc @Ping) (defMessage & #id .~ 1)
+          case mResp1 of
+            Left err | Just msg <- grpcErrorMessage err ->
+              assertBool "" $ Text.pack "uhoh" `Text.isInfixOf` msg
+            _otherwise ->
+              assertFailure "Unexpected response"
+
+          -- Meanwhile, the server should just continue running; the /second/
+          -- invocation of the handler should succeed normally.
+          mResp2 :: Either GrpcException (Proto PongMessage) <- try $
+            Client.nonStreaming conn (Client.rpc @Ping) (defMessage & #id .~ 2)
+          case mResp2 of
+            Right resp ->
+              assertEqual "" 2 $ resp ^. #id
+            _otherwise ->
+              assertFailure "Unexpected response"
+      }
+  where
+    -- Server handler attempts to enqueue an undefined message
+    handler :: IORef Int -> Proto PingMessage -> IO (Proto PongMessage)
+    handler st req = do
+        isFirst <- atomicModifyIORef st $ \i -> (succ i, i == 0)
+        if isFirst
+          then return $ throw $ DeliberateException (userError "uhoh")
+          else return $ defMessage & #id .~ req ^. #id
+
+{-------------------------------------------------------------------------------
+  Timeouts
+-------------------------------------------------------------------------------}
+
+-- | Check that timeouts don't depend on the server
+--
+-- When a timeout is set for an RPC, the server should respect it, but the
+-- client should not /depend/ on the server respecting it.
+--
+-- See also <https://github.com/well-typed/grapesy/issues/221>.
+test_serverIgnoresTimeout :: Assertion
+test_serverIgnoresTimeout = respondWithIO response $ \addr -> do
+    mResp :: Either GrpcException
+                    (StreamElem NoMetadata (Proto PongMessage)) <- try $
+      Client.withConnection connParams (Client.ServerInsecure addr) $ \conn ->
+        Client.withRPC conn callParams (Proxy @Ping) $ \call -> do
+          Client.sendFinalInput call defMessage
+          Client.recvOutput call
+    case mResp of
+      Left e | grpcError e == GrpcDeadlineExceeded ->
+        return ()
+      Left e ->
+        assertFailure $ "unexpected error: " ++ show e
+      Right _ ->
+        assertFailure "Timeout did not trigger"
+  where
+    response :: IO Response
+    response = do
+        threadDelay 10_000_000
+        return def
+
+    callParams :: Client.CallParams Ping
+    callParams = def {
+          Client.callTimeout = Just $
+            Client.Timeout Client.Millisecond (Client.TimeoutValue 100)
+        }
+
diff --git a/test-grapesy/Test/Sanity/Compression.hs b/test-grapesy/Test/Sanity/Compression.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/Compression.hs
@@ -0,0 +1,148 @@
+{-# LANGUAGE OverloadedLabels  #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Sanity.Compression (tests) where
+
+import Control.Monad
+import Data.IORef
+import Data.Maybe (isJust)
+import Data.Text (Text)
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+import Network.GRPC.Server qualified as Server
+
+import Test.Driver.ClientServer
+
+import Proto.API.Helloworld
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.Compression" [
+      testCase "multipleRPC"  test_multipleRPC
+    , testCase "multipleMsgs" test_multipleMsgs
+    ]
+
+{-------------------------------------------------------------------------------
+  Individual tests
+-------------------------------------------------------------------------------}
+
+-- | Test that compression is enabled for the /second/ RPC
+test_multipleRPC :: Assertion
+test_multipleRPC = do
+    counter <- newIORef 0
+    testClientServer $ ClientServerTest {
+        config = def
+      , server = [Server.someRpcHandler $ handleNonStreaming counter]
+      , client = simpleTestClient $ \conn ->
+            replicateM_ 2 $ do
+              Client.withRPC conn def (Proxy @SayHello) $ \call -> do
+                Client.sendFinalInput call req
+                mResp <- StreamElem.value <$> Client.recvOutputWithMeta call
+                case mResp of
+                  Nothing -> assertFailure "Expected response"
+                  Just (meta, resp) -> do
+                    -- /All/ responses from the server should be compressed
+                    -- (the request tells the server what the client supports)
+                    assertEqual "" True $
+                      isJust (inboundCompressedSize meta)
+                    assertEqual "" compressibleName $
+                      resp ^. #message
+    }
+  where
+    req :: Proto HelloRequest
+    req = defMessage & #name .~ compressibleName
+
+-- | Test that multiple messages on /one/ RPC will either all be compressed or
+-- all uncompressed.
+test_multipleMsgs :: Assertion
+test_multipleMsgs = do
+    counter <- newIORef 0
+    testClientServer $ ClientServerTest {
+        config = def
+      , server = [Server.someRpcHandler $ handleBidiStreaming counter]
+      , client = simpleTestClient $ \conn ->
+          replicateM_ 2 $
+            Client.withRPC conn def (Proxy @SayHelloBidiStream) $ \call -> do
+              replicateM_ 2 $ do
+                Client.sendNextInput call req
+                mResp <- StreamElem.value <$> Client.recvOutputWithMeta call
+                case mResp of
+                  Nothing -> assertFailure "Expected response"
+                  Just (meta, resp) -> do
+                    -- /All/ responses from the server should be compressed
+                    -- (the request tells the server what the client supports)
+                    assertEqual "" True $
+                      isJust (inboundCompressedSize meta)
+                    assertEqual "" compressibleName $
+                      resp ^. #message
+              Client.sendEndOfInput call
+      }
+  where
+    req :: Proto HelloRequest
+    req = defMessage & #name .~ compressibleName
+
+{-------------------------------------------------------------------------------
+  Server handlers
+-------------------------------------------------------------------------------}
+
+handleNonStreaming :: IORef Int -> Server.RpcHandler IO SayHello
+handleNonStreaming counter = Server.mkRpcHandler $ \call -> do
+    mElem <- Server.recvInputWithMeta call
+    case mElem of
+      FinalElem (meta, req) NoMetadata -> do
+        callNo <- atomicModifyIORef counter $ \i -> (succ i, i)
+
+        -- We expect all messages to be compressed except the first (the client
+        -- does not yet know which compression algorithms the server supports)
+        let expectCompression :: Bool
+            expectCompression = callNo > 0
+        assertEqual "" expectCompression $
+          isJust (inboundCompressedSize meta)
+
+        Server.sendFinalOutput call (
+            defMessage & #message .~ (req ^. #name)
+          , NoMetadata
+          )
+      _otherwise ->
+        assertFailure "expected FinalElem"
+
+handleBidiStreaming :: IORef Int -> Server.RpcHandler IO SayHelloBidiStream
+handleBidiStreaming counter = Server.mkRpcHandler $ \call -> do
+    isFirstCall <- atomicModifyIORef counter $ \i -> (succ i, i == 0)
+
+    let loop :: IO ()
+        loop = do
+          mElem <- Server.recvInputWithMeta call
+          case mElem of
+            NoMoreElems NoMetadata ->
+              Server.sendTrailers call NoMetadata
+            StreamElem (meta, req) -> do
+              -- The compression algorithm is established once at the start of
+              -- the request; we cannot start compression halfway a conversation
+              let expectCompression :: Bool
+                  expectCompression = not isFirstCall
+              assertEqual "" expectCompression $
+                isJust (inboundCompressedSize meta)
+
+              Server.sendNextOutput call $
+                defMessage & #message .~ (req ^. #name)
+              loop
+            FinalElem{} ->
+              assertFailure "Unexpected FinalElem"
+
+    loop
+
+{-------------------------------------------------------------------------------
+  Auxiliary
+-------------------------------------------------------------------------------}
+
+compressibleName :: Text
+compressibleName = mconcat (replicate 100 "John")
diff --git a/test-grapesy/Test/Sanity/Disconnect.hs b/test-grapesy/Test/Sanity/Disconnect.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/Disconnect.hs
@@ -0,0 +1,414 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+-- | Handling of client or server disconnections occurring with ongoing RPCs on
+-- a shared connection.
+--
+-- When a server disconnects, we expect:
+--
+-- 1. All current calls fail with 'Client.ServerDisconnected'
+-- 2. Future calls (after reconnection) succeed
+--
+-- When a client disconnects, we expect:
+--
+-- 1. The handlers dealing with that client (i.e. on that connection) should
+--    fail with 'Server.ClientDisconnected'
+-- 2. Future calls (after reconnection) succeed
+module Test.Sanity.Disconnect (tests) where
+
+import Control.Concurrent
+import Control.Concurrent.Async
+import Control.Concurrent.STM
+import Control.Exception
+import Control.Monad
+import Data.ByteString.Lazy qualified as Lazy (ByteString)
+import Data.IORef
+import Data.Word
+import Foreign.C.Types (CInt(..))
+import Network.Socket
+import System.Posix
+import Test.Tasty
+import Test.Tasty.HUnit
+import Text.Read hiding (step)
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.Binary qualified as Binary
+import Network.GRPC.Common
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.Binary qualified as Binary
+import Network.GRPC.Server.Run
+
+import Proto.API.Trivial
+
+import Test.Util
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.Disconnect" [
+      testCase "client" test_clientDisconnect
+    , testCase "server" test_serverDisconnect
+    ]
+
+{-------------------------------------------------------------------------------
+  Disconnecting clients
+-------------------------------------------------------------------------------}
+
+-- | Two separate clients make many concurrent calls, one of them disconnects.
+test_clientDisconnect :: Assertion
+test_clientDisconnect = do
+    -- Create the server
+    disconnectCounter1 <- newIORef 0
+    disconnectCounter2 <- newIORef 0
+    server <-
+      Server.mkGrpcServer def [
+          Server.someRpcHandler $
+              Server.mkRpcHandler @RPC1 $ echoHandler (Just disconnectCounter1)
+        , Server.someRpcHandler $
+              Server.mkRpcHandler @RPC2 $ echoHandler (Just disconnectCounter2)
+        ]
+
+    -- Start server
+    let serverConfig = ServerConfig {
+            serverInsecure = Just $ InsecureConfig {
+                insecureHost = Just "127.0.0.1"
+              , insecurePort = 0
+              }
+          , serverSecure = Nothing
+          }
+    portSignal <- newEmptyMVar
+    void $ forkIO $ forkServer def serverConfig server $ \runningServer -> do
+      putMVar portSignal =<< getServerPort runningServer
+      waitServer runningServer
+
+    -- Wait for the server to signal its port
+    serverPort <- readMVar portSignal
+    let serverAddress =
+          Client.ServerInsecure Client.Address {
+              addressHost      = "127.0.0.1"
+            , addressPort      = serverPort
+            , addressAuthority = Nothing
+            }
+
+
+    -- Start a client in a separate process
+    let numCalls = 10
+    dyingChild <- forkProcess $
+      Client.withConnection def serverAddress $ \conn -> do
+        inLockstep conn (Proxy @RPC1) numCalls NeverTerminate $ \results _getFinal -> do
+          -- Wait until we are sure that all clients have started their RPC,
+          -- then kill the process. This avoids race conditions and guarantees
+          -- that the server will see @numCalls@ clients disconnecting.
+          _ <- waitForHistoryOfMinLen results 1
+          c_exit 1
+
+    -- Start two more clients; these will not disconnect
+    let numSteps = 5
+    (result1, result2) <- concurrently
+      ( Client.withConnection def serverAddress $ \conn -> do
+          inLockstep conn (Proxy @RPC1) numCalls (TerminateAfter numSteps) $ \_results getFinal ->
+            getFinal
+      )
+      ( Client.withConnection def serverAddress $ \conn -> do
+          inLockstep conn (Proxy @RPC2) numCalls (TerminateAfter numSteps) $ \_results getFinal ->
+            getFinal
+      )
+
+    -- Wait for the forked process to terminate
+    _status <- getProcessStatus True False dyingChild
+
+    -- All calls by clients in /this/ process (not the ones we killed) should
+    -- have finished normally
+    let expectedResult = [
+            replicate numCalls (StepOk i)
+          | i <- reverse [1 .. numSteps]
+          ]
+    assertEqual "" expectedResult result1
+    assertEqual "" expectedResult result2
+
+    -- We should also see only @numCalls@ client disconnects for the first
+    -- handler and none for the second
+    clientDisconnects1 <- readIORef disconnectCounter1
+    clientDisconnects2 <- readIORef disconnectCounter2
+    assertEqual "" numCalls clientDisconnects1
+    assertEqual "" 0        clientDisconnects2
+
+-- We need to use this to properly simulate the execution environment crashing
+-- in an unrecoverable way. In particular, we don't want to give the program a
+-- chance to do any of its normal exception handling/cleanup behavior.
+foreign import ccall unsafe "exit" c_exit :: CInt -> IO ()
+
+{-------------------------------------------------------------------------------
+  Disconnecting servers
+-------------------------------------------------------------------------------}
+
+-- | Client makes many concurrent calls, server disconnects
+test_serverDisconnect :: Assertion
+test_serverDisconnect = withTemporaryFile $ \ipcFile -> do
+    -- We use a temporary file as a very rudimentary means of inter-process
+    -- communication so the server (which runs in a separate process) can make
+    -- the client aware of the port it is assigned by the OS.
+    let ipcWrite :: PortNumber -> IO ()
+        ipcWrite port = do
+          writeFile ipcFile (show port)
+
+        ipcRead :: IO PortNumber
+        ipcRead = do
+          fmap (readMaybe @PortNumber) (readFile ipcFile) >>= \case
+            Nothing -> do
+              ipcRead
+            Just p -> do
+              writeFile ipcFile ""
+              return p
+
+    -- Create the server
+    server <-
+      Server.mkGrpcServer def [
+          Server.someRpcHandler $
+              Server.mkRpcHandler @RPC1 $ echoHandler Nothing
+        ]
+
+    let serverConfig = ServerConfig {
+            serverInsecure = Just $ InsecureConfig {
+                insecureHost = Just "127.0.0.1"
+              , insecurePort = 0
+              }
+          , serverSecure = Nothing
+          }
+
+        -- Starts the server in a new process. Gives back an action that kills
+        -- the created server process.
+        startServer :: IO (IO ())
+        startServer = do
+          serverPid <-
+            forkProcess $
+              forkServer def serverConfig server $ \runningServer -> do
+                ipcWrite =<< getServerPort runningServer
+                waitServer runningServer
+          return $ signalProcess sigKILL serverPid
+
+    -- Start server, get the initial port
+    killServer    <- startServer
+    port1         <- ipcRead
+    signalRestart <- newEmptyMVar
+    let serverAddress port =
+          Client.ServerInsecure Client.Address {
+              addressHost      = "127.0.0.1"
+            , addressPort      = port
+            , addressAuthority = Nothing
+            }
+
+        reconnectPolicy :: Client.ReconnectPolicy
+        reconnectPolicy = go 0
+          where
+            go :: Int -> Client.ReconnectPolicy
+            go n
+              | n == 5
+              = Client.ReconnectAfter def $ do
+                  killRestarted <- startServer
+                  port2 <- ipcRead
+                  putMVar signalRestart killRestarted
+                  return $
+                    Client.ReconnectAfter
+                      (Client.ReconnectToNew $ serverAddress port2)
+                      (pure Client.DontReconnect)
+              | otherwise
+              = Client.ReconnectAfter def $ do
+                  threadDelay 10000
+                  return $ go (n + 1)
+
+        connParams :: Client.ConnParams
+        connParams = def { Client.connReconnectPolicy = reconnectPolicy }
+
+    Client.withConnection connParams (serverAddress port1) $ \conn -> do
+      let numCalls = 10
+      results <-
+        inLockstep conn (Proxy @RPC1) numCalls NeverTerminate $ \results getFinal -> do
+          -- Once all clients have started their RPC, kill the server
+          _ <- waitForHistoryOfMinLen results 1
+          killServer
+          getFinal
+
+      -- All calls should have failed (but we don't know in which step)
+      assertEqual "" numCalls $ length $ filter stepFailed (concat results)
+
+      -- New calls should succeed (after reconnection)
+      killRestarted <- takeMVar signalRestart
+      result <-
+        inLockstep conn (Proxy @RPC1) numCalls (TerminateAfter 1) $ \_results getFinal ->
+          getFinal
+
+      let expectedResult = [replicate numCalls $ StepOk 1]
+      assertEqual "" expectedResult result
+
+      -- Do not leave the server process hanging around
+      killRestarted
+
+{-------------------------------------------------------------------------------
+  Auxiliary: echo handler
+-------------------------------------------------------------------------------}
+
+-- | Echos any input
+echoHandler ::
+     TrivialRpc rpc
+  => Maybe (IORef Int)
+  -> Server.Call rpc -> IO ()
+echoHandler disconnectCounter call =
+    trackDisconnects disconnectCounter $ loop
+  where
+    loop :: IO ()
+    loop = do
+        inp <- Binary.recvInput @Word64 call
+        case inp of
+          StreamElem n   -> Binary.sendNextOutput @Word64 call n >> loop
+          FinalElem  n _ -> Binary.sendFinalOutput @Word64 call (n, NoMetadata)
+          NoMoreElems  _ -> Server.sendTrailers call NoMetadata
+
+    trackDisconnects :: Maybe (IORef Int) -> IO () -> IO ()
+    trackDisconnects Nothing        = id
+    trackDisconnects (Just counter) =
+        handle $ \(_e :: Server.ClientDisconnected) ->
+          atomicModifyIORef' counter $ \n -> (n + 1, ())
+
+{-------------------------------------------------------------------------------
+  Bunch of clients all executing in lockstep
+-------------------------------------------------------------------------------}
+
+data NumSteps = TerminateAfter Int | NeverTerminate
+
+data Results = Results {
+      -- | Results for the current step
+      resultsCurr :: TVar [StepResult]
+
+      -- | Number of the current step
+    , resultsStep :: Int
+
+      -- | Previous results (in reverse order)
+    , resultsHist :: [[StepResult]]
+    }
+
+data StepResult = StepOk Int | StepFailed SomeException
+  deriving stock (Show)
+
+stepFailed :: StepResult -> Bool
+stepFailed StepOk{}     = False
+stepFailed StepFailed{} = True
+
+instance Eq StepResult where
+  StepOk     i == StepOk     i' = i == i'
+  StepFailed _ == StepFailed _  = True -- the exception is merely for debugging
+  StepOk     _ == StepFailed _  = False
+  StepFailed _ == StepOk     _  = False
+
+initResults :: IO (TVar Results)
+initResults = do
+    resultsCurr <- newTVarIO []
+    newTVarIO Results{
+        resultsCurr
+      , resultsStep = 1
+      , resultsHist = []
+      }
+
+-- | Keep collecting results (never terminates)
+collectResults :: Int -> TVar Results -> IO a
+collectResults numClients results =
+    forever $
+      atomically $ do
+        Results{resultsCurr, resultsStep, resultsHist} <- readTVar results
+        current <- readTVar resultsCurr
+        if length current < numClients
+          then retry
+          else do
+            current' <- newTVar []
+            writeTVar results Results{
+                resultsCurr = current'
+              , resultsStep = succ resultsStep
+              , resultsHist = current : resultsHist
+              }
+
+-- | Get the 'TVar' for the specified step, blocking until that step is reached
+--
+-- This is executed by each client on each step. As a result, we can assume that
+-- the required step can never be /before/ the current step (because all clients
+-- must deliver their result for the current step before the step advances).
+waitForStep :: TVar Results -> Int -> IO (TVar [StepResult])
+waitForStep results step = atomically $ do
+    Results{resultsCurr, resultsStep} <- readTVar results
+    if resultsStep < step
+      then retry
+      else return resultsCurr
+
+-- | Wait until a history of at least the specified length is ready
+waitForHistoryOfMinLen :: TVar Results -> Int -> IO [[StepResult]]
+waitForHistoryOfMinLen results numSteps = atomically $ do
+    Results{resultsHist} <- readTVar results
+    if length resultsHist < numSteps
+      then retry
+      else return resultsHist
+
+inLockstep :: forall rpc a.
+     TrivialRpc rpc
+  => Client.Connection -- ^ Server to connect to
+  -> Proxy rpc         -- ^ Method to call
+  -> Int               -- ^ Number of clients
+  -> NumSteps          -- ^ How many steps each client should take
+  -> (TVar Results -> IO [[StepResult]] -> IO a)
+     -- ^ Monitor the results
+     --
+     -- This is also passed a function to get the /final/ results, after all
+     -- clients have terminated. If some clients never terminate, this function
+     -- will block indefinitely.
+  -> IO a
+inLockstep conn rpc numClients numSteps monitor = do
+    results <- initResults
+    withAsync (collectResults numClients results) $ \_ ->
+      withAsync (runClients results) $ \clients ->
+        monitor results (wait clients)
+  where
+    runClients :: TVar Results -> IO [[StepResult]]
+    runClients results = do
+        replicateConcurrently_ numClients $
+          Client.withRPC conn def rpc (client results)
+        resultsHist <$> readTVarIO results
+
+    client :: TVar Results -> Client.Call rpc -> IO ()
+    client results call = loop 1
+      where
+        loop :: Int -> IO ()
+        loop n = do
+            current <- waitForStep results n
+            handle (recordException current) $
+              case numSteps of
+                TerminateAfter n' | n == n' -> do
+                  Binary.sendFinalInput call n
+                  (resp, NoMetadata) <- Binary.recvFinalOutput call
+                  atomically $ modifyTVar current (StepOk resp:)
+                _otherwise -> do
+                  Binary.sendNextInput call n
+                  resp <- Binary.recvNextOutput call
+                  atomically $ modifyTVar current (StepOk resp:)
+                  loop (succ n)
+
+        recordException :: TVar [StepResult] -> SomeException -> IO ()
+        recordException current e =
+            atomically $ modifyTVar current (StepFailed e:)
+
+{-------------------------------------------------------------------------------
+  Auxiliary: trivial RPCs
+
+  We want two distinct handler so we have two trivial RPCs.
+-------------------------------------------------------------------------------}
+
+type TrivialRpc rpc = (
+    SupportsClientRpc        rpc
+  , Input                    rpc ~ Lazy.ByteString
+  , Output                   rpc ~ Lazy.ByteString
+  , RequestMetadata          rpc ~ NoMetadata
+  , ResponseInitialMetadata  rpc ~ NoMetadata
+  , ResponseTrailingMetadata rpc ~ NoMetadata
+  )
+
+type RPC1 = Trivial' "rpc1"
+type RPC2 = Trivial' "rpc2"
+
diff --git a/test-grapesy/Test/Sanity/EndOfStream.hs b/test-grapesy/Test/Sanity/EndOfStream.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/EndOfStream.hs
@@ -0,0 +1,220 @@
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Test.Sanity.EndOfStream (tests) where
+
+import Control.Exception
+import Control.Monad
+import Data.ByteString.Lazy qualified as BS.Lazy
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary
+import Network.GRPC.Common.NextElem qualified as NextElem
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.StreamType (ServerHandler')
+import Network.GRPC.Server.StreamType qualified as Server
+
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Test.Driver.ClientServer
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.EndOfStream" [
+      testGroup "client" [
+          testCase "sendAfterFinal" test_sendAfterFinal
+        , testCase "recvAfterFinal" test_recvAfterFinal
+        , testCase "recvTrailers"   test_recvTrailers
+        ]
+    , testGroup "server" [
+          testCase "recvInput"      test_recvInput
+        , testCase "recvEndOfInput" test_recvEndOfInput
+        ]
+    ]
+
+{-------------------------------------------------------------------------------
+  Client tests
+-------------------------------------------------------------------------------}
+
+-- | Test that we get SendAfterFinal when we call 'sendInput' after the final
+test_sendAfterFinal :: Assertion
+test_sendAfterFinal = testClientServer $ ClientServerTest {
+      config = def
+    , server = [Server.fromMethod clientStreamingHandler]
+    , client = simpleTestClient $ \conn -> do
+        Client.withRPC conn def (Proxy @Absorb) $ \call -> do
+          replicateM_ 10 $ Client.sendNextInput call BS.Lazy.empty
+          Client.sendEndOfInput call
+
+          -- The purpose of this test:
+          mRes <- try $ Client.sendNextInput call BS.Lazy.empty
+          case mRes of
+            Left SendAfterFinal{} ->
+              return ()
+            _otherwise ->
+              assertFailure "Expected SendAfterFinal"
+
+          -- Communication with the server is unaffected
+          (res, _) <- Client.recvFinalOutput call
+          assertEqual "response" BS.Lazy.empty $ res
+    }
+
+-- | Test that we get RecvAfterFinal if we call 'recvOutput' after the final
+test_recvAfterFinal :: Assertion
+test_recvAfterFinal = testClientServer $ ClientServerTest {
+      config = def
+    , server = [Server.fromMethod serverStreamingHandler]
+    , client = simpleTestClient $ \conn ->
+        Client.withRPC conn def (Proxy @Spam) $ \call -> do
+          Client.sendFinalInput call BS.Lazy.empty
+
+          let loop :: IO ()
+              loop = do
+                mElem <- Client.recvOutput call
+                case mElem of
+                  StreamElem{}  -> loop
+                  FinalElem{}   -> return ()
+                  NoMoreElems{} -> return ()
+
+          loop
+
+          -- The purpose of this test:
+          mRes <- try $ Client.recvOutput call
+          case mRes of
+            Left RecvAfterFinal{} ->
+              return ()
+            Right _ ->
+              assertFailure "Expected RecvAfterFinal"
+
+          return ()
+    }
+
+-- | Test that 'recvTrailers' does /not/ throw an exception, even if the
+-- previous 'recvNextOutput' /happened/ to give us the final output.
+test_recvTrailers :: Assertion
+test_recvTrailers = testClientServer $ ClientServerTest {
+      config = def
+    , server = [Server.fromMethod nonStreamingHandler]
+    , client = simpleTestClient $ \conn ->
+        Client.withRPC conn def (Proxy @Poke) $ \call -> do
+          Client.sendFinalInput call BS.Lazy.empty
+
+          resp <- Client.recvNextOutput call
+          assertEqual "response" BS.Lazy.empty resp
+
+          -- The purpose of this test:
+          mTrailers <- try $ Client.recvTrailers call
+          case mTrailers of
+            Right _ ->
+              return ()
+            Left RecvAfterFinal{} ->
+              assertFailure "Unexpected RecvAfterFinal"
+
+          return ()
+    }
+
+{-------------------------------------------------------------------------------
+  Auxiliary: server counter-parts to the client tests
+-------------------------------------------------------------------------------}
+
+-- | Receive any string, respond with a single 'mempty'
+type Poke = RawRpc "Test" "trivial"
+
+-- | Service that simply absorbs all messages and then returns with 'mempty'
+type Absorb = RawRpc "Test" "absorb"
+
+-- | Service that waits for the go-ahead from the client and then spams the
+-- client with a bunch of 'mempty' messages
+type Spam = RawRpc "Test" "spam"
+
+nonStreamingHandler :: ServerHandler' NonStreaming IO Poke
+nonStreamingHandler = Server.mkNonStreaming $ \_inp ->
+    return BS.Lazy.empty
+
+clientStreamingHandler :: ServerHandler' ClientStreaming IO Absorb
+clientStreamingHandler = Server.mkClientStreaming $ \recv -> do
+    NextElem.whileNext_ recv $ \_ -> return ()
+    return mempty
+
+serverStreamingHandler :: ServerHandler' ServerStreaming IO Spam
+serverStreamingHandler = Server.mkServerStreaming $ \_inp send ->
+    NextElem.mapM_ send $ replicate 10 BS.Lazy.empty
+
+{-------------------------------------------------------------------------------
+  Server tests
+-------------------------------------------------------------------------------}
+
+-- | Test that the final element is marked as 'FinalElem'
+--
+-- Verifies that <https://github.com/well-typed/grapesy/issues/114> is solved.
+--
+-- NOTE: There is no client equivalent for this test. On the client side, the
+-- server will send trailers, and so /cannot/ make the final data frame as
+-- end-of-stream.
+test_recvInput :: Assertion
+test_recvInput = testClientServer $ ClientServerTest {
+      config = def
+    , server = [Server.someRpcHandler handler]
+    , client = simpleTestClient $ \conn ->
+        Client.withRPC conn def (Proxy @Poke) $ \call -> do
+          Client.sendFinalInput call BS.Lazy.empty
+          _resp <- Client.recvFinalOutput call
+          return ()
+    }
+  where
+    handler :: Server.RpcHandler IO Poke
+    handler = Server.mkRpcHandler $ \call -> do
+        x <- Server.recvInput call
+
+        -- The purpose of this test:
+        case x of
+          FinalElem{} ->
+            return ()
+          _otherwise ->
+            assertFailure "Expected FinalElem"
+
+        Server.sendFinalOutput call (mempty, NoMetadata)
+
+-- | Test that 'recvEndOfInput' does /not/ throw an exception, even if the
+-- previous 'recvNextInput' /happened/ to give us the final input.
+--
+-- This is the server equivalent of 'test_recvTrailers'.
+test_recvEndOfInput :: Assertion
+test_recvEndOfInput = testClientServer $ ClientServerTest {
+      config = def
+    , server = [Server.someRpcHandler handler]
+    , client = simpleTestClient $ \conn ->
+        Client.withRPC conn def (Proxy @Poke) $ \call -> do
+          Client.sendFinalInput call BS.Lazy.empty
+          _resp <- Client.recvFinalOutput call
+          return ()
+    }
+  where
+    handler :: Server.RpcHandler IO Poke
+    handler = Server.mkRpcHandler $ \call -> do
+        resp <- Server.recvNextInput call
+        assertEqual "resp" BS.Lazy.empty $ resp
+
+        -- The purpose of this test:
+        res <- try $ Server.recvEndOfInput call
+        case res of
+          Right () ->
+            return ()
+          Left RecvAfterFinal{} ->
+            assertFailure "Unexpected RecvAfterFinal"
+
+        Server.sendFinalOutput call (mempty, NoMetadata)
+
+{-------------------------------------------------------------------------------
+  Auxiliary: metadata
+-------------------------------------------------------------------------------}
+
+type instance RequestMetadata          (RawRpc "Test" test) = NoMetadata
+type instance ResponseInitialMetadata  (RawRpc "Test" test) = NoMetadata
+type instance ResponseTrailingMetadata (RawRpc "Test" test) = NoMetadata
+
diff --git a/test-grapesy/Test/Sanity/Interop.hs b/test-grapesy/Test/Sanity/Interop.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/Interop.hs
@@ -0,0 +1,284 @@
+{-# LANGUAGE OverloadedLabels  #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+-- | Test functionality required by the gRPC interop tests
+module Test.Sanity.Interop (tests) where
+
+import Control.Concurrent (threadDelay)
+import Control.Exception
+import Control.Monad
+import Data.ByteString qualified as BS.Strict
+import Data.Proxy
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.Binary qualified as Client.Binary
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary (RawRpc)
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Common.StreamElem qualified as StreamElem
+import Network.GRPC.Server qualified as Server
+import Network.GRPC.Server.Binary qualified as Server.Binary
+import Network.GRPC.Server.StreamType (ServerHandler'(..))
+import Network.GRPC.Server.StreamType qualified as Server
+
+import Proto.API.Interop
+import Proto.API.Ping
+
+import Test.Driver.ClientServer
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.Interop" [
+      testGroup "preliminary" [
+          testCase "callAfterException" test_callAfterException
+        ]
+    , testGroup "cancellation" [
+          testCase "client" test_cancellation_client
+        , testCase "server" test_cancellation_server
+        ]
+    , testGroup "official" [
+          testCase "emptyUnary"                test_emptyUnary
+        , testCase "serverCompressedStreaming" test_serverCompressedStreaming
+        ]
+    ]
+
+{-------------------------------------------------------------------------------
+  Preliminary: verify that we can do a second call on the same connection,
+  even if the first failed with a gRPC exception
+-------------------------------------------------------------------------------}
+
+test_callAfterException :: IO ()
+test_callAfterException =
+    testClientServer $ ClientServerTest {
+        config = def
+      , client = simpleTestClient $ \conn -> do
+          resp1 <- ping conn $ defMessage & #id .~ 0
+          case resp1 of
+            Left _  -> return ()
+            Right _ -> assertFailure "Expected gRPC exception"
+
+          resp2 <- ping conn $ defMessage & #id .~ 1
+          case resp2 of
+            Left  _ -> assertFailure "Expected pong"
+            Right i -> assertEqual "pong" i (defMessage & #id .~ 1)
+      , server = [
+            Server.someRpcHandler $
+              Server.mkRpcHandler @Ping $ \call -> do
+                pingMsg <- Server.recvFinalInput call
+                if pingMsg ^. #id > 0 then do
+                  let pongMsg :: Proto PongMessage
+                      pongMsg = defMessage & #id .~ (pingMsg ^. #id)
+                  Server.sendFinalOutput call (pongMsg, NoMetadata)
+                else
+                  Server.sendGrpcException call $ GrpcException {
+                      grpcError         = GrpcInvalidArgument
+                    , grpcErrorMessage  = Just "Expected non-zero ping"
+                    , grpcErrorDetails  = Nothing
+                    , grpcErrorMetadata = []
+                    }
+          ]
+      }
+  where
+    ping ::
+         Client.Connection
+      -> Proto PingMessage
+      -> IO (Either SomeException (Proto PongMessage))
+    ping conn = try . Client.nonStreaming conn (Client.rpc @Ping)
+
+{-------------------------------------------------------------------------------
+  @empty_unary@
+
+  <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#empty_unary>
+-------------------------------------------------------------------------------}
+
+-- | Test that the empty message has an empty encoding
+--
+-- This test fails if we unconditionally compress (the /compressed/ form of the
+-- empty message is larger than the uncompressed form, as compression introduces
+-- minor overhead).
+test_emptyUnary :: IO ()
+test_emptyUnary =
+    testClientServer $ ClientServerTest {
+        config = def
+      , client = simpleTestClient $ \conn ->
+          Client.withRPC conn def (Proxy @EmptyCall) $ \call -> do
+            Client.sendFinalInput call defMessage
+            streamElem <- Client.recvOutputWithMeta call
+            case StreamElem.value streamElem of
+              Nothing         -> fail "Expected answer"
+              Just (meta, _x) -> verifyMeta meta
+      , server = [
+            Server.fromMethod @EmptyCall $ ServerHandler $ \_empty ->
+              return defMessage
+          ]
+      }
+  where
+    -- We don't /expect/ the empty message to be compressed, due to the overhead
+    -- mentioned above. However, /if/ it is compressed, perhaps using a custom
+    -- zero-overhead compression algorithm, it's size should be zero.
+    verifyMeta :: InboundMeta -> IO ()
+    verifyMeta meta = do
+        assertEqual "uncompressed size" (inboundUncompressedSize meta) 0
+        case inboundCompressedSize meta of
+          Nothing   -> return ()
+          Just size -> assertEqual "compressed size" size 0
+
+{-------------------------------------------------------------------------------
+  @server_compressed_streaming@
+
+  <https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server_compressed_streaming>
+-------------------------------------------------------------------------------}
+
+-- | Test that we can enable and disable compression per message
+test_serverCompressedStreaming :: IO ()
+test_serverCompressedStreaming =
+    testClientServer ClientServerTest {
+        config = def
+      , client = simpleTestClient $ \conn ->
+          Client.withRPC conn def (Proxy @StreamingOutputCall) $ \call -> do
+            Client.sendFinalInput call $ defMessage & #responseParameters .~ [
+                defMessage
+                  & #compressed .~ (defMessage & #value .~ True)
+                  & #size .~ 31415
+              , defMessage
+                  & #compressed .~ (defMessage & #value .~ False)
+                  & #size .~ 92653
+              ]
+            output1 <- Client.recvOutputWithMeta call
+            output2 <- Client.recvOutputWithMeta call
+            verifyOutputs (StreamElem.value output1, StreamElem.value output2)
+      , server = [
+            Server.someRpcHandler $
+              Server.mkRpcHandler @StreamingOutputCall $ \call -> do
+                handleStreamingOutputCall call
+          ]
+      }
+  where
+    handleStreamingOutputCall :: Server.Call StreamingOutputCall -> IO ()
+    handleStreamingOutputCall call = do
+        -- Wait for request
+        request <- Server.recvFinalInput call
+
+        -- Send all requested messages
+        forM_ (request ^. #responseParameters) $ \responseParams -> do
+
+          let shouldCompress :: Bool
+              shouldCompress = responseParams ^. #compressed . #value
+
+              size :: Int
+              size = fromIntegral $ responseParams ^. #size
+
+              meta :: OutboundMeta
+              meta = def { outboundEnableCompression = shouldCompress }
+
+              -- Payload matters for the test, because for messages that are too
+              -- small no compression is used even when enabled.
+              payload :: Proto Payload
+              payload = defMessage & #body .~ BS.Strict.pack (replicate size 0)
+
+              response :: Proto StreamingOutputCallResponse
+              response = defMessage & #payload .~ payload
+
+          Server.sendOutputWithMeta call $ StreamElem (meta, response)
+
+        -- No further output
+        Server.sendTrailers call def
+
+    verifyOutputs ::
+         ( Maybe (InboundMeta, Proto StreamingOutputCallResponse)
+         , Maybe (InboundMeta, Proto StreamingOutputCallResponse)
+         )
+      -> IO ()
+    verifyOutputs = \case
+        (Just (meta1, _), Just (meta2, _)) -> do
+          case inboundCompressedSize meta1 of
+            Nothing -> assertFailure "First output should be compressed"
+            Just _  -> return ()
+          case inboundCompressedSize meta2 of
+            Nothing -> return ()
+            Just _  -> assertFailure "First output should not be compressed"
+        _otherwise ->
+          assertFailure "Expected value"
+
+{-------------------------------------------------------------------------------
+  Cancellation
+-------------------------------------------------------------------------------}
+
+type StreamNats = RawRpc "test" "nats"
+
+test_cancellation_client :: IO ()
+test_cancellation_client =
+    testClientServer ClientServerTest {
+        config = def {
+            isExpectedServerException = isClientDisconnected
+          }
+      , client = simpleTestClient $ \conn -> do
+          -- We wait for the first input, but then cancel the request
+          result :: Either GrpcException (Maybe Int) <- try $
+            Client.withRPC conn def (Proxy @StreamNats) $ \call -> do
+              StreamElem.value <$> Client.Binary.recvOutput call
+
+          -- Since we did not tell the server that we have sent our final
+          -- outbound message, the client should receive a CANCELLED exception.
+          case result of
+            Left err ->
+              assertEqual "grpcError" GrpcCancelled $ grpcError err
+            Right _ ->
+              assertFailure "Expected exception"
+      , server = [
+          Server.someRpcHandler $
+            Server.mkRpcHandler @StreamNats $ \call -> do
+              forM_ [1 .. 100] $ \(i :: Int) -> do
+                Server.Binary.sendNextOutput call i
+                threadDelay 100_000
+              Server.sendTrailers call NoMetadata
+        ]
+      }
+
+test_cancellation_server :: IO ()
+test_cancellation_server =
+    testClientServer ClientServerTest {
+        config = def {
+            isExpectedServerException = isHandlerTerminated
+          }
+      , client = simpleTestClient $ \conn -> do
+          result :: Either GrpcException [Int] <- try $
+            Client.withRPC conn def (Proxy @StreamNats) $ \call -> do
+              Client.sendEndOfInput call
+              let loop :: [Int] -> IO [Int]
+                  loop acc = do
+                      mx <- StreamElem.value <$> Client.Binary.recvOutput call
+                      case mx of
+                        Nothing -> return $ reverse acc
+                        Just x  -> loop (x:acc)
+              loop []
+          case result of
+            Left err -> do
+              assertEqual "grpcError" GrpcUnknown $
+                grpcError err
+              assertEqual "grpcErrorMessage" (Just "Server-side exception: HandlerTerminated") $
+                grpcErrorMessage err
+            Right _ ->
+              assertFailure "Expected exception"
+      , server = [
+          Server.someRpcHandler $
+            -- The server sends only one value, then gives up
+            Server.mkRpcHandler @StreamNats $ \call -> do
+              Server.Binary.sendNextOutput call (1 :: Int)
+        ]
+      }
+
+{-------------------------------------------------------------------------------
+  Internal: we don't care about metadata in these tests
+-------------------------------------------------------------------------------}
+
+type instance RequestMetadata          (RawRpc "test" meth) = NoMetadata
+type instance ResponseInitialMetadata  (RawRpc "test" meth) = NoMetadata
+type instance ResponseTrailingMetadata (RawRpc "test" meth) = NoMetadata
diff --git a/test-grapesy/Test/Sanity/Reclamation.hs b/test-grapesy/Test/Sanity/Reclamation.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/Reclamation.hs
@@ -0,0 +1,63 @@
+module Test.Sanity.Reclamation (tests) where
+
+import Control.Exception
+import Control.Monad
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Protobuf
+import Network.GRPC.Server qualified as Server
+
+import Test.Driver.ClientServer
+
+import Proto.API.Ping
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.Reclamation" [
+      testCase "serverException1" serverException1
+    , testCase "serverException2" serverException2
+    ]
+
+{-------------------------------------------------------------------------------
+  Server-side exception
+
+  Test for <https://github.com/well-typed/grapesy/issues/257>.
+-------------------------------------------------------------------------------}
+
+-- | Handler that throws immediately
+brokenHandler :: Server.Call Ping -> IO ()
+brokenHandler _call = throwIO $ DeliberateException $ userError "Broken handler"
+
+serverException1 :: Assertion
+serverException1 = testClientServer $ ClientServerTest {
+      config = def { isExpectedServerException = isDeliberateException }
+    , server = [Server.someRpcHandler $ Server.mkRpcHandler brokenHandler]
+    , client = \params testServer delimitTestScope -> delimitTestScope $
+        replicateM_ 1000 $ do
+          Client.withConnection params testServer $ \conn ->
+            Client.withRPC conn def (Proxy @Ping) $ \call -> do
+              resp <- try $ Client.recvFinalOutput call
+              case resp of
+                Left GrpcException{} -> return ()
+                Right _ -> assertFailure "Unexpected response"
+    }
+
+serverException2 :: Assertion
+serverException2 = testClientServer $ ClientServerTest {
+      config = def { isExpectedServerException = isDeliberateException }
+    , server = [Server.someRpcHandler $ Server.mkRpcHandler brokenHandler]
+    , client = \params testServer delimitTestScope -> delimitTestScope $
+        replicateM_ 1000 $
+          Client.withConnection params testServer $ \conn ->
+            Client.withRPC conn def (Proxy @Ping) $ \call -> do
+
+              -- The only difference between serverException1 is this line:
+              Client.sendFinalInput call defMessage
+
+              resp <- try $ Client.recvFinalOutput call
+              case resp of
+                Left GrpcException{} -> return ()
+                Right _ -> assertFailure "Unexpected response"
+    }
diff --git a/test-grapesy/Test/Sanity/StreamingType/CustomFormat.hs b/test-grapesy/Test/Sanity/StreamingType/CustomFormat.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/StreamingType/CustomFormat.hs
@@ -0,0 +1,217 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Sanity.StreamingType.CustomFormat (tests) where
+
+import Codec.Serialise qualified as Cbor
+import Control.Concurrent.Async (concurrently)
+import Control.DeepSeq (NFData)
+import Data.Bifunctor
+import Data.ByteString qualified as Strict (ByteString)
+import Data.Kind
+import Data.List
+import Data.Proxy
+import Data.Typeable
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client (rpc)
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.StreamType.IO qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.NextElem qualified as NextElem
+import Network.GRPC.Common.StreamType
+import Network.GRPC.Server.StreamType (ServerHandler')
+import Network.GRPC.Server.StreamType qualified as Server
+
+import Test.Driver.ClientServer
+
+{-------------------------------------------------------------------------------
+  API definition
+-------------------------------------------------------------------------------}
+
+-- | Calculator gRPC client\/server example
+--
+-- This is used lifted to the type-level to describe the available RPC calls.
+--
+-- Uses CBOR as the data format, and uses all stream types.
+data Calculator = Calc Function
+
+data Function =
+    -- | Non-streaming sum of a list of numbers
+    SumQuick
+
+    -- | Server-streaming sum of an inclusive range
+    --
+    -- The server streams intermediate results as it sums the list of numbers
+  | SumFromTo
+
+    -- | Client-streaming sum
+    --
+    -- The client streams 'Int's while the server accumulates the sum, then reports
+    -- at the end.
+  | SumListen
+
+    -- | Bi-directional streaming sum
+    --
+    -- The client streams integers while the server accumulates a sum and reports
+    -- the current sum for every integer it receives.
+  | SumChat
+
+class ( Typeable fun
+      , Show (CalcInput  fun)
+      , Show (CalcOutput fun)
+      , NFData (CalcInput  fun)
+      , NFData (CalcOutput fun)
+      , Cbor.Serialise (CalcInput  fun)
+      , Cbor.Serialise (CalcOutput fun)
+      ) => CalculatorFunction (fun :: Function) where
+  type family CalcInput  (fun :: Function) :: Type
+  type family CalcOutput (fun :: Function) :: Type
+
+  calculatorMethod :: Proxy fun -> Strict.ByteString
+
+instance SupportsStreamingType (Calc SumQuick)  NonStreaming
+instance CalculatorFunction SumQuick where
+  type CalcInput  SumQuick = [Int]
+  type CalcOutput SumQuick = Int
+  calculatorMethod _ = "sumQuick"
+
+instance SupportsStreamingType (Calc SumFromTo) ServerStreaming
+instance CalculatorFunction SumFromTo where
+  type CalcInput  SumFromTo = (Int, Int)
+  type CalcOutput SumFromTo = Int
+  calculatorMethod _ = "sumFromTo"
+
+instance SupportsStreamingType (Calc SumListen) ClientStreaming
+instance CalculatorFunction SumListen where
+  type CalcInput  SumListen = Int
+  type CalcOutput SumListen = Int
+  calculatorMethod _ = "sumListen"
+
+instance SupportsStreamingType (Calc SumChat) BiDiStreaming
+instance CalculatorFunction SumChat where
+  type CalcInput  SumChat = Int
+  type CalcOutput SumChat = Int
+  calculatorMethod _ = "sumChat"
+
+type instance Input  (Calc fun) = CalcInput  fun
+type instance Output (Calc fun) = CalcOutput fun
+
+type instance RequestMetadata          (Calc fun) = NoMetadata
+type instance ResponseInitialMetadata  (Calc fun) = NoMetadata
+type instance ResponseTrailingMetadata (Calc fun) = NoMetadata
+
+instance CalculatorFunction fun => IsRPC (Calc fun) where
+  rpcContentType _ = defaultRpcContentType "cbor"
+  rpcServiceName _ = "calculator"
+  rpcMethodName  _ = calculatorMethod (Proxy @fun)
+  rpcMessageType _ = Nothing
+
+instance CalculatorFunction fun => SupportsClientRpc (Calc fun) where
+  rpcSerializeInput    _ = Cbor.serialise @(CalcInput  fun)
+  rpcDeserializeOutput _ = first show . Cbor.deserialiseOrFail @(CalcOutput fun)
+
+instance CalculatorFunction fun => SupportsServerRpc (Calc fun) where
+  rpcDeserializeInput _ = first show . Cbor.deserialiseOrFail @(CalcInput  fun)
+  rpcSerializeOutput  _ = Cbor.serialise @(CalcOutput fun)
+
+{-------------------------------------------------------------------------------
+  Tests proper
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests =
+    testGroup "Test.Sanity.StreamingType.CustomFormat" [
+        testCase "calculator" test_calculator_cbor
+      ]
+
+test_calculator_cbor :: IO ()
+test_calculator_cbor = do
+    testClientServer $ ClientServerTest {
+        config = def
+      , client = simpleTestClient $ \conn -> do
+          nonStreamingSumCheck conn
+          serverStreamingSumCheck conn
+          clientStreamingSumCheck conn
+          biDiStreamingSumCheck conn
+      , server = [
+            Server.fromMethod nonStreamingSumHandler
+          , Server.fromMethod serverStreamingSumHandler
+          , Server.fromMethod clientStreamingSumHandler
+          , Server.fromMethod biDiStreamingSumHandler
+          ]
+      }
+  where
+    -- Starting number for the sums (inclusive)
+    start :: Int
+    start = 0
+
+    -- Ending number for the sums (inclusive)
+    end :: Int
+    end = 100
+
+    nums :: [Int]
+    nums = [start .. end]
+
+    -- Intermediate results of summing nums ([0,1,3,6,10,...])
+    intermediateSums :: [Int]
+    intermediateSums =
+      snd $ mapAccumL (\acc n -> let s = acc + n in (s,s)) 0 nums
+
+    -- Ask for the sum of nums in nonStreaming fashion and check
+    -- that it's accurate
+    nonStreamingSumCheck :: Client.Connection -> IO ()
+    nonStreamingSumCheck conn = do
+        resp <- Client.nonStreaming conn (rpc @(Calc SumQuick)) nums
+        assertEqual "" (sum nums) resp
+
+    -- Return the sum of a list of numbers
+    nonStreamingSumHandler :: ServerHandler' NonStreaming IO (Calc SumQuick)
+    nonStreamingSumHandler = Server.mkNonStreaming $ return . sum
+
+    -- Ask for the sum of nums with the server streaming intermediate
+    -- results. Save the intermediate results, then make sure they are accurate.
+    serverStreamingSumCheck :: Client.Connection -> IO ()
+    serverStreamingSumCheck conn = do
+        resp <- Client.serverStreaming conn (rpc @(Calc SumFromTo)) (start, end) $ \recv ->
+                  NextElem.collect recv
+        assertEqual "" intermediateSums resp
+
+    -- Stream the intermediate sums while summing a whole range of numbers
+    serverStreamingSumHandler :: ServerHandler' ServerStreaming IO (Calc SumFromTo)
+    serverStreamingSumHandler = Server.mkServerStreaming $ \(from, to) send ->
+        NextElem.mapM_ send $ drop 1 (scanl (+) 0 [from .. to])
+
+    -- Stream a list of numbers to the server and expect the sum of the numbers
+    -- back
+    clientStreamingSumCheck :: Client.Connection -> IO ()
+    clientStreamingSumCheck conn = do
+        resp <- Client.clientStreaming_ conn (rpc @(Calc SumListen)) $ \send ->
+                  NextElem.mapM_ send nums
+        assertEqual "" (sum nums) resp
+
+    -- Receive a stream of numbers, return the sum
+    clientStreamingSumHandler :: ServerHandler' ClientStreaming IO (Calc SumListen)
+    clientStreamingSumHandler = Server.mkClientStreaming $ \recv ->
+        sum <$> NextElem.collect recv
+
+    -- Stream numbers, get back intermediate sums, make sure the intermediate
+    -- sums we get back are accurate
+    biDiStreamingSumCheck :: Client.Connection -> IO ()
+    biDiStreamingSumCheck conn = do
+        ((), recvdNums) <- Client.biDiStreaming conn (rpc @(Calc SumChat)) $ \send recv ->
+          concurrently
+            (NextElem.mapM_ send nums)
+            (NextElem.collect recv)
+        assertEqual "" intermediateSums recvdNums
+
+    -- Receive numbers and stream the intermediate sums back
+    biDiStreamingSumHandler :: ServerHandler' BiDiStreaming IO (Calc SumChat)
+    biDiStreamingSumHandler = Server.mkBiDiStreaming $ \recv send ->
+        let
+          go acc =
+            recv >>= \case
+              NoNextElem -> send NoNextElem
+              NextElem n -> send (NextElem (acc + n)) >> go (acc + n)
+        in
+          go 0
diff --git a/test-grapesy/Test/Sanity/StreamingType/NonStreaming.hs b/test-grapesy/Test/Sanity/StreamingType/NonStreaming.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Sanity/StreamingType/NonStreaming.hs
@@ -0,0 +1,156 @@
+{-# LANGUAGE CPP               #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Test.Sanity.StreamingType.NonStreaming (tests) where
+
+import Data.Word
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Client.Binary qualified as Binary
+import Network.GRPC.Common
+import Network.GRPC.Common.Binary (RawRpc)
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Server (ContentType(..))
+import Network.GRPC.Server.StreamType qualified as Server
+import Network.GRPC.Server.StreamType.Binary qualified as Binary
+
+import Test.Driver.ClientServer
+import Data.Foldable (toList)
+
+tests :: TestTree
+tests = testGroup "Test.Sanity.StreamingType.NonStreaming" [
+      testGroup "increment" [
+          testCase "default" $
+            test_increment def
+        , testGroup "Content-Type" [
+              testGroup "ok" [
+                  -- Without the +format part
+                  testCase "application/grpc" $
+                    test_increment def {
+                        clientContentType = ValidOverride $
+                          ContentTypeOverride "application/grpc"
+                      }
+
+                  -- Random other format
+                  -- See discussion in 'parseContentType'
+                , testCase "application/grpc+gibberish" $
+                    test_increment def {
+                        clientContentType = ValidOverride $
+                          ContentTypeOverride "application/grpc+gibberish"
+                      }
+                ]
+            , testGroup "fail" [
+                  testCase "application/invalid-subtype" $
+                    test_increment def {
+                        isExpectedServerException =
+                          isInvalidRequestHeaders
+                      , isExpectedClientException =
+                          isGrpc415
+                      , clientContentType = InvalidOverride . Just $
+                          ContentTypeOverride "application/invalid-subtype"
+                      }
+
+                  -- gRPC spec does not allow parameters
+                , testCase "charset" $
+                    test_increment def {
+                        isExpectedServerException =
+                          isInvalidRequestHeaders
+                      , isExpectedClientException =
+                          isGrpc415
+                      , clientContentType = InvalidOverride . Just $
+                          ContentTypeOverride "application/grpc; charset=utf-8"
+                      }
+                ]
+            ]
+        , testGroup "TLS" [
+              testGroup "ok" [
+                  testCase "certAsRoot" $
+                    test_increment def {
+                        useTLS = Just $ TlsOk TlsOkCertAsRoot
+                      }
+                , testCase "skipValidation" $
+                    test_increment def {
+                        useTLS = Just $ TlsOk TlsOkSkipValidation
+                      }
+                  ]
+            , testGroup "fail" [
+                  testCase "validation" $
+                    test_increment def {
+                        isExpectedClientException =
+                          isHandshakeFailed
+                      , useTLS =
+                          Just $ TlsFail TlsFailValidation
+                      }
+                , testCase "unsupported" $
+                    test_increment def {
+                        isExpectedClientException =
+                          isHandshakeFailed
+                      , useTLS =
+                          Just $ TlsFail TlsFailUnsupported
+                      }
+                ]
+            ]
+        , testGroup "compression" [
+              testGroup "supported" $
+                let mkTest :: Compr.Compression -> TestTree
+                    mkTest compr = testCase comprId $
+                        test_increment def {
+                            clientCompr = Compr.only compr
+                          , serverCompr = Compr.only compr
+                          }
+                      where
+                        comprId :: String
+                        comprId = show (Compr.compressionId compr)
+                in map mkTest (toList Compr.allSupportedCompression)
+            , testGroup "unsupported" [
+                  testCase "clientChoosesUnsupported" $
+                    test_increment def {
+                        isExpectedServerException =
+                          isServerUnsupportedCompression
+                      , isExpectedClientException =
+                          isGrpc400
+                      , clientInitCompr =
+                          Just Compr.gzip
+                      , serverCompr =
+                          Compr.none
+                      }
+                , testCase "serverChoosesUnsupported" $
+                    test_increment def {
+                        isExpectedClientException =
+                           isClientUnsupportedCompression
+                      , clientCompr =
+                          Compr.none
+                      , serverCompr =
+                          Compr.insist Compr.gzip
+                      }
+                ]
+            ]
+        ]
+    ]
+
+{-------------------------------------------------------------------------------
+  Binary (without Protobuf)
+-------------------------------------------------------------------------------}
+
+type BinaryIncrement = RawRpc "binary" "increment"
+
+type instance RequestMetadata          BinaryIncrement = NoMetadata
+type instance ResponseInitialMetadata  BinaryIncrement = NoMetadata
+type instance ResponseTrailingMetadata BinaryIncrement = NoMetadata
+
+test_increment :: ClientServerConfig -> IO ()
+test_increment config = testClientServer $ ClientServerTest {
+      config
+    , client = simpleTestClient $ \conn -> do
+        Client.withRPC conn def (Proxy @BinaryIncrement) $ \call -> do
+          Binary.sendFinalInput @Word8 call 1
+          resp <- fst <$> Binary.recvFinalOutput @Word8 call
+          assertEqual "" 2 $ resp
+    , server = [
+         Server.fromMethod @BinaryIncrement $ Binary.mkNonStreaming $ \n ->
+           return (succ (n :: Word8))
+        ]
+    }
diff --git a/test-grapesy/Test/Util.hs b/test-grapesy/Test/Util.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Util.hs
@@ -0,0 +1,55 @@
+{-# LANGUAGE CPP #-}
+
+module Test.Util (
+    -- * Timeouts
+    Timeout(..)
+  , within
+
+    -- * Files
+  , withTemporaryFile
+  ) where
+
+import Control.Concurrent
+import Control.Exception
+import Control.Monad.Catch
+import Control.Monad.IO.Class
+import GHC.Stack
+import System.IO
+import System.IO.Temp
+
+{-------------------------------------------------------------------------------
+  Timeouts
+-------------------------------------------------------------------------------}
+
+data Timeout = forall a. Show a => Timeout a CallStack
+  deriving anyclass (Exception)
+
+deriving stock instance Show Timeout
+
+-- | Limit execution time of an action
+within :: forall m a info.
+     (HasCallStack, Show info, MonadIO m, MonadMask m)
+  => Int   -- ^ Maximum duration in seconds
+  -> info  -- ^ Additional information to include in the exception if thrown
+  -> m a -> m a
+within t info io = do
+    me <- liftIO $ myThreadId
+
+    let timer :: IO ()
+        timer = do
+            interruptible $ -- Ensure that the timer can be killed
+              threadDelay (t * 1_000_000)
+            throwTo me $ Timeout info callStack
+
+        startTimer :: m ThreadId
+        startTimer = liftIO $ forkIO timer
+
+        stopTimer :: ThreadId -> ExitCase a -> m ()
+        stopTimer tid _ = liftIO $ killThread tid
+
+    fmap fst $
+      generalBracket startTimer stopTimer $ \_ -> io
+
+withTemporaryFile :: (FilePath -> IO a) -> IO a
+withTemporaryFile k =
+    withSystemTempFile "grapesy-test-suite.txt" (\fp h -> hClose h >> k fp)
diff --git a/test-grapesy/Test/Util/Exception.hs b/test-grapesy/Test/Util/Exception.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Util/Exception.hs
@@ -0,0 +1,36 @@
+-- | Utility exception types for the tests
+module Test.Util.Exception
+  ( -- * User exceptions
+    SomeServerException(..)
+  , SomeClientException(..)
+
+    -- * Deliberate exceptions
+  , DeliberateException(..)
+  , ExceptionId
+  ) where
+
+import Control.Exception
+
+{-------------------------------------------------------------------------------
+  User exceptions
+
+  When a test calls for the client or the server to throw an exception, we throw
+  one of these. Their sole purpose is to be "any" kind of exception (not a
+  specific one).
+-------------------------------------------------------------------------------}
+
+data SomeServerException = SomeServerException ExceptionId
+  deriving stock (Show, Eq)
+  deriving anyclass (Exception)
+
+data SomeClientException = SomeClientException ExceptionId
+  deriving stock (Show, Eq)
+  deriving anyclass (Exception)
+
+-- | Exception thrown by client or handler to test exception handling
+data DeliberateException = forall e. Exception e => DeliberateException e
+  deriving anyclass (Exception)
+deriving stock instance Show DeliberateException
+
+-- | We distinguish exceptions from each other simply by a number
+type ExceptionId = Int
diff --git a/test-grapesy/Test/Util/RawTestServer.hs b/test-grapesy/Test/Util/RawTestServer.hs
new file mode 100644
--- /dev/null
+++ b/test-grapesy/Test/Util/RawTestServer.hs
@@ -0,0 +1,98 @@
+module Test.Util.RawTestServer
+  ( -- * Raw test server
+    respondWith
+  , respondWithIO
+
+    -- * Abstract response type
+  , Response(..)
+  , asciiHeader
+  , utf8Header
+  ) where
+
+import Data.ByteString qualified as BS.Strict
+import Data.ByteString qualified as Strict (ByteString)
+import Data.ByteString.Builder qualified as BS.Builder
+import Data.ByteString.Char8 qualified as BS.Strict.Char8
+import Data.ByteString.UTF8 qualified as BS.Strict.UTF8
+import Data.String (fromString)
+import Network.HTTP2.Server qualified as HTTP2
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Server.Run
+import Network.HTTP.Types qualified as HTTP
+
+{-------------------------------------------------------------------------------
+  Raw test server
+
+  This allows us to simulate broken /servers/.
+-------------------------------------------------------------------------------}
+
+-- | Run the server and apply the continuation to an 'Client.Address' holding
+-- the running server's host and port.
+withTestServer :: HTTP2.Server -> (Client.Address -> IO a) -> IO a
+withTestServer server k = do
+    let serverConfig =
+          ServerConfig {
+            serverInsecure = Just $ InsecureConfig {
+                insecureHost = Just "127.0.0.1"
+              , insecurePort = 0
+              }
+            , serverSecure = Nothing
+            }
+    forkServer def serverConfig server $ \runningServer -> do
+      port <- getServerPort runningServer
+      let addr :: Client.Address
+          addr = Client.Address {
+                addressHost      = "127.0.0.1"
+              , addressPort      = port
+              , addressAuthority = Nothing
+              }
+      k addr
+
+-- | Server that responds with the given 'Response', independent of the request
+respondWith :: Response -> (Client.Address -> IO a) -> IO a
+respondWith resp = respondWithIO (return resp)
+
+-- | Version of 'respondWith' that constructs the response
+respondWithIO :: IO Response -> (Client.Address -> IO a) -> IO a
+respondWithIO mkResponse = withTestServer $ \_req _aux respond -> do
+    response <- mkResponse
+    respond (toHTTP2Response response) []
+
+data Response = Response {
+      responseStatus   :: HTTP.Status
+    , responseHeaders  :: [HTTP.Header]
+    , responseBody     :: Strict.ByteString
+    , responseTrailers :: [HTTP.Header]
+    }
+
+instance Default Response where
+  def = Response {
+        responseStatus   = HTTP.ok200
+      , responseHeaders  = [ asciiHeader "content-type" "application/grpc" ]
+      , responseBody     = BS.Strict.empty
+      , responseTrailers = [ asciiHeader "grpc-status" "0" ]
+      }
+
+toHTTP2Response :: Response -> HTTP2.Response
+toHTTP2Response response =
+    flip HTTP2.setResponseTrailersMaker trailersMaker $
+      HTTP2.responseBuilder
+        (responseStatus  response)
+        (responseHeaders response)
+        (BS.Builder.byteString $ responseBody response)
+  where
+    trailersMaker :: HTTP2.TrailersMaker
+    trailersMaker Nothing  = return $ HTTP2.Trailers (responseTrailers response)
+    trailersMaker (Just _) = return $ HTTP2.NextTrailersMaker trailersMaker
+
+-- | Header with ASCII value
+--
+-- (Header /names/ are always ASCII.)
+asciiHeader :: String -> String -> HTTP.Header
+asciiHeader name value = (fromString name, BS.Strict.Char8.pack value)
+
+-- | Header with UTF-8 encoded value
+utf8Header :: String -> String -> HTTP.Header
+utf8Header name value = (fromString name, BS.Strict.UTF8.fromString value)
diff --git a/test-record-dot/Main.hs b/test-record-dot/Main.hs
new file mode 100644
--- /dev/null
+++ b/test-record-dot/Main.hs
@@ -0,0 +1,12 @@
+module Main (main) where
+
+import Test.Tasty
+
+import Test.OverloadedRecordDot    qualified as OverloadedRecordDot
+import Test.OverloadedRecordUpdate qualified as OverloadedRecordUpdate
+
+main :: IO ()
+main = defaultMain $ testGroup "test-proto" [
+      OverloadedRecordDot.tests
+    , OverloadedRecordUpdate.tests
+    ]
diff --git a/test-record-dot/Test/OverloadedRecordDot.hs b/test-record-dot/Test/OverloadedRecordDot.hs
new file mode 100644
--- /dev/null
+++ b/test-record-dot/Test/OverloadedRecordDot.hs
@@ -0,0 +1,234 @@
+{-# LANGUAGE OverloadedRecordDot #-}
+
+module Test.OverloadedRecordDot (tests) where
+
+import Data.ByteString qualified as Strict (ByteString)
+import Data.Int
+import Data.Map (Map)
+import Data.Map qualified as Map
+import Data.Text (Text)
+import Data.Vector qualified as Boxed (Vector)
+import Data.Vector qualified as Vector.Boxed
+import Data.Vector.Unboxed qualified as Unboxed (Vector)
+import Data.Vector.Unboxed qualified as Vector.Unboxed
+import Data.Word
+
+import Network.GRPC.Common.Protobuf
+
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Proto.Spec
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+tests :: TestTree
+tests = testGroup "Test.OverloadedRecordDot" [
+      testCase "implicit" test_implicit
+    , testCase "optional" test_optional
+    , testCase "repeated" test_repeated
+    , testCase "map"      test_map
+    , testCase "oneof"    test_oneof
+    ]
+
+{-------------------------------------------------------------------------------
+  Tests proper
+-------------------------------------------------------------------------------}
+
+-- | Fields without a label ("implicit field presence")
+--
+-- Not sure why, but protoc generates 'Maybe' field accessors for these
+-- fields but only in the case of nested messages; not for scalars or enums.
+-- Interestingly, these fields are then considered to be 'Nothing' when
+-- the value is 'defMessage'.
+test_implicit :: Assertion
+test_implicit = do
+    assertEqual "defaultScalar01" (fieldDefault :: Double)                             $ exampleMessage.defaultScalar01
+    assertEqual "defaultScalar02" (fieldDefault :: Float)                              $ exampleMessage.defaultScalar02
+    assertEqual "defaultScalar03" (fieldDefault :: Int32)                              $ exampleMessage.defaultScalar03
+    assertEqual "defaultScalar04" (fieldDefault :: Int64)                              $ exampleMessage.defaultScalar04
+    assertEqual "defaultScalar05" (fieldDefault :: Word32)                             $ exampleMessage.defaultScalar05
+    assertEqual "defaultScalar06" (fieldDefault :: Word64)                             $ exampleMessage.defaultScalar06
+    assertEqual "defaultScalar07" (fieldDefault :: Int32)                              $ exampleMessage.defaultScalar07
+    assertEqual "defaultScalar08" (fieldDefault :: Int64)                              $ exampleMessage.defaultScalar08
+    assertEqual "defaultScalar09" (fieldDefault :: Word32)                             $ exampleMessage.defaultScalar09
+    assertEqual "defaultScalar10" (fieldDefault :: Word64)                             $ exampleMessage.defaultScalar10
+    assertEqual "defaultScalar11" (fieldDefault :: Int32)                              $ exampleMessage.defaultScalar11
+    assertEqual "defaultScalar12" (fieldDefault :: Int64)                              $ exampleMessage.defaultScalar12
+    assertEqual "defaultScalar13" (fieldDefault :: Bool)                               $ exampleMessage.defaultScalar13
+    assertEqual "defaultScalar14" (fieldDefault :: Text)                               $ exampleMessage.defaultScalar14
+    assertEqual "defaultScalar15" (fieldDefault :: Strict.ByteString)                  $ exampleMessage.defaultScalar15
+    assertEqual "defaultScalar15" (fieldDefault :: Strict.ByteString)                  $ exampleMessage.defaultScalar15
+    assertEqual "defaultAnother"  (defMessage   :: Proto AnotherMessage)               $ exampleMessage.defaultAnother
+    assertEqual "defaultNested"   (defMessage   :: Proto ExampleMessage'NestedMessage) $ exampleMessage.defaultNested
+    assertEqual "defaultEnum"     (fieldDefault :: Proto ExampleEnum)                  $ exampleMessage.defaultEnum
+
+    assertEqual "maybe'defaultAnother"  (Nothing :: Maybe (Proto AnotherMessage))               $ exampleMessage.maybe'defaultAnother
+    assertEqual "maybe'defaultNested"   (Nothing :: Maybe (Proto ExampleMessage'NestedMessage)) $ exampleMessage.maybe'defaultNested
+
+-- | @optional@ fields
+--
+-- @protoc@, confusingly imho, generates the /same/ 'HasField' instances for
+-- optional field as it does for non-optional fields, supplying a default
+-- value if the field is absent. The actual maybe has a prefixed name.
+test_optional :: Assertion
+test_optional = do
+    assertEqual "optionalScalar01" (fieldDefault :: Double)                             $ exampleMessage.optionalScalar01
+    assertEqual "optionalScalar02" (fieldDefault :: Float)                              $ exampleMessage.optionalScalar02
+    assertEqual "optionalScalar03" (fieldDefault :: Int32)                              $ exampleMessage.optionalScalar03
+    assertEqual "optionalScalar04" (fieldDefault :: Int64)                              $ exampleMessage.optionalScalar04
+    assertEqual "optionalScalar05" (fieldDefault :: Word32)                             $ exampleMessage.optionalScalar05
+    assertEqual "optionalScalar06" (fieldDefault :: Word64)                             $ exampleMessage.optionalScalar06
+    assertEqual "optionalScalar07" (fieldDefault :: Int32)                              $ exampleMessage.optionalScalar07
+    assertEqual "optionalScalar08" (fieldDefault :: Int64)                              $ exampleMessage.optionalScalar08
+    assertEqual "optionalScalar09" (fieldDefault :: Word32)                             $ exampleMessage.optionalScalar09
+    assertEqual "optionalScalar10" (fieldDefault :: Word64)                             $ exampleMessage.optionalScalar10
+    assertEqual "optionalScalar11" (fieldDefault :: Int32)                              $ exampleMessage.optionalScalar11
+    assertEqual "optionalScalar12" (fieldDefault :: Int64)                              $ exampleMessage.optionalScalar12
+    assertEqual "optionalScalar13" (fieldDefault :: Bool)                               $ exampleMessage.optionalScalar13
+    assertEqual "optionalScalar14" (fieldDefault :: Text)                               $ exampleMessage.optionalScalar14
+    assertEqual "optionalScalar15" (fieldDefault :: Strict.ByteString)                  $ exampleMessage.optionalScalar15
+    assertEqual "optionalAnother"  (defMessage   :: Proto AnotherMessage)               $ exampleMessage.optionalAnother
+    assertEqual "optionalNested"   (defMessage   :: Proto ExampleMessage'NestedMessage) $ exampleMessage.optionalNested
+    assertEqual "optionalEnum"     (fieldDefault :: Proto ExampleEnum)                  $ exampleMessage.optionalEnum
+
+    assertEqual "maybe'optionalScalar01" (Nothing :: Maybe Double)                               $ exampleMessage.maybe'optionalScalar01
+    assertEqual "maybe'optionalScalar02" (Nothing :: Maybe Float)                                $ exampleMessage.maybe'optionalScalar02
+    assertEqual "maybe'optionalScalar03" (Nothing :: Maybe Int32)                                $ exampleMessage.maybe'optionalScalar03
+    assertEqual "maybe'optionalScalar04" (Nothing :: Maybe Int64)                                $ exampleMessage.maybe'optionalScalar04
+    assertEqual "maybe'optionalScalar05" (Nothing :: Maybe Word32)                               $ exampleMessage.maybe'optionalScalar05
+    assertEqual "maybe'optionalScalar06" (Nothing :: Maybe Word64)                               $ exampleMessage.maybe'optionalScalar06
+    assertEqual "maybe'optionalScalar07" (Nothing :: Maybe Int32)                                $ exampleMessage.maybe'optionalScalar07
+    assertEqual "maybe'optionalScalar08" (Nothing :: Maybe Int64)                                $ exampleMessage.maybe'optionalScalar08
+    assertEqual "maybe'optionalScalar09" (Nothing :: Maybe Word32)                               $ exampleMessage.maybe'optionalScalar09
+    assertEqual "maybe'optionalScalar10" (Nothing :: Maybe Word64)                               $ exampleMessage.maybe'optionalScalar10
+    assertEqual "maybe'optionalScalar11" (Nothing :: Maybe Int32)                                $ exampleMessage.maybe'optionalScalar11
+    assertEqual "maybe'optionalScalar12" (Nothing :: Maybe Int64)                                $ exampleMessage.maybe'optionalScalar12
+    assertEqual "maybe'optionalScalar13" (Nothing :: Maybe Bool)                                 $ exampleMessage.maybe'optionalScalar13
+    assertEqual "maybe'optionalScalar14" (Nothing :: Maybe Text)                                 $ exampleMessage.maybe'optionalScalar14
+    assertEqual "maybe'optionalScalar15" (Nothing :: Maybe Strict.ByteString)                    $ exampleMessage.maybe'optionalScalar15
+    assertEqual "maybe'optionalAnother"  (Nothing :: Maybe (Proto AnotherMessage))               $ exampleMessage.maybe'optionalAnother
+    assertEqual "maybe'optionalNested"   (Nothing :: Maybe (Proto ExampleMessage'NestedMessage)) $ exampleMessage.maybe'optionalNested
+    assertEqual "maybe'optionalEnum"     (Nothing :: Maybe (Proto ExampleEnum))                  $ exampleMessage.maybe'optionalEnum
+
+-- | @repeated@ fields
+test_repeated :: Assertion
+test_repeated = do
+    assertEqual "repeatedScalar01" ([] :: [Double])                             $ exampleMessage.repeatedScalar01
+    assertEqual "repeatedScalar02" ([] :: [Float])                              $ exampleMessage.repeatedScalar02
+    assertEqual "repeatedScalar03" ([] :: [Int32])                              $ exampleMessage.repeatedScalar03
+    assertEqual "repeatedScalar04" ([] :: [Int64])                              $ exampleMessage.repeatedScalar04
+    assertEqual "repeatedScalar05" ([] :: [Word32])                             $ exampleMessage.repeatedScalar05
+    assertEqual "repeatedScalar06" ([] :: [Word64])                             $ exampleMessage.repeatedScalar06
+    assertEqual "repeatedScalar07" ([] :: [Int32])                              $ exampleMessage.repeatedScalar07
+    assertEqual "repeatedScalar08" ([] :: [Int64])                              $ exampleMessage.repeatedScalar08
+    assertEqual "repeatedScalar09" ([] :: [Word32])                             $ exampleMessage.repeatedScalar09
+    assertEqual "repeatedScalar10" ([] :: [Word64])                             $ exampleMessage.repeatedScalar10
+    assertEqual "repeatedScalar11" ([] :: [Int32])                              $ exampleMessage.repeatedScalar11
+    assertEqual "repeatedScalar12" ([] :: [Int64])                              $ exampleMessage.repeatedScalar12
+    assertEqual "repeatedScalar13" ([] :: [Bool])                               $ exampleMessage.repeatedScalar13
+    assertEqual "repeatedScalar14" ([] :: [Text])                               $ exampleMessage.repeatedScalar14
+    assertEqual "repeatedScalar15" ([] :: [Strict.ByteString])                  $ exampleMessage.repeatedScalar15
+    assertEqual "repeatedAnother"  ([] :: [Proto AnotherMessage])               $ exampleMessage.repeatedAnother
+    assertEqual "repeatedNested"   ([] :: [Proto ExampleMessage'NestedMessage]) $ exampleMessage.repeatedNested
+    assertEqual "repeatedEnum"     ([] :: [Proto ExampleEnum])                  $ exampleMessage.repeatedEnum
+
+    assertEqual "vec'repeatedScalar01" (Vector.Unboxed.empty :: Unboxed.Vector Double)                             $ exampleMessage.vec'repeatedScalar01
+    assertEqual "vec'repeatedScalar02" (Vector.Unboxed.empty :: Unboxed.Vector Float)                              $ exampleMessage.vec'repeatedScalar02
+    assertEqual "vec'repeatedScalar03" (Vector.Unboxed.empty :: Unboxed.Vector Int32)                              $ exampleMessage.vec'repeatedScalar03
+    assertEqual "vec'repeatedScalar04" (Vector.Unboxed.empty :: Unboxed.Vector Int64)                              $ exampleMessage.vec'repeatedScalar04
+    assertEqual "vec'repeatedScalar05" (Vector.Unboxed.empty :: Unboxed.Vector Word32)                             $ exampleMessage.vec'repeatedScalar05
+    assertEqual "vec'repeatedScalar06" (Vector.Unboxed.empty :: Unboxed.Vector Word64)                             $ exampleMessage.vec'repeatedScalar06
+    assertEqual "vec'repeatedScalar07" (Vector.Unboxed.empty :: Unboxed.Vector Int32)                              $ exampleMessage.vec'repeatedScalar07
+    assertEqual "vec'repeatedScalar08" (Vector.Unboxed.empty :: Unboxed.Vector Int64)                              $ exampleMessage.vec'repeatedScalar08
+    assertEqual "vec'repeatedScalar09" (Vector.Unboxed.empty :: Unboxed.Vector Word32)                             $ exampleMessage.vec'repeatedScalar09
+    assertEqual "vec'repeatedScalar10" (Vector.Unboxed.empty :: Unboxed.Vector Word64)                             $ exampleMessage.vec'repeatedScalar10
+    assertEqual "vec'repeatedScalar11" (Vector.Unboxed.empty :: Unboxed.Vector Int32)                              $ exampleMessage.vec'repeatedScalar11
+    assertEqual "vec'repeatedScalar12" (Vector.Unboxed.empty :: Unboxed.Vector Int64)                              $ exampleMessage.vec'repeatedScalar12
+    assertEqual "vec'repeatedScalar13" (Vector.Unboxed.empty :: Unboxed.Vector Bool)                               $ exampleMessage.vec'repeatedScalar13
+    assertEqual "vec'repeatedScalar14" (Vector.Boxed.empty   :: Boxed.Vector Text)                                 $ exampleMessage.vec'repeatedScalar14
+    assertEqual "vec'repeatedScalar15" (Vector.Boxed.empty   :: Boxed.Vector Strict.ByteString)                    $ exampleMessage.vec'repeatedScalar15
+    assertEqual "vec'repeatedAnother"  (Vector.Boxed.empty   :: Boxed.Vector (Proto AnotherMessage))               $ exampleMessage.vec'repeatedAnother
+    assertEqual "vec'repeatedNested"   (Vector.Boxed.empty   :: Boxed.Vector (Proto ExampleMessage'NestedMessage)) $ exampleMessage.vec'repeatedNested
+    assertEqual "vec'repeatedEnum"     (Vector.Boxed.empty   :: Boxed.Vector (Proto ExampleEnum))                  $ exampleMessage.vec'repeatedEnum
+
+-- | @map@ fields
+test_map :: Assertion
+test_map = do
+    assertEqual "mapScalar01" (Map.empty :: Map Text Double)                               $ exampleMessage.mapScalar01
+    assertEqual "mapScalar02" (Map.empty :: Map Text Float)                                $ exampleMessage.mapScalar02
+    assertEqual "mapScalar03" (Map.empty :: Map Text Int32)                                $ exampleMessage.mapScalar03
+    assertEqual "mapScalar04" (Map.empty :: Map Text Int64)                                $ exampleMessage.mapScalar04
+    assertEqual "mapScalar05" (Map.empty :: Map Text Word32)                               $ exampleMessage.mapScalar05
+    assertEqual "mapScalar06" (Map.empty :: Map Text Word64)                               $ exampleMessage.mapScalar06
+    assertEqual "mapScalar07" (Map.empty :: Map Text Int32)                                $ exampleMessage.mapScalar07
+    assertEqual "mapScalar08" (Map.empty :: Map Text Int64)                                $ exampleMessage.mapScalar08
+    assertEqual "mapScalar09" (Map.empty :: Map Text Word32)                               $ exampleMessage.mapScalar09
+    assertEqual "mapScalar10" (Map.empty :: Map Text Word64)                               $ exampleMessage.mapScalar10
+    assertEqual "mapScalar11" (Map.empty :: Map Text Int32)                                $ exampleMessage.mapScalar11
+    assertEqual "mapScalar12" (Map.empty :: Map Text Int64)                                $ exampleMessage.mapScalar12
+    assertEqual "mapScalar13" (Map.empty :: Map Text Bool)                                 $ exampleMessage.mapScalar13
+    assertEqual "mapScalar14" (Map.empty :: Map Text Text)                                 $ exampleMessage.mapScalar14
+    assertEqual "mapScalar15" (Map.empty :: Map Text Strict.ByteString)                    $ exampleMessage.mapScalar15
+    assertEqual "mapAnother"  (Map.empty :: Map Text (Proto AnotherMessage))               $ exampleMessage.mapAnother
+    assertEqual "mapNested"   (Map.empty :: Map Text (Proto ExampleMessage'NestedMessage)) $ exampleMessage.mapNested
+    assertEqual "mapEnum"     (Map.empty :: Map Text (Proto ExampleEnum))                  $ exampleMessage.mapEnum
+
+-- | @oneof@ fields
+--
+-- The fact that these fields are mutually exclusive is not at all visible from
+-- this test.
+test_oneof :: Assertion
+test_oneof = do
+    assertEqual "oneofScalar01" (fieldDefault :: Double)                             $ exampleMessage.oneofScalar01
+    assertEqual "oneofScalar02" (fieldDefault :: Float)                              $ exampleMessage.oneofScalar02
+    assertEqual "oneofScalar03" (fieldDefault :: Int32)                              $ exampleMessage.oneofScalar03
+    assertEqual "oneofScalar04" (fieldDefault :: Int64)                              $ exampleMessage.oneofScalar04
+    assertEqual "oneofScalar05" (fieldDefault :: Word32)                             $ exampleMessage.oneofScalar05
+    assertEqual "oneofScalar06" (fieldDefault :: Word64)                             $ exampleMessage.oneofScalar06
+    assertEqual "oneofScalar07" (fieldDefault :: Int32)                              $ exampleMessage.oneofScalar07
+    assertEqual "oneofScalar08" (fieldDefault :: Int64)                              $ exampleMessage.oneofScalar08
+    assertEqual "oneofScalar09" (fieldDefault :: Word32)                             $ exampleMessage.oneofScalar09
+    assertEqual "oneofScalar10" (fieldDefault :: Word64)                             $ exampleMessage.oneofScalar10
+    assertEqual "oneofScalar11" (fieldDefault :: Int32)                              $ exampleMessage.oneofScalar11
+    assertEqual "oneofScalar12" (fieldDefault :: Int64)                              $ exampleMessage.oneofScalar12
+    assertEqual "oneofScalar13" (fieldDefault :: Bool)                               $ exampleMessage.oneofScalar13
+    assertEqual "oneofScalar14" (fieldDefault :: Text)                               $ exampleMessage.oneofScalar14
+    assertEqual "oneofScalar15" (fieldDefault :: Strict.ByteString)                  $ exampleMessage.oneofScalar15
+    assertEqual "oneofAnother"  (defMessage   :: Proto AnotherMessage)               $ exampleMessage.oneofAnother
+    assertEqual "oneofNested"   (defMessage   :: Proto ExampleMessage'NestedMessage) $ exampleMessage.oneofNested
+    assertEqual "oneofEnum"     (fieldDefault :: Proto ExampleEnum)                  $ exampleMessage.oneofEnum
+
+    assertEqual "maybe'oneofScalar01" (Nothing :: Maybe Double)                               $ exampleMessage.maybe'oneofScalar01
+    assertEqual "maybe'oneofScalar02" (Nothing :: Maybe Float)                                $ exampleMessage.maybe'oneofScalar02
+    assertEqual "maybe'oneofScalar03" (Nothing :: Maybe Int32)                                $ exampleMessage.maybe'oneofScalar03
+    assertEqual "maybe'oneofScalar04" (Nothing :: Maybe Int64)                                $ exampleMessage.maybe'oneofScalar04
+    assertEqual "maybe'oneofScalar05" (Nothing :: Maybe Word32)                               $ exampleMessage.maybe'oneofScalar05
+    assertEqual "maybe'oneofScalar06" (Nothing :: Maybe Word64)                               $ exampleMessage.maybe'oneofScalar06
+    assertEqual "maybe'oneofScalar07" (Nothing :: Maybe Int32)                                $ exampleMessage.maybe'oneofScalar07
+    assertEqual "maybe'oneofScalar08" (Nothing :: Maybe Int64)                                $ exampleMessage.maybe'oneofScalar08
+    assertEqual "maybe'oneofScalar09" (Nothing :: Maybe Word32)                               $ exampleMessage.maybe'oneofScalar09
+    assertEqual "maybe'oneofScalar10" (Nothing :: Maybe Word64)                               $ exampleMessage.maybe'oneofScalar10
+    assertEqual "maybe'oneofScalar11" (Nothing :: Maybe Int32)                                $ exampleMessage.maybe'oneofScalar11
+    assertEqual "maybe'oneofScalar12" (Nothing :: Maybe Int64)                                $ exampleMessage.maybe'oneofScalar12
+    assertEqual "maybe'oneofScalar13" (Nothing :: Maybe Bool)                                 $ exampleMessage.maybe'oneofScalar13
+    assertEqual "maybe'oneofScalar14" (Nothing :: Maybe Text)                                 $ exampleMessage.maybe'oneofScalar14
+    assertEqual "maybe'oneofScalar15" (Nothing :: Maybe Strict.ByteString)                    $ exampleMessage.maybe'oneofScalar15
+    assertEqual "maybe'oneofAnother"  (Nothing :: Maybe (Proto AnotherMessage))               $ exampleMessage.maybe'oneofAnother
+    assertEqual "maybe'oneofNested"   (Nothing :: Maybe (Proto ExampleMessage'NestedMessage)) $ exampleMessage.maybe'oneofNested
+    assertEqual "maybe'oneofEnum"     (Nothing :: Maybe (Proto ExampleEnum))                  $ exampleMessage.maybe'oneofEnum
+
+    --
+    -- Accessing the oneof as its own field
+    --
+    -- It kind of makes sense that we wrap this in @Proto@, as it has the same
+    -- 'HasField' instances. Most users would probably never access this field
+    -- in this way anyway.
+    --
+
+    assertEqual "maybe'exampleOneOf" (Nothing :: Maybe (Proto ExampleMessage'ExampleOneOf)) $ exampleMessage.maybe'exampleOneOf
+
+exampleMessage :: Proto ExampleMessage
+exampleMessage = defMessage
diff --git a/test-record-dot/Test/OverloadedRecordUpdate.hs b/test-record-dot/Test/OverloadedRecordUpdate.hs
new file mode 100644
--- /dev/null
+++ b/test-record-dot/Test/OverloadedRecordUpdate.hs
@@ -0,0 +1,30 @@
+{-# LANGUAGE OverloadedRecordDot    #-}
+{-# LANGUAGE OverloadedRecordUpdate #-}
+
+-- For now (ghc 9.2 .. 9.10) this is required if using OverloadedRecordUpdate
+{-# LANGUAGE RebindableSyntax #-}
+
+module Test.OverloadedRecordUpdate (tests) where
+
+import Prelude
+import GHC.Records.Compat
+
+import Network.GRPC.Common.Protobuf
+
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Proto.Spec
+
+tests :: TestTree
+tests = testGroup "Test.OverloadedRecordUpdate" [
+      testCase "update" test_update
+    ]
+
+test_update :: Assertion
+test_update = do
+    do let msg' = exampleMessage{defaultScalar01 = 1}
+       assertEqual "defaultScalar01" 1 $ msg'.defaultScalar01
+
+exampleMessage :: Proto ExampleMessage
+exampleMessage = defMessage
diff --git a/test-stress/Main.hs b/test-stress/Main.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Main.hs
@@ -0,0 +1,66 @@
+{-# LANGUAGE CPP #-}
+
+module Main (main) where
+
+import Control.Exception
+import GHC.Conc (setUncaughtExceptionHandler)
+import System.IO.Temp (writeSystemTempFile)
+import Text.Show.Pretty (dumpStr)
+
+#if defined(PROFILING) && MIN_VERSION_base(4,20,0)
+import Control.Exception.Backtrace
+#endif
+
+import Test.Stress.Client
+import Test.Stress.Cmdline
+import Test.Stress.Driver
+import Test.Stress.Common (say)
+import Test.Stress.Server
+
+{-------------------------------------------------------------------------------
+  Stress tests
+
+  Unlike the regular test suite, we support running the client and the server in
+  separate processes, so that we can run each with their own set of RTS flags.
+-------------------------------------------------------------------------------}
+
+main :: IO ()
+main = do
+#if defined(PROFILING) && MIN_VERSION_base(4,20,0)
+    setBacktraceMechanismState CostCentreBacktrace True
+#endif
+
+    -- Parse command-line options
+    cmdline@Cmdline{..} <- getCmdline
+    say (optsTracing cmdGlobalOpts) $
+      "parsed command-line options: " ++ show cmdline
+
+    setUncaughtExceptionHandler $ handleUncaughtExceptions cmdline
+
+    case cmdRole of
+      Client{..} ->
+        client
+          (optsTracing cmdGlobalOpts)
+          (unwrapNotPretty <$> clientSecurity)
+          clientServerPort
+          (unwrapNotPretty <$> clientCompression)
+          clientConnects
+      Server{..} ->
+        server
+          (optsTracing cmdGlobalOpts)
+          serverConfig
+      Driver{..} ->
+        driver
+          (optsTracing cmdGlobalOpts)
+          driverGenCharts
+          driverWorkingDir
+          driverDuration
+
+handleUncaughtExceptions :: Cmdline -> SomeException -> IO ()
+handleUncaughtExceptions cmdline e = do
+    fp <- writeSystemTempFile "test-stress" $ unlines [
+        dumpStr cmdline
+      , displayException e
+      ]
+    putStrLn $ "Abnormal termination. See " ++ show fp
+
diff --git a/test-stress/Test/Stress/Client.hs b/test-stress/Test/Stress/Client.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Test/Stress/Client.hs
@@ -0,0 +1,210 @@
+module Test.Stress.Client
+  ( client
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.Async
+import Control.Exception
+import Control.Monad
+import Data.ByteString.Lazy.Char8 qualified as BS.Char8
+import GHC.IO.Exception
+import Network.HTTP2.Client (HTTP2Error(..))
+import Network.Socket
+import Network.TLS (TLSException(..))
+
+import Network.GRPC.Client hiding (Call)
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression (Compression)
+import Network.GRPC.Common.Compression qualified as Compr
+import Proto.API.Trivial
+
+import Test.Stress.Cmdline
+import Test.Stress.Common
+
+-------------------------------------------------------------------------------
+-- Top-level
+-------------------------------------------------------------------------------
+
+client ::
+     Bool
+  -> Maybe ServerValidation
+  -> PortNumber
+  -> Maybe Compression
+  -> [Connect]
+  -> IO ()
+client v mServerValidation serverPort compr =
+    mapM_ $ runConnect v mServerValidation serverPort compr
+
+runConnect ::
+     Bool
+  -> Maybe ServerValidation
+  -> PortNumber
+  -> Maybe Compression
+  -> Connect
+  -> IO ()
+runConnect v mServerValidation serverPort compr Connect{..} = do
+    say' v serverPort $
+      "running calls " ++ show connectCalls ++
+        case connectExec of
+          Sequential -> " in sequence"
+          Concurrent -> " concurrently"
+    mapF (runCalls v mServerValidation serverPort compr callNum) $
+      zip [1..] $ replicate connectNum connectCalls
+  where
+    mapF =
+      case connectExec of
+        Sequential -> mapM_
+        Concurrent -> mapConcurrently_
+
+runCalls ::
+     Bool
+  -> Maybe ServerValidation
+  -> PortNumber
+  -> Maybe Compression
+  -> Int
+  -> (Int, [Call])
+  -> IO ()
+runCalls v mServerValidation serverPort compr callNum (connNum, calls) = do
+    say' v serverPort msg
+    let connParams = def {
+            connCompression = maybe Compr.none Compr.insist compr
+          , connHTTP2Settings = def {
+                http2TcpAbortiveClose = True
+              }
+          , connReconnectPolicy =
+              exponentialBackoff
+                (\d -> do
+                  say' v serverPort $ "Reconnecting after " ++ show d ++ "μs"
+                  threadDelay d
+                )
+                1
+                (0.1, 0.1)
+                maxBound
+
+          }
+    allowCertainFailures $
+      withConnection connParams server $ \conn ->
+        replicateM_ callNum $ mapM_ (runCall v serverPort conn) calls
+  where
+    addr :: Address
+    addr = Address {
+          addressHost      = "127.0.0.1"
+        , addressPort      = serverPort
+        , addressAuthority = Nothing
+        }
+
+    server :: Server
+    server =
+        case mServerValidation of
+          Just serverValidation ->
+            ServerSecure serverValidation SslKeyLogNone addr
+          Nothing ->
+            ServerInsecure addr
+
+    allowCertainFailures :: IO () -> IO ()
+    allowCertainFailures =
+      handle $ \case
+        e | Just ServerDisconnected{} <- fromException e ->
+          say' v serverPort $ "server disconnected: " ++ show e
+          | Just IOError{} <- fromException e ->
+          say' v serverPort "failed to connect"
+          | Just ConnectionIsTimeout <- fromException e ->
+          say' v serverPort "got ConnectionIsTimeout"
+          | Just BadThingHappen{} <- fromException e ->
+          say' v serverPort "got BadThingHappen"
+          | Just HandshakeFailed{} <- fromException e ->
+          say' v serverPort "got HandshakeFailed"
+          | Just BlockedIndefinitelyOnSTM{} <- fromException e ->
+          say' v serverPort "got BlockedIndefinitelyOnSTM"
+          | otherwise -> do
+          say' v serverPort $ "got exception: " ++ displayException e
+          throwIO e
+
+    msg :: String
+    msg =
+           "opening connection " ++ show connNum ++ " to "
+        ++ case mServerValidation of
+             Just _ -> "secure "
+             Nothing -> "insecure "
+        ++ "server at port " ++ show serverPort ++ " with compression "
+        ++ maybe "none" (show . Compr.compressionId) compr
+
+runCall :: Bool -> PortNumber -> Connection -> Call -> IO ()
+runCall v p conn =
+    \case
+      NonStreaming ->
+        nonStreaming v p conn
+      ClientStreaming n ->
+        clientStreaming v p conn n
+      ServerStreaming n ->
+        serverStreaming v p conn n
+      BiDiStreaming n ->
+        bidiStreaming v p conn n
+
+-------------------------------------------------------------------------------
+-- Specific RPCs
+-------------------------------------------------------------------------------
+
+-- | One non-streaming, round-trip call
+nonStreaming :: Bool -> PortNumber -> Connection -> IO ()
+nonStreaming v p conn = do
+    say' v p "initiating non-streaming call"
+    withRPC conn def (Proxy @(Trivial' "non-streaming")) $ \call -> do
+      sendFinalInput call =<< randomMsg
+      void $ recvFinalOutput call
+      say' v p "received final output for non-streaming call"
+
+-- | Client streaming
+--
+-- Client sends the server @N@, followed by @N@ messages.
+clientStreaming :: Bool -> PortNumber -> Connection -> Int -> IO ()
+clientStreaming v p conn n = do
+    say' v p "initiating client streaming call"
+    withRPC conn def (Proxy @(Trivial' "client-streaming")) $ \call -> do
+      say' v p $ "sending " ++ show n ++ " messages"
+      sendNextInput call $ BS.Char8.pack (show n)
+      msg <- randomMsg
+      forM_ [1 .. n-1] $ \_ ->
+        void $ sendNextInput call msg
+      sendFinalInput call msg
+      void $ recvFinalOutput call
+      say' v p "received final output for client streaming call"
+
+-- | Server streaming
+--
+-- Client sends the server @N@, then receives @N@ messages from server.
+serverStreaming :: Bool -> PortNumber -> Connection -> Int -> IO ()
+serverStreaming v p conn n = do
+    say' v p "initiating server streaming call"
+    withRPC conn def (Proxy @(Trivial' "server-streaming")) $ \call -> do
+      say' v p $ "receiving " ++ show n ++ " messages"
+      sendFinalInput call $ BS.Char8.pack (show n)
+      forM_ [1 .. n-1] $ \_ -> void $ recvNextOutput call
+      void $ recvFinalOutput call
+      say' v p "received final output for server streaming call"
+
+-- | Bidirectional streaming
+--
+-- Client sends the server @N@, then alternates sending and receiving @N*2@
+-- total messages.
+bidiStreaming :: Bool -> PortNumber -> Connection -> Int -> IO ()
+bidiStreaming v p conn n = do
+    say' v p "initiating bidi streaming call"
+    withRPC conn def (Proxy @(Trivial' "bidi-streaming")) $ \call -> do
+      say' v p $ "sending and receiving " ++ show n ++ " messages"
+      sendNextInput call $ BS.Char8.pack (show n)
+      msg <- randomMsg
+      forM_ [1 .. n-1] $ \_ -> do
+        sendNextInput call msg
+        void $ recvNextOutput call
+      sendFinalInput call msg
+      void $ recvFinalOutput call
+      say' v p "sent and received final messages for bidi streaming call"
+
+-------------------------------------------------------------------------------
+-- Utils
+-------------------------------------------------------------------------------
+
+say' :: Bool -> PortNumber -> String -> IO ()
+say' v p msg =
+  say v $ "(client " ++ show p ++ ") " ++ msg
diff --git a/test-stress/Test/Stress/Cmdline.hs b/test-stress/Test/Stress/Cmdline.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Test/Stress/Cmdline.hs
@@ -0,0 +1,448 @@
+{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module Test.Stress.Cmdline
+  ( -- * Types
+    Cmdline(..)
+  , Role(..)
+  , GlobalOpts(..)
+
+    -- ** Client-specific
+  , Connect(..)
+  , Exec(..)
+  , Call(..)
+
+    -- ** Server-specific
+  , Security(..)
+  , TlsOpts(..)
+
+    -- ** Auxiliary
+  , NotPretty(..)
+
+    -- * Parser
+  , getCmdline
+  ) where
+
+import Control.Applicative ((<|>))
+import Data.Foldable (asum, toList)
+import Data.Maybe (fromMaybe)
+import GHC.Generics (Generic)
+import Network.Socket (HostName, PortNumber)
+import Options.Applicative qualified as Opt
+import Text.Show.Pretty (PrettyVal(..), parseValue)
+
+import Network.GRPC.Client qualified as Client
+import Network.GRPC.Common
+import Network.GRPC.Common.Compression (Compression)
+import Network.GRPC.Common.Compression qualified as Compr
+import Network.GRPC.Server.Run
+
+import Paths_grapesy
+
+{-------------------------------------------------------------------------------
+  Definitions
+-------------------------------------------------------------------------------}
+
+-- | Command specification
+data Cmdline = Cmdline {
+      cmdRole       :: Role
+    , cmdGlobalOpts :: GlobalOpts
+    }
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+-- | Should we run the client, servers, or both?
+data Role =
+      -- | Run the clients
+      Client {
+          -- | Connect over TLS?
+          clientSecurity   :: Maybe (NotPretty Client.ServerValidation)
+        , clientServerPort :: PortNumber
+        , clientConnects   :: [Connect]
+
+          -- | Insist on this compression scheme for all messages
+        , clientCompression :: Maybe (NotPretty Compression)
+        }
+
+      -- | Run the server
+    | Server {
+          serverConfig :: ServerConfig
+        }
+
+      -- | Run the automatic stress test suite
+    | Driver {
+          driverWorkingDir :: Maybe FilePath
+        , driverDuration   :: Int
+        , driverGenCharts  :: Bool
+        }
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+-- | Connections to execute
+data Connect = Connect {
+      -- | Execute the connections concurrently or sequentially?
+      connectExec :: Exec
+
+      -- | Number of connections
+    , connectNum :: Int
+
+      -- | Number of times to repeat the calls on the connection
+    , callNum :: Int
+
+      -- | Calls to make on the connections
+    , connectCalls :: [Call]
+    }
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+-- | Concurrent or sequential execution
+data Exec = Concurrent | Sequential
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+-- | Types of RPCs
+data Call =
+      -- | A single message back and forth
+      NonStreaming
+
+      -- | Client sends @N@ messages to the server
+    | ClientStreaming Int
+
+      -- | Server sends @N@ messages to the client
+    | ServerStreaming Int
+
+      -- | Client and server send @N@ messages to each other
+    | BiDiStreaming Int
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+data Security =
+      Insecure
+    | Secure
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+data TlsOpts = TlsOpts {
+      tlsPubCert    :: FilePath
+    , tlsChainCerts :: [FilePath]
+    , tlsPrivKey    :: FilePath
+    }
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+mkConfig :: Maybe TlsOpts -> HostName -> PortNumber -> ServerConfig
+mkConfig mtls host port =
+    case mtls of
+      Just TlsOpts{..} ->
+        ServerConfig Nothing $ Just SecureConfig {
+            secureHost       = host
+          , securePort       = port
+          , securePubCert    = tlsPubCert
+          , secureChainCerts = tlsChainCerts
+          , securePrivKey    = tlsPrivKey
+          , secureSslKeyLog  = SslKeyLogNone
+          }
+      Nothing ->
+        (`ServerConfig` Nothing) $ Just InsecureConfig {
+            insecureHost = Just host
+          , insecurePort = port
+          }
+
+data GlobalOpts = GlobalOpts {
+      optsTracing :: Bool
+    }
+  deriving stock (Show, Generic)
+  deriving anyclass (PrettyVal)
+
+-------------------------------------------------------------------------------
+-- Top-level parsers
+-------------------------------------------------------------------------------
+
+getCmdline :: IO Cmdline
+getCmdline = do
+    defaultPub  <- getDataFileName "grpc-demo.pem"
+    defaultPriv <- getDataFileName "grpc-demo.key"
+
+    let info  :: Opt.ParserInfo Cmdline
+        info = Opt.info
+                 (          parseCmdline defaultPub defaultPriv
+                   Opt.<**> Opt.helper
+                 )
+                 Opt.fullDesc
+
+    Opt.execParser info
+
+parseCmdline ::
+     FilePath
+  -> FilePath
+  -> Opt.Parser Cmdline
+parseCmdline defaultPub defaultPriv =
+    Cmdline
+      <$> (parseRole defaultPub defaultPriv <|> pure (Driver Nothing 60 False))
+      <*> parseGlobalOpts
+
+parseRole :: FilePath -> FilePath -> Opt.Parser Role
+parseRole defaultPub defaultPriv = Opt.subparser $ mconcat [
+      sub "client" "Run the client" $
+        parseClientRole defaultPub
+    , sub "server" "Run the server" $
+        parseServerRole defaultPub defaultPriv
+    , sub "driver" "Run the stress test driver" $
+        parseDriverRole
+    ]
+
+-------------------------------------------------------------------------------
+-- Client option parsers
+-------------------------------------------------------------------------------
+
+parseClientRole :: FilePath -> Opt.Parser Role
+parseClientRole defaultPub =
+    Client
+      <$> (fmap WrapNotPretty <$> parseClientSecurity defaultPub)
+      <*> parseClientPort
+      <*> parseClientConnects
+      <*> Opt.optional (WrapNotPretty <$> parseCompression)
+
+parseClientSecurity :: FilePath -> Opt.Parser (Maybe Client.ServerValidation)
+parseClientSecurity defaultPub =
+    Opt.optional (
+        Opt.flag' () (mconcat [
+            Opt.long "secure"
+          , Opt.help "Connect over TLS"
+          ])
+        *> parseServerValidation
+      )
+  where
+    parseServerValidation :: Opt.Parser Client.ServerValidation
+    parseServerValidation =
+        aux
+          <$> (Opt.switch $ mconcat [
+                  Opt.long "no-server-validation"
+                , Opt.help "Skip server (certificate) validation"
+                ])
+          <*> (Opt.switch $ mconcat [
+                  Opt.long "cert-store-from-system"
+                , Opt.help "Enable the system certificate store"
+                ])
+          <*> (Opt.option Opt.str $ mconcat [
+                  Opt.long "cert-store-from-path"
+                , Opt.help "Load certificate store from file or directory (set to empty to disable)"
+                , Opt.metavar "PATH"
+                , Opt.value defaultPub
+                , Opt.showDefault
+                ])
+      where
+        aux :: Bool -> Bool -> FilePath -> Client.ServerValidation
+        aux noServerValidation certStoreFromSystem certStoreFromPath =
+            if noServerValidation then
+              Client.NoServerValidation
+            else
+              Client.ValidateServer $ mconcat . concat $ [
+                  [ Client.certStoreFromSystem
+                  | certStoreFromSystem
+                  ]
+
+                , [ Client.certStoreFromPath certStoreFromPath
+                  | not (null certStoreFromPath)
+                  ]
+                ]
+
+parseClientPort :: Opt.Parser PortNumber
+parseClientPort =
+    Opt.option Opt.auto (mconcat [
+        Opt.long "port"
+      , Opt.help "Connect to the server at PORT"
+      , Opt.metavar "PORT"
+      ])
+
+parseClientConnects :: Opt.Parser [Connect]
+parseClientConnects =
+    Opt.some $ Connect
+      <$> Opt.flag Sequential Concurrent (mconcat [
+              Opt.long "concurrent"
+            , Opt.help "Open connections concurrently"
+            ])
+      <*> Opt.option Opt.auto (mconcat [
+              Opt.long "num-connections"
+            , Opt.help "Open N connections"
+            , Opt.metavar "N"
+            , Opt.value 1
+            , Opt.showDefault
+            ])
+      <*> Opt.option Opt.auto (mconcat [
+              Opt.long "num-calls"
+            , Opt.help "Repeat the calls N times on each connection"
+            , Opt.metavar "N"
+            , Opt.value 1
+            , Opt.showDefault
+            ])
+      <*> Opt.some parseCall
+
+parseCall :: Opt.Parser Call
+parseCall =
+        nonStreaming
+    <|> clientStreaming
+    <|> serverStreaming
+    <|> bidiStreaming
+  where
+    nonStreaming :: Opt.Parser Call
+    nonStreaming =
+        Opt.flag' NonStreaming $ mconcat [
+            Opt.long "non-streaming"
+          , Opt.help "Make a single non-streaming call"
+          ]
+
+    clientStreaming :: Opt.Parser Call
+    clientStreaming =
+        ClientStreaming
+          <$> Opt.option Opt.auto (mconcat [
+                  Opt.long "client-streaming"
+                , Opt.help "Stream N messages from the client"
+                , Opt.metavar "N"
+                ])
+
+    serverStreaming :: Opt.Parser Call
+    serverStreaming =
+        ServerStreaming
+          <$> Opt.option Opt.auto (mconcat [
+                  Opt.long "server-streaming"
+                , Opt.help "Stream N messages from the server"
+                , Opt.metavar "N"
+                ])
+
+    bidiStreaming :: Opt.Parser Call
+    bidiStreaming =
+        BiDiStreaming
+          <$> Opt.option Opt.auto (mconcat [
+                  Opt.long "bidi-streaming"
+                , Opt.help "Stream N messages from both the client and server"
+                , Opt.metavar "N"
+                ])
+
+parseCompression :: Opt.Parser Compression
+parseCompression = asum $ map go (toList Compr.allSupportedCompression)
+  where
+    go :: Compression -> Opt.Parser Compression
+    go compr = Opt.flag' compr $ mconcat [
+          Opt.long comprId
+        , Opt.help $ "Insist on " ++ comprId ++ " compression "
+        ]
+      where
+        comprId :: String
+        comprId = show (Compr.compressionId compr)
+
+-------------------------------------------------------------------------------
+-- Server option parsers
+-------------------------------------------------------------------------------
+
+parseServerRole :: FilePath -> FilePath -> Opt.Parser Role
+parseServerRole defaultPub defaultPriv =
+    aux
+      <$> parseServerPort
+      <*> parseServerSecurity defaultPub defaultPriv
+  where
+    aux :: PortNumber -> Maybe TlsOpts -> Role
+    aux port mtls = Server $ mkConfig mtls "127.0.0.1" port
+
+parseServerPort :: Opt.Parser PortNumber
+parseServerPort =
+    Opt.option Opt.auto (mconcat [
+        Opt.long "port"
+      , Opt.help "Bind the server to port PORT"
+      , Opt.metavar "PORT"
+      ])
+
+parseServerSecurity :: FilePath -> FilePath -> Opt.Parser (Maybe TlsOpts)
+parseServerSecurity defaultPub defaultPriv =
+    Opt.optional $
+      Opt.flag' () (mconcat [
+          Opt.long "secure"
+        , Opt.help "Enable TLS on the servers"
+        ])
+      *> parseTlsOpts defaultPub defaultPriv
+
+parseTlsOpts :: FilePath -> FilePath -> Opt.Parser TlsOpts
+parseTlsOpts defaultPub defaultPriv =
+    TlsOpts
+      <$> Opt.strOption (mconcat [
+              Opt.long "tls-pub"
+            , Opt.help "TLS public certificate (X.509 format)"
+            , Opt.metavar "CERT_FILE"
+            , Opt.showDefault
+            , Opt.value defaultPub
+            ])
+      <*> Opt.many (Opt.strOption $ mconcat [
+              Opt.long "tls-cert"
+            , Opt.metavar "CERT_FILE"
+            , Opt.help "TLS chain certificate (X.509 format)"
+            ])
+      <*> Opt.strOption (mconcat [
+              Opt.long "tls-priv"
+            , Opt.metavar "KEY_FILE"
+            , Opt.help "TLS private key"
+            , Opt.showDefault
+            , Opt.value defaultPriv
+            ])
+
+-------------------------------------------------------------------------------
+-- Driver option parsers
+-------------------------------------------------------------------------------
+
+parseDriverRole :: Opt.Parser Role
+parseDriverRole =
+    Driver
+      <$> Opt.optional (Opt.strOption (mconcat [
+              Opt.long "working-dir"
+            , Opt.help "Write result files to this directory, must already exist"
+            , Opt.metavar "DIR"
+            ]))
+      <*> Opt.option Opt.auto (mconcat [
+              Opt.long "duration"
+            , Opt.help "Run the stress tests for this many seconds"
+            , Opt.metavar "SECONDS"
+            , Opt.value 60
+            , Opt.showDefault
+            ])
+      <*> Opt.switch (mconcat [
+              Opt.long "gen-charts"
+            , Opt.help "Generate heap profile charts for stable components"
+            ])
+
+-------------------------------------------------------------------------------
+-- Internal auxiliary
+-------------------------------------------------------------------------------
+
+parseGlobalOpts :: Opt.Parser GlobalOpts
+parseGlobalOpts =
+    GlobalOpts
+      <$> Opt.switch (mconcat [
+              Opt.long "verbose"
+            , Opt.short 'v'
+            , Opt.help "Trace test execution to stdout"
+            ])
+
+sub :: String -> String -> Opt.Parser a -> Opt.Mod Opt.CommandFields a
+sub cmd desc parser =
+    Opt.command cmd $
+      Opt.info (parser Opt.<**> Opt.helper) (Opt.progDesc desc)
+
+-------------------------------------------------------------------------------
+-- Auxiliary: pretty-val
+-------------------------------------------------------------------------------
+
+newtype NotPretty a = WrapNotPretty { unwrapNotPretty :: a }
+  deriving newtype (Show)
+
+instance Show a => PrettyVal (NotPretty a) where
+  prettyVal (WrapNotPretty x) =
+      fromMaybe
+        (error $ "prettyVal: could not parse " ++ show x)
+        (parseValue $ show x)
+
+instance PrettyVal PortNumber where
+  prettyVal = prettyVal . (fromIntegral :: PortNumber -> Integer)
+
+deriving anyclass instance PrettyVal ServerConfig
+deriving anyclass instance PrettyVal InsecureConfig
+deriving anyclass instance PrettyVal SecureConfig
+deriving anyclass instance PrettyVal SslKeyLog
diff --git a/test-stress/Test/Stress/Common.hs b/test-stress/Test/Stress/Common.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Test/Stress/Common.hs
@@ -0,0 +1,25 @@
+module Test.Stress.Common
+  ( -- * Logging
+    say
+
+    -- * Miscellaneous
+  , randomMsg
+  ) where
+
+import Data.ByteString.Lazy qualified as Lazy
+import System.Random
+
+-- | Generate a random 'Lazy.ByteString' between 128 and 256 bytes in length
+randomMsg :: IO Lazy.ByteString
+randomMsg = do
+    g1 <- getStdGen
+    let (l, g2) = randomR (128, 256) g1
+    return . Lazy.fromStrict . fst $ genByteString l g2
+
+-- | Log the message, if logging is enabled
+say :: Bool -> String -> IO ()
+say enabled msg
+    | enabled
+    = putStrLn $ "test-stress: " ++ msg
+    | otherwise
+    = return ()
diff --git a/test-stress/Test/Stress/Driver.hs b/test-stress/Test/Stress/Driver.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Test/Stress/Driver.hs
@@ -0,0 +1,333 @@
+module Test.Stress.Driver
+  ( driver
+  ) where
+
+import Control.Concurrent
+import Control.Concurrent.Async
+import Control.Exception
+import Control.Monad
+import Control.Monad.Catch (ExitCase(..), generalBracket)
+import Data.IORef
+import System.Environment
+import System.Exit
+import System.Process
+import System.Random
+
+import Test.Stress.Common
+import Test.Stress.Driver.Summary
+
+-------------------------------------------------------------------------------
+-- Top-level
+-------------------------------------------------------------------------------
+
+-- | Run the automatic stress test suite
+--
+-- See documentation in the source repository for details.
+driver :: Bool -> Bool -> Maybe FilePath -> Int -> IO ()
+driver v genCharts mwd duration = do
+    putStrLn $
+      "Running stress test driver for " ++ show duration ++ " seconds..."
+    exitCodeRef <- newIORef ExitSuccess
+    bracket
+      ( do
+          runningServers <- mapM (forkComponent v genCharts mwd) servers
+          runningClients <- mapM (forkComponent v genCharts mwd) clients
+          return $ runningServers ++ runningClients
+      )
+      (\running -> do
+        say v "(driver) stopping all components"
+        cancelMany running
+        say v "(driver) stopped all components"
+      )
+      (\running -> do
+        result <- race (threadDelay (duration * 1_000_000)) (waitAnyCatch running)
+        case result of
+          Right (_, Left e)
+            | Just (TestFailure _) <- fromException e -> do
+              writeIORef exitCodeRef (ExitFailure 1)
+              throwIO e
+            | otherwise ->
+              return ()
+          _ -> return ()
+      )
+      `catch`
+        \case
+          e | Just f@TestFailure{} <- fromException e -> do
+                putStrLn $ "stress test failed: " ++ show f
+            | otherwise -> do
+                say v $ "(driver) exiting cleanly, got exception: " ++ show e
+
+    -- At this point, the heap profiles should all be written in the working
+    -- directory. We convert them each to charts of total heap usage over time
+    -- and combine into a summary document
+    when genCharts $
+      createSummaryPlots v mwd
+    putStrLn "Done"
+    exitCode <- readIORef exitCodeRef
+    exitWith exitCode
+
+-------------------------------------------------------------------------------
+-- Auxiliary
+-------------------------------------------------------------------------------
+
+data Component = Component {
+      -- | Client or server?
+      componentType   :: ClientServer
+
+      -- | What port to bind/connect to
+    , componentPort   :: Int
+
+      -- | Use TLS?
+    , componentSecure :: Bool
+
+      -- | Should the component stay running indefinitely?
+      --
+      -- If 'False', component will be killed and restarted at random intervals
+      -- and it will not be configured to write a heap profile.
+    , componentStable :: Bool
+
+      -- | Heap size limit in Megabytes (e.g. @Just 15@ becomes @-M15m@)
+      --
+      -- Set to 'Nothing' for no limit.
+    , componentLimit  :: Maybe Int
+
+      -- | Name
+      --
+      -- Determines the name of the heap profile file that will be written out.
+    , componentName   :: String
+    }
+  deriving (Show)
+
+data ClientServer =
+      Client {
+          -- | Which compression should be used?
+          --
+          -- We don't currently use this in the driver to avoid running too many
+          -- clients, but it is left here as an option.
+          clientCompr :: Maybe String
+
+          -- | Specify which calls should be executed
+        , clientFlags :: [String]
+        }
+    | Server
+  deriving (Show, Eq)
+
+newtype TestFailure = TestFailure String
+  deriving (Show)
+  deriving anyclass Exception
+
+cmd :: Bool -> ClientServer -> [String]
+cmd v t = mconcat [
+      [ "-v" | v ]
+    , case t of
+        Client mcompr flags ->
+          mconcat [
+              [ "client" ]
+            , [ "--"++compr | Just compr <- [mcompr] ]
+            , flags
+            ]
+        Server ->
+          [ "server" ]
+    ]
+
+forkComponent :: Bool -> Bool -> Maybe FilePath -> Component -> IO (Async ())
+forkComponent v genCharts mwd c = do
+    say v $ "(driver) forking component " ++ show c
+    async $
+      runComponent v genCharts mwd c `catch`
+        \case
+          (e :: SomeException)
+            | Just AsyncCancelled <- fromException e ->
+                say v $ "(driver) cancelled forked component " ++ show c
+            | otherwise -> do
+                say v $ "(driver) component exited with " ++ show e
+                throwIO e
+
+runComponent :: Bool -> Bool -> Maybe FilePath -> Component -> IO ()
+runComponent v genCharts mwd c@Component{..} = do
+    say' $ "starting " ++ componentName
+    exe <- getExecutablePath
+    let cp = proc exe (mconcat [
+            cmd v componentType
+          , [ "--port=" ++ show componentPort ]
+          , [ "--secure" | componentSecure ]
+          , if componentType == Server then
+              [ "+RTS", "-N", "-RTS" ]
+            else
+              []
+          , filter (const $ componentStable && genCharts) [
+                "+RTS"
+              , "-l"
+              , "-hT"
+              , "-ol" ++ componentName ++ ".eventlog"
+              , "-RTS"
+              ]
+          , case componentLimit of
+              Just limit -> [
+                  "+RTS"
+                , "-M" ++ show limit ++ "m"
+                , "-RTS"
+                ]
+              Nothing ->
+                []
+          ])
+    (k, ec) <-
+      generalBracket
+        (do
+          (_, _, _, ph) <-
+            createProcess_
+              ("runComponent (" ++ componentName ++ ")")
+              cp {cwd = mwd}
+          return ph
+        )
+        (\ph ec -> do
+          terminateProcess ph
+          return ec
+        )
+        watchComponent
+    case ec of
+      ExitCaseSuccess _ -> k
+      ExitCaseException e
+        | Just (TestFailure _) <- fromException e ->
+          throwIO e
+        | otherwise ->
+          k
+      ExitCaseAbort -> throwIO $ TestFailure $ componentName ++ " aborted"
+  where
+    watchComponent :: ProcessHandle -> IO (IO ())
+    watchComponent ph =
+        if componentStable then do
+          say' $ "watching " ++ componentName
+          ec <- waitForProcess ph
+          case ec of
+            ExitFailure _ -> do
+              say' $ "unexpected ExitFailure from " ++ show componentName
+              throwIO $ TestFailure componentName
+            ExitSuccess -> do
+              say' $ componentName ++ " exited successfully, rerunning"
+              return $ runComponent v genCharts mwd c
+        else do
+          d <- randomRIO (16_000_000, 20_000_000)
+          say' $
+            "waiting " ++ show d ++ "µs before killing " ++ show componentName
+          threadDelay d
+          mec <- getProcessExitCode ph
+          case mec of
+            Just (ExitFailure _) -> do
+              say' $ "unexpected ExitFailure from " ++ show componentName
+              throwIO $ TestFailure componentName
+            _ -> do
+              say' $ "terminating " ++ show componentName
+              terminateProcess ph
+              d' <- randomRIO (200_000, 500_000)
+              say' $
+                "waiting " ++ show d ++ "µs before restarting " ++
+                show componentName
+              threadDelay d'
+              return $ runComponent v genCharts mwd c
+
+    say' :: String -> IO ()
+    say' = say v . ("(driver) " ++)
+
+servers :: [Component]
+servers = [
+      Component {
+          componentType   = Server
+        , componentPort   = 50000
+        , componentSecure = False
+        , componentStable = False
+        , componentLimit  = Just 400
+        , componentName   = "server-unstable-insecure"
+        }
+    , Component {
+          componentType   = Server
+        , componentPort   = 50001
+        , componentSecure = True
+        , componentStable = False
+        , componentLimit  = Just 400
+        , componentName   = "server-unstable-secure"
+        }
+    , Component {
+          componentType   = Server
+        , componentPort   = 50002
+        , componentSecure = False
+        , componentStable = True
+        , componentLimit  = Just 400
+        , componentName   = "server-stable-insecure"
+        }
+    , Component {
+          componentType   = Server
+        , componentPort   = 50003
+        , componentSecure = True
+        , componentStable = True
+        , componentLimit  = Just 400
+        , componentName   = "server-stable-secure"
+        }
+    ]
+
+clients :: [Component]
+clients = [
+      Component {
+        componentType   = Client Nothing flags
+      , componentPort   = snd portSecurity
+      , componentSecure = fst portSecurity
+      , componentStable = stable
+      , componentLimit  = Just 60
+      , componentName = mconcat [
+            "client-"
+          , show (snd portSecurity) ++ "-"
+          , if stable then "stable-" else "unstable-"
+          , if fst portSecurity then "secure-" else "insecure-"
+          , nameStr
+          ]
+      }
+    | (flags, nameStr) <- [
+          ( [ indefinitely "--num-connections"
+            , "--non-streaming"
+            ]
+          , "non-streaming-many-connections"
+          )
+        , ( [ indefinitely "--num-calls"
+            , "--non-streaming"
+            ]
+          , "non-streaming-many-calls"
+          )
+        , ( [ indefinitely "--client-streaming"
+            ]
+          , "client-stream"
+          )
+        , ( [ indefinitely "--num-calls"
+            , "--client-streaming=10"
+            ]
+          , "client-stream-many-calls"
+          )
+        , ( [ indefinitely "--server-streaming"
+            ]
+          , "server-stream"
+          )
+        , ( [ indefinitely "--num-calls"
+            , "--server-streaming=10"
+            ]
+          , "server-stream-many-calls"
+          )
+        , ( [ indefinitely "--bidi-streaming"
+            ]
+          , "bidi-stream"
+          )
+        , ( [ indefinitely "--num-calls"
+            , "--bidi-streaming=10"
+            ]
+          , "bidi-stream-many-calls"
+          )
+        ]
+    , portSecurity <- [
+          (False, 50000)
+        , (False, 50002)
+        , (True , 50001)
+        , (True , 50003)
+        ]
+    , stable <- [True, False]
+    ]
+  where
+    indefinitely :: String -> String
+    indefinitely = (++ "=100000000")
diff --git a/test-stress/Test/Stress/Driver/Summary.hs b/test-stress/Test/Stress/Driver/Summary.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Test/Stress/Driver/Summary.hs
@@ -0,0 +1,112 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Test.Stress.Driver.Summary
+  ( createSummaryPlots
+  , eventlogToSvg
+  ) where
+
+import Control.Exception
+import Data.ByteString.Lazy.Char8 qualified as BS.Lazy
+import Data.List
+import Data.Maybe
+import Data.Word
+import GHC.RTS.Events
+import GHC.RTS.Events.Incremental
+import Graphics.Rendering.Chart.Backend.Diagrams
+import Graphics.Rendering.Chart.Easy hiding ((<.>))
+import System.Directory
+import System.Exit
+import System.FilePath
+
+import Test.Stress.Common
+
+createSummaryPlots :: Bool -> Maybe FilePath -> IO ()
+createSummaryPlots v mwd = do
+    cwd <- getCurrentDirectory
+    let wd = fromMaybe cwd mwd
+    putStrLn $ "Creating summary plots in " ++ wd ++ "..."
+    wdFiles <- map (wd </>) <$> listDirectory wd
+    let wdElFiles = filter (".eventlog" `isSuffixOf`) wdFiles
+    say' v $ "found event logs:"
+    mapM_ (say' v) $ map ("  " ++) wdElFiles
+    mapM_ (\e -> handleFailure e $ eventlogToSvg v e) wdElFiles
+  where
+    handleFailure :: FilePath -> IO () -> IO ()
+    handleFailure f =
+        handle $ \case
+          e | Just UserInterrupt <- fromException e ->
+              exitFailure
+            | otherwise -> do
+              putStrLn $ "failed to generate summary plot for " ++ f
+              print e
+
+eventlogToSvg :: Bool -> FilePath -> IO ()
+eventlogToSvg v elFile = do
+    say' v $ "generating plot file for " ++ elFile
+    elBytes <- BS.Lazy.readFile elFile
+    case readEventLog elBytes of
+      Right (EventLog _ (Data events), _merr) -> do
+        samples <- goEvents emptySamples events
+        toFile def (elFile <.> "svg") $ do
+          layout_title .= elFile
+          layout_x_axis . laxis_title .= "Time (seconds)"
+          layout_y_axis . laxis_title .= "Size (megabytes)"
+          plot (line "live bytes" [samplesLiveBytes samples])
+          plot (line "blocks size" [samplesBlocksSize samples])
+          plot (line "heap size" [samplesHeapSize samples])
+        say' v $ "finished plot for " ++ elFile
+      Left err ->
+        putStrLn $
+          "Failed to create summary plot from " ++ elFile ++ ": " ++ err
+  where
+    goEvents :: Samples -> [Event] -> IO Samples
+    goEvents acc [] =
+        return acc
+    goEvents acc (Event t ei _:es) = do
+        acc' <- addEvent acc (t,ei)
+          `catch` (\(_e :: SomeException) -> return acc)
+        goEvents acc' es
+
+    addEvent :: Samples -> (Timestamp, EventInfo) -> IO Samples
+    addEvent acc (t, ei) =
+        case ei of
+          HeapLive _ s -> return $ acc {
+              samplesLiveBytes =
+                insertBy byFirst
+                  (timeConv t, sizeConv s) (samplesLiveBytes acc)
+            }
+          BlocksSize _ s -> return $ acc {
+              samplesBlocksSize =
+                insertBy byFirst
+                  (timeConv t, sizeConv s) (samplesBlocksSize acc)
+            }
+          HeapSize _ s -> return $ acc {
+              samplesHeapSize =
+                insertBy byFirst
+                  (timeConv t, sizeConv s) (samplesHeapSize acc)
+            }
+          _ -> return acc
+      where
+        timeConv :: Word64 -> Double
+        sizeConv :: Word64 -> Double
+        timeConv = (/ 1_000_000_000) . fromIntegral -- nanoseconds to seconds
+        sizeConv = (/ 1_000_000)     . fromIntegral -- bytes to megabytes
+
+say' :: Bool -> String -> IO ()
+say' v = say v . ("(summary) " ++)
+
+byFirst :: Ord a => (a, b) -> (a, b) -> Ordering
+byFirst (x1, _) (x2, _) = compare x1 x2
+
+-------------------------------------------------------------------------------
+-- Internal auxiliary
+-------------------------------------------------------------------------------
+
+data Samples = Samples {
+      samplesLiveBytes  :: [(Double, Double)]
+    , samplesBlocksSize :: [(Double, Double)]
+    , samplesHeapSize   :: [(Double, Double)]
+    }
+
+emptySamples :: Samples
+emptySamples = Samples [] [] []
diff --git a/test-stress/Test/Stress/Server.hs b/test-stress/Test/Stress/Server.hs
new file mode 100644
--- /dev/null
+++ b/test-stress/Test/Stress/Server.hs
@@ -0,0 +1,122 @@
+module Test.Stress.Server
+  ( server
+  ) where
+
+import Control.Exception
+import Control.Monad
+import Data.ByteString.Lazy.Char8 qualified as BS.Char8
+import Data.IORef
+import Data.Text qualified as Text
+import System.Exit (exitFailure)
+
+import Network.GRPC.Common
+import Network.GRPC.Server
+import Network.GRPC.Server.Run
+import Proto.API.Trivial
+
+import Test.Stress.Common
+
+{-------------------------------------------------------------------------------
+  Top-level
+-------------------------------------------------------------------------------}
+
+server :: Bool -> ServerConfig -> IO ()
+server v config = handle swallowInterruptOrKilled $ do
+    idRef <- newIORef "unknown"
+    s <- mkGrpcServer params (handlers v idRef)
+    forkServer def config s $ \runningServer -> do
+      p <- getServerPort runningServer
+      writeIORef idRef $ show p
+      say v $ "server running on port " ++ show p
+      waitServer runningServer
+  where
+    swallowInterruptOrKilled :: SomeException -> IO ()
+    swallowInterruptOrKilled e
+        | Just UserInterrupt <- asyncExceptionFromException e
+        = say v "server received user interrupt, exiting gracefully"
+        | Just ThreadKilled <- asyncExceptionFromException e
+        = say v "server thread killed, exiting gracefully"
+        | otherwise
+        = do
+          putStrLn $ "got unexpected server exception: " ++ show e
+          exitFailure
+
+    params :: ServerParams
+    params = def {
+          -- Show exception including backtrace
+          serverExceptionToClient = \e ->
+            return $ Just (Text.pack $ displayException e)
+        }
+
+{-------------------------------------------------------------------------------
+  Handlers
+-------------------------------------------------------------------------------}
+
+handlers :: Bool -> IORef String -> [SomeRpcHandler IO]
+handlers v idRef = [
+      someRpcHandler @(Trivial' "non-streaming") $
+        mkRpcHandler $ clientDisconnectOkay . nonStreaming
+    , someRpcHandler @(Trivial' "server-streaming") $
+        mkRpcHandler $ clientDisconnectOkay . serverStreaming
+    , someRpcHandler @(Trivial' "client-streaming") $
+        mkRpcHandler $ clientDisconnectOkay . clientStreaming
+    , someRpcHandler @(Trivial' "bidi-streaming") $
+        mkRpcHandler $ clientDisconnectOkay . bidiStreaming
+    ]
+  where
+    -- Single message from client, single message from server
+    nonStreaming :: Call (Trivial' "non-streaming") -> IO ()
+    nonStreaming call = do
+        say' "handling non-streaming call"
+        msg <- recvFinalInput call
+        sendFinalOutput call $ (msg, NoMetadata)
+        say' "sent final output for non-streaming call"
+
+    -- Client sends message containing number N, then client streams N messages
+    -- to server
+    clientStreaming :: Call (Trivial' "client-streaming") -> IO ()
+    clientStreaming call = do
+        say' "handling client streaming call"
+        inp <- read @Int . BS.Char8.unpack <$> recvNextInput call
+        say' $ "receiving " ++ show inp ++ " messages"
+        forM_ [1 .. inp-1] $ \_ -> void $ recvNextInput call
+        msg <- recvFinalInput call
+        sendFinalOutput call (msg, NoMetadata)
+        say' $ "sent final output for client streaming call"
+
+    -- Client sends message containing number N, then server streams N messages
+    -- to client
+    serverStreaming :: Call (Trivial' "server-streaming") -> IO ()
+    serverStreaming call = do
+        say' "handling server streaming call"
+        inp <- read @Int . BS.Char8.unpack <$> recvNextInput call
+        say' $ "sending " ++ show inp ++ " messages"
+        msg <- randomMsg
+        forM_ [1 .. inp-1] $ \_ -> sendNextOutput call msg
+        sendFinalOutput call (msg, NoMetadata)
+        say' $ "sent final output for server streaming call"
+
+    -- Client sends message containing number N, then client and server send N*2
+    -- total messages back and forth.
+    bidiStreaming :: Call (Trivial' "bidi-streaming") -> IO ()
+    bidiStreaming call = do
+        say' "handling bidi streaming call"
+        inp <- read @Int . BS.Char8.unpack <$> recvNextInput call
+        say' $ "sending and receiving " ++ show inp ++ " messages"
+        msg <- randomMsg
+        forM_ [1 .. inp-1] $ \_ -> do
+          void $ recvNextInput call
+          sendNextOutput call msg
+        void $ recvFinalInput call
+        sendFinalOutput call (msg, NoMetadata)
+        say' $ "sent and received final messages for bidi streaming call"
+
+    clientDisconnectOkay :: IO () -> IO ()
+    clientDisconnectOkay =
+        handle $ \ClientDisconnected{} ->
+          say' "client disconnected"
+
+    say' :: String -> IO ()
+    say' msg = do
+        sid <- readIORef idRef
+        say v $ "(server " ++ sid ++ ") " ++ msg
