From a1ef2e9a305cb3a49f6d3c1a255211f8793bde68 Mon Sep 17 00:00:00 2001 From: Semisol Date: Wed, 16 Oct 2024 20:07:53 +0300 Subject: [PATCH] Fix std schema package names, remove json-test.capnp This commit fixes the package names generated by `gen.sh import`, and removes `json-test.capnp` as it is unnecessary. --- std/capnp/compat/byte-stream.capnp | 2 +- std/capnp/compat/http-over-capnp.capnp | 2 +- .../httpovercapnp/http-over-capnp.capnp.go | 2 +- std/capnp/compat/json-rpc.capnp | 4 +- std/capnp/compat/json-test.capnp | 126 -- std/capnp/compat/json.capnp | 4 +- std/capnp/compat/json/json.capnp.go | 152 +- std/capnp/compat/jsonrpc/json-rpc.capnp.go | 72 +- std/capnp/compat/jsontest/json-test.capnp.go | 1556 ----------------- 9 files changed, 121 insertions(+), 1799 deletions(-) delete mode 100644 std/capnp/compat/json-test.capnp delete mode 100644 std/capnp/compat/jsontest/json-test.capnp.go diff --git a/std/capnp/compat/byte-stream.capnp b/std/capnp/compat/byte-stream.capnp index 51177e23..70fe423e 100644 --- a/std/capnp/compat/byte-stream.capnp +++ b/std/capnp/compat/byte-stream.capnp @@ -45,4 +45,4 @@ interface ByteStream { } using Go = import "/go.capnp"; $Go.package("bytestream"); -$Go.import("capnproto.org/go/capnp/v3/std/capnp/bytestream"); +$Go.import("capnproto.org/go/capnp/v3/std/capnp/compat/bytestream"); diff --git a/std/capnp/compat/http-over-capnp.capnp b/std/capnp/compat/http-over-capnp.capnp index dbbb624a..4ad31c23 100644 --- a/std/capnp/compat/http-over-capnp.capnp +++ b/std/capnp/compat/http-over-capnp.capnp @@ -268,4 +268,4 @@ struct HttpHeader { } using Go = import "/go.capnp"; $Go.package("httpovercapnp"); -$Go.import("capnproto.org/go/capnp/v3/std/capnp/httpovercapnp"); +$Go.import("capnproto.org/go/capnp/v3/std/capnp/compat/httpovercapnp"); diff --git a/std/capnp/compat/httpovercapnp/http-over-capnp.capnp.go b/std/capnp/compat/httpovercapnp/http-over-capnp.capnp.go index c15422ac..ef98b265 100644 --- a/std/capnp/compat/httpovercapnp/http-over-capnp.capnp.go +++ b/std/capnp/compat/httpovercapnp/http-over-capnp.capnp.go @@ -8,7 +8,7 @@ import ( fc "capnproto.org/go/capnp/v3/flowcontrol" schemas "capnproto.org/go/capnp/v3/schemas" server "capnproto.org/go/capnp/v3/server" - bytestream "capnproto.org/go/capnp/v3/std/capnp/bytestream" + bytestream "capnproto.org/go/capnp/v3/std/capnp/compat/bytestream" stream "capnproto.org/go/capnp/v3/std/capnp/stream" context "context" strconv "strconv" diff --git a/std/capnp/compat/json-rpc.capnp b/std/capnp/compat/json-rpc.capnp index ff233548..84b51a7f 100644 --- a/std/capnp/compat/json-rpc.capnp +++ b/std/capnp/compat/json-rpc.capnp @@ -37,10 +37,10 @@ struct RpcMessage { struct Error { code @0 :Int32; - message @1 :Text; + message @1 :Text $Go.name("messageValue"); data @2 :Json.Value; } } using Go = import "/go.capnp"; $Go.package("jsonrpc"); -$Go.import("capnproto.org/go/capnp/v3/std/capnp/jsonrpc"); +$Go.import("capnproto.org/go/capnp/v3/std/capnp/compat/jsonrpc"); diff --git a/std/capnp/compat/json-test.capnp b/std/capnp/compat/json-test.capnp deleted file mode 100644 index e481a6db..00000000 --- a/std/capnp/compat/json-test.capnp +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright (c) 2018 Cloudflare, Inc. and contributors -# Licensed under the MIT License: -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -@0xc9d405cf4333e4c9; - -using Json = import "/capnp/compat/json.capnp"; - -$import "/capnp/c++.capnp".namespace("capnp"); - -struct TestJsonAnnotations { - someField @0 :Text $Json.name("names-can_contain!anything Really"); - - aGroup :group $Json.flatten() { - flatFoo @1 :UInt32; - flatBar @2 :Text; - flatBaz :group $Json.name("renamed-flatBaz") { - hello @3 :Bool; - } - doubleFlat :group $Json.flatten() { - flatQux @4 :Text; - } - } - - prefixedGroup :group $Json.flatten(prefix = "pfx.") { - foo @5 :Text; - bar @6 :UInt32 $Json.name("renamed-bar"); - baz :group { - hello @7 :Bool; - } - morePrefix :group $Json.flatten(prefix = "xfp.") { - qux @8 :Text; - } - } - - aUnion :union $Json.flatten() $Json.discriminator(name = "union-type") { - foo :group $Json.flatten() { - fooMember @9 :Text; - multiMember @10 :UInt32; - } - bar :group $Json.flatten() $Json.name("renamed-bar") { - barMember @11 :UInt32; - multiMember @12 :Text; - } - } - - dependency @13 :TestJsonAnnotations2; - # To test that dependencies are loaded even if not flattened. - - simpleGroup :group { - # To test that group types are loaded even if not flattened. - grault @14 :Text $Json.name("renamed-grault"); - } - - enums @15 :List(TestJsonAnnotatedEnum); - - innerJson @16 :Json.Value; - - customFieldHandler @17 :Text; - - testBase64 @18 :Data $Json.base64; - testHex @19 :Data $Json.hex; - - bUnion :union $Json.flatten() $Json.discriminator(valueName = "bValue") { - foo @20 :Text; - bar @21 :UInt32 $Json.name("renamed-bar"); - } - - externalUnion @22 :TestJsonAnnotations3; - - unionWithVoid :union $Json.discriminator(name = "type") { - intValue @23 :UInt32; - voidValue @24 :Void; - textValue @25 :Text; - } -} - -struct TestJsonAnnotations2 { - foo @0 :Text $Json.name("renamed-foo"); - cycle @1 :TestJsonAnnotations; -} - -struct TestJsonAnnotations3 $Json.discriminator(name = "type") { - union { - foo @0 :UInt32; - bar @1 :TestFlattenedStruct $Json.flatten(); - } -} - -struct TestFlattenedStruct { - value @0 :Text; -} - -enum TestJsonAnnotatedEnum { - foo @0; - bar @1 $Json.name("renamed-bar"); - baz @2 $Json.name("renamed-baz"); - qux @3; -} - -struct TestBase64Union { - union { - foo @0 :Data $Json.base64; - bar @1 :Text; - } -} -using Go = import "/go.capnp"; -$Go.package("jsontest"); -$Go.import("capnproto.org/go/capnp/v3/std/capnp/jsontest"); diff --git a/std/capnp/compat/json.capnp b/std/capnp/compat/json.capnp index 9ed99167..679fb328 100644 --- a/std/capnp/compat/json.capnp +++ b/std/capnp/compat/json.capnp @@ -28,7 +28,7 @@ struct Value { null @0 :Void; boolean @1 :Bool; number @2 :Float64; - string @3 :Text; + string @3 :Text $Go.name("stringValue"); array @4 :List(Value); object @5 :List(Field); # Standard JSON values. @@ -127,4 +127,4 @@ annotation notification @0xa0a054dea32fd98c (method) :Void; # Indicates that this method is a JSON-RPC "notification", meaning it expects no response. using Go = import "/go.capnp"; $Go.package("json"); -$Go.import("capnproto.org/go/capnp/v3/std/capnp/json"); +$Go.import("capnproto.org/go/capnp/v3/std/capnp/compat/json"); diff --git a/std/capnp/compat/json/json.capnp.go b/std/capnp/compat/json/json.capnp.go index 63085f9d..5434849f 100644 --- a/std/capnp/compat/json/json.capnp.go +++ b/std/capnp/compat/json/json.capnp.go @@ -21,18 +21,18 @@ type Value capnp.Struct type Value_Which uint16 const ( - Value_Which_null Value_Which = 0 - Value_Which_boolean Value_Which = 1 - Value_Which_number Value_Which = 2 - Value_Which_string Value_Which = 3 - Value_Which_array Value_Which = 4 - Value_Which_object Value_Which = 5 - Value_Which_call Value_Which = 6 - Value_Which_raw Value_Which = 7 + Value_Which_null Value_Which = 0 + Value_Which_boolean Value_Which = 1 + Value_Which_number Value_Which = 2 + Value_Which_stringValue Value_Which = 3 + Value_Which_array Value_Which = 4 + Value_Which_object Value_Which = 5 + Value_Which_call Value_Which = 6 + Value_Which_raw Value_Which = 7 ) func (w Value_Which) String() string { - const s = "nullbooleannumberstringarrayobjectcallraw" + const s = "nullbooleannumberstringValuearrayobjectcallraw" switch w { case Value_Which_null: return s[0:4] @@ -40,16 +40,16 @@ func (w Value_Which) String() string { return s[4:11] case Value_Which_number: return s[11:17] - case Value_Which_string: - return s[17:23] + case Value_Which_stringValue: + return s[17:28] case Value_Which_array: - return s[23:28] + return s[28:33] case Value_Which_object: - return s[28:34] + return s[33:39] case Value_Which_call: - return s[34:38] + return s[39:43] case Value_Which_raw: - return s[38:41] + return s[43:46] } return "Value_Which(" + strconv.FormatUint(uint64(w), 10) + ")" @@ -133,27 +133,27 @@ func (s Value) SetNumber(v float64) { capnp.Struct(s).SetUint64(8, math.Float64bits(v)) } -func (s Value) String() (string, error) { +func (s Value) StringValue() (string, error) { if capnp.Struct(s).Uint16(0) != 3 { - panic("Which() != string") + panic("Which() != stringValue") } p, err := capnp.Struct(s).Ptr(0) return p.Text(), err } -func (s Value) HasString() bool { +func (s Value) HasStringValue() bool { if capnp.Struct(s).Uint16(0) != 3 { return false } return capnp.Struct(s).HasPtr(0) } -func (s Value) StringBytes() ([]byte, error) { +func (s Value) StringValueBytes() ([]byte, error) { p, err := capnp.Struct(s).Ptr(0) return p.TextBytes(), err } -func (s Value) SetString(v string) error { +func (s Value) SetStringValue(v string) error { capnp.Struct(s).SetUint16(0, 3) return capnp.Struct(s).SetText(0, v) } @@ -694,61 +694,63 @@ func (f DiscriminatorOptions_Future) Struct() (DiscriminatorOptions, error) { return DiscriminatorOptions(p.Struct()), err } -const schema_8ef99297a43a5e34 = "x\xda\x8cT]h[e\x18~\x9e\xef\xcb\x97vM" + - "bs8\xf1b\xe0\xc8\x10\xa7\xaeh\xb7vu\xb8@" + - "\x17q\xeb\x18\x8a\x9a\xaf\x11o\x04\xe1$;\xd5\x8c\x93" + - "\x93\x90\xa4\xaeSA\x98w\"\x82C\x10\x07B\xc7\x14" + - "/Ea\x17\x0aC-\x961\x19h\xd4\xcd\x16V;" + - "\xff\xb0\x88\x17\xbbQ\xda\xfas\xe4;\xd9\xf2\xd3:\xf0" + - "\xee\xf0\xbd\x0f\xcf\xfb\xbc\xcf\xfb\xbcg7\xc5\x03\x91\x91" + - "\xc4\xb2\x82\xd0\x07U4\xf8x\xaf|or\xe5\xeb\x13" + - "\xd01u5\x18{*\xf3\xf6\x1b'\xd7^\x05h_" + - "\x12\xa7\xec%\xd1\x07\xe4\x17\x84$\x18\xbc\xb2\xb8\xeb\xcc" + - "w\x8f\xcf\xce\xe2\xb5\x98\x12=\xd0\x0bb\xcen\x86\xd0" + - "\x8b-\xe8\xe1\xf1\x0b\xa7\x7f\xfbcq\x16\x96\xc5\xe0\xa5" + - "\xa5\xadk\x133\xebg\xa0\x0c\xc4>'>\xb0\xe7\xc3" + - "\xafO\xc51t\x95u\x8c]\xb4\x13\xec\xeb\x07\xec\x11" + - "\xf9\xb2\xbdO\xde\x05\xecyD\x9e7\xd4[\xf3\xfbw" + - "\xc6\xe7V\xe7`\xc5\xd8A\x87\xd4{F\x94\xa0=\xae" + - "\x0c\xf7>e\xb8\x9d_\xe7\x9e\xdfa/\x7f\xb6\x01L" + - "\x83xS}e\xbf\x13bO\xab,\x18\x14x\xaa\xb9" + - "\xf2\xfa\xbb_\x18'r=\xe3\xcd\xab\xcf\xed\xa6\x0a\xc7" + - "S\xe1x\x0f\xef\xdf10q|\xe1[\x03\xdd\xde\x03" + - "=\xa7N\xda\xf3!\xf4\x93\x16t\xf9\xad\xcb\xf7\xfdr" + - "g\xf2\xc7\xffr\xe2}\xf5\x91\xfda\xa8\xe0l\xa8\xf6" + - "\xec\xf9\x9f\x07v\xfd\xe0\\\xdbLkE\x9f\xb3o\x8d" + - "\x1a\xdad4\xa4\x1d\x7fa\xf8\xb6\xcb\xe9'\xd7\xd1\x8c" + - "\xa9\x95\xdee0z\xc2V\x06;i\xa0\x07\x82\xa3\xf5" + - "\x8a?\\t\xaa\xf4\xab\x99)\xcfi4\xa4\xeb\xe7H" + - "&;\xee\x80m\x94\xf0\xab\x19\xbf\xd2(M\x95\x8aN" + - "\xa3T\xf1\x91#!{H\x9ep\xbci7=|\xc0" + - "\xf1\xbc\x1c\xa9\xfbe\x04\x88\x10\xb0v>\x04\xe8\xbb%" + - "\xf5\x98\xa0E\xa6h\x1eG2\x80\xbeGR\x1f\x16\x0c" + - "\xa6\xa6\xfdb\xc8\x0a0\x0e\xc18\x98\xad:5\xa7\\" + - "\xe7-`N\x1aUm\x93@\xf3\xb8\xb95\xa0\xfb\xd9" + - "\xed\xec\x96\xd1\xae\xc0\xa9\xa1\xf4\xa1\x92\xeb\x1d\x194\xfa" + - "\xf4v\x19\x89\x07A\xa8\xae9\x04\xe8\x8b\x92zAp" + - "\x1b\xff\x09\x92-}\x97\x1e\x04\xf4\x97\x92\xfa\x8a\xe06" + - "\xf1w\xc0\x14\x05`-\x1a\xd9\xdfH\xea\xab\x82\x09\xf9" + - "W\x90\xa2\x04\xac%\xf3\xba \xa9\x7f\x12LD\xfe\x0c" + - "R\x8c\x00\xd6\xf7\xa3\x80\xbe\"\xa9W\x05\x13j=H" + - "Q\x01\xd6\xef\x06{M2\x1f\xa7`\"\xba\x16\xa4\x18" + - "\x05\xec-\x1c\x02\xf2\x11J\xe6\x93\xa6\xd0\xb7\x1a\xa4\xc2" + - "<&x;\x90\xef7\x85\x14\x05\x07\xfdi\xcfC\xf4" + - "\xc5B\xa5\xe2\xb9\x8eOB\x90`\xd6\x9f.\x17\xdc\x1a" + - "c\x10\x8c\x81\xd9z\xa3V\xf2\x9f\xbeaf\xda\xa9\xd5" + - "\x9c\xe37\xf52[)\x1cu\x8b\x8dN\xbd\xeda\xab" + - ">Xt<\x8f\xc9\x8e\x9b \x93`_\xcd9v\xa3" + - "C{\x1d\xd2\xaff\x0e\x96\xea\xc5Z\xa9\\\xf2\x9dF" + - "\xa5\xf6X\xd5l\xb6\x8e\x0d\x990\xae\xdf!\xa9ww" + - "e\xe2\xde\xc9\xeb\x99\xb8\xdf\xcc\xe9\x94\xdd6\xfb\xb3f" + - "\xc1\x8f:e\xd0\xdd\xd4\xd1D\xf3\x90\x09\xb0\xeb\xb7z" + - "\xb1nzEZ\xbdH+a\x1c\xef\x97\xd4)\xc1l" + - "\xb5\xe6N\x95f\xae\x93\xc0\xe2\x00\xd0\xc3t\xa4[;" + - "\xd0\xba\x88\xf6\xcfeC\xee\x0aN\xdd\xdd\xcb\xb1\x9b\xdc" + - "Bv8L\xdc\xff\x19|\xb4s!=\x83\xa7\xc3\xc1" + - "7l,\xd9\xa5\x02Y\xbf\x9ay\xc6\x9d\xd9,\xc1\xd0" + - "\x84\xf2\xe3\x10\xff\x06\x00\x00\xff\xff\xb9?\x99\x93" +const schema_8ef99297a43a5e34 = "x\xda\x8cT]h\x1cU\x18\xfd\xce\xbd3\x93\x9f\xdd" + + "5;\xce\xa0\x06\x0c\x1b\xc4\xa8\x0d5\x7fMkYl" + + "\xd7\xbf\x94\xa0P\xf7fkAD\xf1\xeef\xa2Sf" + + "g\x97\xdd\x8dMT\x10*\xbe\x88\x15Z\x04\xa1 D" + + "*\xf8(\x08>\xe8\x8b\xb0\x08E\x114\xfe\xd4\x06\x8c" + + "-\x8a\x18E\xc1>T\x92h\xbdrg\xdb\xfdI," + + "\xf4m\x99s8\xdf\xf9\xcew\xee\x8e\xdd\xc4\xee3\xc6" + + "\x13\xf7X\xc4\xc4\xb4i\xa9\x8f\xf7\xf0\xf7f\xd6\xbe>" + + "F\"f^P\x93O\xa5\xdfy\xf3\xe4\xc6\xebDp" + + "\xc0O9=\xbc\x8b(gp\x0e\x82zme\xf4\xf4" + + "\x0f\x87\x96\x96\xe8D\xccd\x1d\xd4K\xac\xee\\f\x9a" + + "\xba\xce\"\xea\xf4\xbeO\xdf\xfe\xfd\xaf\x95%\xb2m\xa8" + + "\x97W\xfb7\xa6\x166O\x93\xa9)\xce\xaf\xec}\xe7" + + "b\xf4\xeb\x0fv\x94\xda`\x11C\x9b\xec\x14\xba\xba\x89" + + "\x9c'\xf9\xab\x8e\xc7\xef$\xda\xb5\xc8\xcfh\xe9\xfe\xdc" + + "\xfe\x1d\xf1\xfaz\x9d\xec\x18Z\xecHz\xd7+&\x83" + + "s\xc2\xd4\xda\xc7M\xad-\x7f\xab\xbf0\xe4\x9c\xffd" + + "\x0b\x19\xd1t\xf3+g#\xe2^23\x04\x95\xc7\xa9" + + "\xe5\xb57\xde\xfdB'\x91\xedX\xaf\xdf\xfa\xcc\x19\xb2" + + "\xf4z\x83V\xb4\xde#\xfb\x87z\xa7\x16\xcf}\xa7\xa9" + + "\x83\x1dT\xdb:\xe9\xf4GT\xb7A=\xff\xd6\xd9\xdd" + + "\xbf\xdc\x91\xfc\xe9\xff\x920\xad\x8f\x9c\x84&;=\x96" + + "v\xfb\xc1\x99\x9f{G\x7f\x94\x7fn\x97\xf5\xac\xe7\x1d" + + "?\x92\x9dm\xc8\xee{q\xe4\xd6\xb3\xa9'6i9" + + "f\xaeu\x1e\xe31\xeb\x98\xf3x\xc4=\xa4\xb9\x07\xd5" + + "\x91j)\x1c)\xc82\xc2rz.\x90\xb5\x1a\xf7\xc2" + + ",\x80d+\x1eB\x93\xc5\xc2r:,\xd5\xfc9\xbf" + + " k~)\xa4,@\xbcC\xe4\xb0\x0c\xe6\xbd\xd4\xc8" + + "\x832\x08\xb2\x80\xe8\xe6\x06\x91\x01\"{\xc7\xc3D\xe2" + + ".\x0e1\xc9`\x03.\xf4\xc7\xf14\x91\xd8\xc9!\xa6" + + "\x19\xd4\xdc|X\x88T\x89\x10'\x868!S\x96\x15" + + "Y\xac\xe2\x06B\x96kW\xcd\x94\x08\xfa\xe3\xf6\xd1D" + + "\xa2\x1b\xed\xd1\xf6L\xb45\xce\x1cN\x1d\xf0\xbd`\xb6" + + "O\xfb\x13\x83\xdc\x88+\x15\xb9[\x1e&\x12\x9fs\x88" + + "s\x0c\x03\xf8W%\x1b\xfe\xbe}\x80H|\xc9!\xbe" + + "g\x18`\x97\x15\\0\"{E\xdb\xfe\x86C\\`" + + "H\xf0\x7f\x94\x0bNd\xaf\xa6\xed\xd5\xd4\x0c8rq" + + "0$\x8c\xbf\x95\x0bC\x1f\x10\x13\xfa\xa1h`P\x03" + + "\xe6\xa6ra\x129\x03H\x13\xe5n\xd1\xc0\xa4\x06\xac" + + "\x0d\xe5\xc2\"r\xc61L\x94\xdb\xa9\x81\xbd\x1a\xe8Z" + + "Wn\xd4\xcb\xdd\xb8\x8d(7\xa6\x81{\xc1\xd0\x17\xce" + + "\x07\x01Y/\xe5K\xa5\xc0\x93!@\x0c d\xc2\xf9" + + "b\xde\xab F\x0c1B\xa6Z\xab\xf8\xe13\xc2\x00" + + "S\x17\x8f\x8f\xde|\xe3\xd3\x1f\xd6I\x18\x0c\xf7\xbb@" + + "\x9c\xc8F^5(\x87%uE\x19^\xcd?%+" + + "\x15\xb9x\xcd\xf83\xa5\xfc\x11\xafPk\xe1\xcd\xd8\x1b" + + "x_A\x06\x01\x92\xad\x03\x10\x90$tU\xe4\xd1\xab" + + "\x13\x9a\x17\xe4a9\xfd\x90_-T\xfc\xa2\x1f\xcaZ" + + "\xa9\xf2hY\x97\xa1J[j\xa4\x0fu;\x87\x18k" + + "\xab\xd1\xdd3Wj\xb4Wg\"\x8b^S\xfd9\xdd" + + "\x89\x83\xb2H\xf0\xb6M\xd4m>\xa0;\xef\x85\x8dY" + + "\xa8\xeaYFc\x16`'\xf4\x99\xbb9\x84\xcb\x90)" + + "W\xbc9\x7f\xe1\x8a\x08\xd9\xe8%\xeaP\x9am\xf7N" + + "\xd4xD\xcd?\xa4-U\xcd\xcb\xaa\xb7\x07\x93\xd7x" + + ">\x99\x91\xa8\xa4\xd7\xb3\xf8D\xebQu,\x9e\x8a\x16" + + "\xdfr\xb1d\x9b\x0b\xca\x84\xe5\xf4\xb3\xde\xc2v\x0bZ" + + "&\xb2\x1f'\xf6_\x00\x00\x00\xff\xff\x15\\\x9e3" func RegisterSchema(reg *schemas.Registry) { reg.Register(&schemas.Schema{ diff --git a/std/capnp/compat/jsonrpc/json-rpc.capnp.go b/std/capnp/compat/jsonrpc/json-rpc.capnp.go index 2d3eadae..ae265271 100644 --- a/std/capnp/compat/jsonrpc/json-rpc.capnp.go +++ b/std/capnp/compat/jsonrpc/json-rpc.capnp.go @@ -6,7 +6,7 @@ import ( capnp "capnproto.org/go/capnp/v3" text "capnproto.org/go/capnp/v3/encoding/text" schemas "capnproto.org/go/capnp/v3/schemas" - json "capnproto.org/go/capnp/v3/std/capnp/json" + json "capnproto.org/go/capnp/v3/std/capnp/compat/json" strconv "strconv" ) @@ -330,21 +330,21 @@ func (s RpcMessage_Error) SetCode(v int32) { capnp.Struct(s).SetUint32(0, uint32(v)) } -func (s RpcMessage_Error) Message() (string, error) { +func (s RpcMessage_Error) MessageValue() (string, error) { p, err := capnp.Struct(s).Ptr(0) return p.Text(), err } -func (s RpcMessage_Error) HasMessage() bool { +func (s RpcMessage_Error) HasMessageValue() bool { return capnp.Struct(s).HasPtr(0) } -func (s RpcMessage_Error) MessageBytes() ([]byte, error) { +func (s RpcMessage_Error) MessageValueBytes() ([]byte, error) { p, err := capnp.Struct(s).Ptr(0) return p.TextBytes(), err } -func (s RpcMessage_Error) SetMessage(v string) error { +func (s RpcMessage_Error) SetMessageValue(v string) error { return capnp.Struct(s).SetText(0, v) } @@ -392,36 +392,38 @@ func (p RpcMessage_Error_Future) Data() json.Value_Future { return json.Value_Future{Future: p.Future.Field(1, nil)} } -const schema_d04299800d6725ba = "x\xdal\x90\xbfkS_\x18\xc6\x9f\xe7='\xedw" + - "HH\xee7\x01\xb1\xb4$\x0eYJ\x1bL\xebT\x90" + - "\xd6\xd2\xa0\x82\x85\x9eV\\\x9c.\xc9%FL\xee\xe5" + - "\xdc(\"B\x0an\"8\xbb\x09\x82\xab\x0e\x0a*\x0a" + - "\x16uq\xaa?\x10\x1c\xfa?88\xd8\x90z\xe5\x18" + - "\x9a\x8au;|\xde\xf7\x9c\xf3y\x9e\xe3\xa7\xb9\xa4\xab" + - "\x99\x9e\x86\x98\x13\xa9\xb1d\xe5\xda\x9br\x7fsg\x1b" + - "f\x82L\xde_\xb8\x7f\xfb\xf3\x9d\x87\x9f\x90\x92q`" + - "\xbe,\xc2|\xd5\x1d\xf3\xb3\xf2\x08\x7f\xccM\x96L^" + - "\x94\x9b\x99\xcd{\xcb\xdb\xa8\xe9q\x0d\xe4\xdf\xc9\xc7\xfc" + - "\x079\x02\xcc\x7f\x95\xbb\xc4\x8d\xe4r\x1cvfmT" + - "W\x95\xba\x1fu\xa2\x85\xf5\xa8\xbe\x1a\xc4\xb1\xdf\x0c*" + - "5kC\x8b5\xd2\xa4\x95\x064\x01\xaf6\x0d\x98%" + - "EsNH\x16\xe8\xd8\xd9e\xc0\xac(\x9a5\xa1'" + - ",P\x00o\xd5-\x9eQ4\xe7\x85\xd9z\xd8\x08\xa8" + - "!\xd4`\xaf=|\x9ei\x08\xd3`\xb6\xe1w}\xe6" + - "\x92[;Gwk\xd7\xfb\x0f\x002\x07\x8e\xc4\xe4o" + - "1\x06F\x93\x07\xadx\x9c+\xfeV5\x93#\xcd\xa7" + - "N\xe9\xb1\xa2y)\xf4\xf6=\x9fO\x00\xe6\x89\xa2y" + - "\xedA\xc1\x0d\x8bd\x82\xf2!\xb9\xac" + + "U\x8es\xcf7\xbc\xd6\x0d\xbf\xd2\xb3\xd3\xf4\x9b\xb1\xd7" + + "\xb3\xeb\x85\xb1/\xd9+\x9d\xd8k\xee\xc0\xeb4\x87\x18" + + "\x9dl\xd4\xc2\xb0\xd6\xac\xca\\\xe0\x1a\xb7\x11N\xe6\x8c" + + "\x17\xb6\xeb\xad\xc9\x9cor\x9e1>\x0d\xfa\xe7\xe3\xee" + + "?\xf7\xe2\xf1\xf1\"k\x7f5\x1c<\x12\x1d\xe7\xbf\x03" + + "\x00\x00\xff\xff\x8c'\xbah" func RegisterSchema(reg *schemas.Registry) { reg.Register(&schemas.Schema{ diff --git a/std/capnp/compat/jsontest/json-test.capnp.go b/std/capnp/compat/jsontest/json-test.capnp.go deleted file mode 100644 index c9dcebe0..00000000 --- a/std/capnp/compat/jsontest/json-test.capnp.go +++ /dev/null @@ -1,1556 +0,0 @@ -// Code generated by capnpc-go. DO NOT EDIT. - -package jsontest - -import ( - capnp "capnproto.org/go/capnp/v3" - text "capnproto.org/go/capnp/v3/encoding/text" - schemas "capnproto.org/go/capnp/v3/schemas" - json "capnproto.org/go/capnp/v3/std/capnp/json" - strconv "strconv" -) - -type TestJsonAnnotations capnp.Struct -type TestJsonAnnotations_aGroup TestJsonAnnotations -type TestJsonAnnotations_aGroup_flatBaz TestJsonAnnotations -type TestJsonAnnotations_aGroup_doubleFlat TestJsonAnnotations -type TestJsonAnnotations_prefixedGroup TestJsonAnnotations -type TestJsonAnnotations_prefixedGroup_baz TestJsonAnnotations -type TestJsonAnnotations_prefixedGroup_morePrefix TestJsonAnnotations -type TestJsonAnnotations_aUnion TestJsonAnnotations -type TestJsonAnnotations_aUnion_foo TestJsonAnnotations -type TestJsonAnnotations_aUnion_bar TestJsonAnnotations -type TestJsonAnnotations_simpleGroup TestJsonAnnotations -type TestJsonAnnotations_bUnion TestJsonAnnotations -type TestJsonAnnotations_unionWithVoid TestJsonAnnotations -type TestJsonAnnotations_aUnion_Which uint16 - -const ( - TestJsonAnnotations_aUnion_Which_foo TestJsonAnnotations_aUnion_Which = 0 - TestJsonAnnotations_aUnion_Which_bar TestJsonAnnotations_aUnion_Which = 1 -) - -func (w TestJsonAnnotations_aUnion_Which) String() string { - const s = "foobar" - switch w { - case TestJsonAnnotations_aUnion_Which_foo: - return s[0:3] - case TestJsonAnnotations_aUnion_Which_bar: - return s[3:6] - - } - return "TestJsonAnnotations_aUnion_Which(" + strconv.FormatUint(uint64(w), 10) + ")" -} - -type TestJsonAnnotations_bUnion_Which uint16 - -const ( - TestJsonAnnotations_bUnion_Which_foo TestJsonAnnotations_bUnion_Which = 0 - TestJsonAnnotations_bUnion_Which_bar TestJsonAnnotations_bUnion_Which = 1 -) - -func (w TestJsonAnnotations_bUnion_Which) String() string { - const s = "foobar" - switch w { - case TestJsonAnnotations_bUnion_Which_foo: - return s[0:3] - case TestJsonAnnotations_bUnion_Which_bar: - return s[3:6] - - } - return "TestJsonAnnotations_bUnion_Which(" + strconv.FormatUint(uint64(w), 10) + ")" -} - -type TestJsonAnnotations_unionWithVoid_Which uint16 - -const ( - TestJsonAnnotations_unionWithVoid_Which_intValue TestJsonAnnotations_unionWithVoid_Which = 0 - TestJsonAnnotations_unionWithVoid_Which_voidValue TestJsonAnnotations_unionWithVoid_Which = 1 - TestJsonAnnotations_unionWithVoid_Which_textValue TestJsonAnnotations_unionWithVoid_Which = 2 -) - -func (w TestJsonAnnotations_unionWithVoid_Which) String() string { - const s = "intValuevoidValuetextValue" - switch w { - case TestJsonAnnotations_unionWithVoid_Which_intValue: - return s[0:8] - case TestJsonAnnotations_unionWithVoid_Which_voidValue: - return s[8:17] - case TestJsonAnnotations_unionWithVoid_Which_textValue: - return s[17:26] - - } - return "TestJsonAnnotations_unionWithVoid_Which(" + strconv.FormatUint(uint64(w), 10) + ")" -} - -// TestJsonAnnotations_TypeID is the unique identifier for the type TestJsonAnnotations. -const TestJsonAnnotations_TypeID = 0xa814a516cf478f04 - -func NewTestJsonAnnotations(s *capnp.Segment) (TestJsonAnnotations, error) { - st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 32, PointerCount: 16}) - return TestJsonAnnotations(st), err -} - -func NewRootTestJsonAnnotations(s *capnp.Segment) (TestJsonAnnotations, error) { - st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 32, PointerCount: 16}) - return TestJsonAnnotations(st), err -} - -func ReadRootTestJsonAnnotations(msg *capnp.Message) (TestJsonAnnotations, error) { - root, err := msg.Root() - return TestJsonAnnotations(root.Struct()), err -} - -func (s TestJsonAnnotations) String() string { - str, _ := text.Marshal(0xa814a516cf478f04, capnp.Struct(s)) - return str -} - -func (s TestJsonAnnotations) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr { - return capnp.Struct(s).EncodeAsPtr(seg) -} - -func (TestJsonAnnotations) DecodeFromPtr(p capnp.Ptr) TestJsonAnnotations { - return TestJsonAnnotations(capnp.Struct{}.DecodeFromPtr(p)) -} - -func (s TestJsonAnnotations) ToPtr() capnp.Ptr { - return capnp.Struct(s).ToPtr() -} -func (s TestJsonAnnotations) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations) SomeField() (string, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.Text(), err -} - -func (s TestJsonAnnotations) HasSomeField() bool { - return capnp.Struct(s).HasPtr(0) -} - -func (s TestJsonAnnotations) SomeFieldBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations) SetSomeField(v string) error { - return capnp.Struct(s).SetText(0, v) -} - -func (s TestJsonAnnotations) AGroup() TestJsonAnnotations_aGroup { - return TestJsonAnnotations_aGroup(s) -} - -func (s TestJsonAnnotations_aGroup) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_aGroup) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_aGroup) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_aGroup) FlatFoo() uint32 { - return capnp.Struct(s).Uint32(0) -} - -func (s TestJsonAnnotations_aGroup) SetFlatFoo(v uint32) { - capnp.Struct(s).SetUint32(0, v) -} - -func (s TestJsonAnnotations_aGroup) FlatBar() (string, error) { - p, err := capnp.Struct(s).Ptr(1) - return p.Text(), err -} - -func (s TestJsonAnnotations_aGroup) HasFlatBar() bool { - return capnp.Struct(s).HasPtr(1) -} - -func (s TestJsonAnnotations_aGroup) FlatBarBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(1) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_aGroup) SetFlatBar(v string) error { - return capnp.Struct(s).SetText(1, v) -} - -func (s TestJsonAnnotations_aGroup) FlatBaz() TestJsonAnnotations_aGroup_flatBaz { - return TestJsonAnnotations_aGroup_flatBaz(s) -} - -func (s TestJsonAnnotations_aGroup_flatBaz) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_aGroup_flatBaz) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_aGroup_flatBaz) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_aGroup_flatBaz) Hello() bool { - return capnp.Struct(s).Bit(32) -} - -func (s TestJsonAnnotations_aGroup_flatBaz) SetHello(v bool) { - capnp.Struct(s).SetBit(32, v) -} - -func (s TestJsonAnnotations_aGroup) DoubleFlat() TestJsonAnnotations_aGroup_doubleFlat { - return TestJsonAnnotations_aGroup_doubleFlat(s) -} - -func (s TestJsonAnnotations_aGroup_doubleFlat) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_aGroup_doubleFlat) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_aGroup_doubleFlat) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_aGroup_doubleFlat) FlatQux() (string, error) { - p, err := capnp.Struct(s).Ptr(2) - return p.Text(), err -} - -func (s TestJsonAnnotations_aGroup_doubleFlat) HasFlatQux() bool { - return capnp.Struct(s).HasPtr(2) -} - -func (s TestJsonAnnotations_aGroup_doubleFlat) FlatQuxBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(2) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_aGroup_doubleFlat) SetFlatQux(v string) error { - return capnp.Struct(s).SetText(2, v) -} - -func (s TestJsonAnnotations) PrefixedGroup() TestJsonAnnotations_prefixedGroup { - return TestJsonAnnotations_prefixedGroup(s) -} - -func (s TestJsonAnnotations_prefixedGroup) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_prefixedGroup) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_prefixedGroup) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_prefixedGroup) Foo() (string, error) { - p, err := capnp.Struct(s).Ptr(3) - return p.Text(), err -} - -func (s TestJsonAnnotations_prefixedGroup) HasFoo() bool { - return capnp.Struct(s).HasPtr(3) -} - -func (s TestJsonAnnotations_prefixedGroup) FooBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(3) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_prefixedGroup) SetFoo(v string) error { - return capnp.Struct(s).SetText(3, v) -} - -func (s TestJsonAnnotations_prefixedGroup) Bar() uint32 { - return capnp.Struct(s).Uint32(8) -} - -func (s TestJsonAnnotations_prefixedGroup) SetBar(v uint32) { - capnp.Struct(s).SetUint32(8, v) -} - -func (s TestJsonAnnotations_prefixedGroup) Baz() TestJsonAnnotations_prefixedGroup_baz { - return TestJsonAnnotations_prefixedGroup_baz(s) -} - -func (s TestJsonAnnotations_prefixedGroup_baz) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_prefixedGroup_baz) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_prefixedGroup_baz) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_prefixedGroup_baz) Hello() bool { - return capnp.Struct(s).Bit(33) -} - -func (s TestJsonAnnotations_prefixedGroup_baz) SetHello(v bool) { - capnp.Struct(s).SetBit(33, v) -} - -func (s TestJsonAnnotations_prefixedGroup) MorePrefix() TestJsonAnnotations_prefixedGroup_morePrefix { - return TestJsonAnnotations_prefixedGroup_morePrefix(s) -} - -func (s TestJsonAnnotations_prefixedGroup_morePrefix) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_prefixedGroup_morePrefix) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_prefixedGroup_morePrefix) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_prefixedGroup_morePrefix) Qux() (string, error) { - p, err := capnp.Struct(s).Ptr(4) - return p.Text(), err -} - -func (s TestJsonAnnotations_prefixedGroup_morePrefix) HasQux() bool { - return capnp.Struct(s).HasPtr(4) -} - -func (s TestJsonAnnotations_prefixedGroup_morePrefix) QuxBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(4) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_prefixedGroup_morePrefix) SetQux(v string) error { - return capnp.Struct(s).SetText(4, v) -} - -func (s TestJsonAnnotations) AUnion() TestJsonAnnotations_aUnion { - return TestJsonAnnotations_aUnion(s) -} - -func (s TestJsonAnnotations_aUnion) Which() TestJsonAnnotations_aUnion_Which { - return TestJsonAnnotations_aUnion_Which(capnp.Struct(s).Uint16(6)) -} -func (s TestJsonAnnotations_aUnion) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_aUnion) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_aUnion) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_aUnion) Foo() TestJsonAnnotations_aUnion_foo { - return TestJsonAnnotations_aUnion_foo(s) -} - -func (s TestJsonAnnotations_aUnion) SetFoo() { - capnp.Struct(s).SetUint16(6, 0) -} - -func (s TestJsonAnnotations_aUnion_foo) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_aUnion_foo) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_aUnion_foo) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_aUnion_foo) FooMember() (string, error) { - p, err := capnp.Struct(s).Ptr(5) - return p.Text(), err -} - -func (s TestJsonAnnotations_aUnion_foo) HasFooMember() bool { - return capnp.Struct(s).HasPtr(5) -} - -func (s TestJsonAnnotations_aUnion_foo) FooMemberBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(5) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_aUnion_foo) SetFooMember(v string) error { - return capnp.Struct(s).SetText(5, v) -} - -func (s TestJsonAnnotations_aUnion_foo) MultiMember() uint32 { - return capnp.Struct(s).Uint32(12) -} - -func (s TestJsonAnnotations_aUnion_foo) SetMultiMember(v uint32) { - capnp.Struct(s).SetUint32(12, v) -} - -func (s TestJsonAnnotations_aUnion) Bar() TestJsonAnnotations_aUnion_bar { - return TestJsonAnnotations_aUnion_bar(s) -} - -func (s TestJsonAnnotations_aUnion) SetBar() { - capnp.Struct(s).SetUint16(6, 1) -} - -func (s TestJsonAnnotations_aUnion_bar) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_aUnion_bar) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_aUnion_bar) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_aUnion_bar) BarMember() uint32 { - return capnp.Struct(s).Uint32(12) -} - -func (s TestJsonAnnotations_aUnion_bar) SetBarMember(v uint32) { - capnp.Struct(s).SetUint32(12, v) -} - -func (s TestJsonAnnotations_aUnion_bar) MultiMember() (string, error) { - p, err := capnp.Struct(s).Ptr(5) - return p.Text(), err -} - -func (s TestJsonAnnotations_aUnion_bar) HasMultiMember() bool { - return capnp.Struct(s).HasPtr(5) -} - -func (s TestJsonAnnotations_aUnion_bar) MultiMemberBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(5) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_aUnion_bar) SetMultiMember(v string) error { - return capnp.Struct(s).SetText(5, v) -} - -func (s TestJsonAnnotations) Dependency() (TestJsonAnnotations2, error) { - p, err := capnp.Struct(s).Ptr(6) - return TestJsonAnnotations2(p.Struct()), err -} - -func (s TestJsonAnnotations) HasDependency() bool { - return capnp.Struct(s).HasPtr(6) -} - -func (s TestJsonAnnotations) SetDependency(v TestJsonAnnotations2) error { - return capnp.Struct(s).SetPtr(6, capnp.Struct(v).ToPtr()) -} - -// NewDependency sets the dependency field to a newly -// allocated TestJsonAnnotations2 struct, preferring placement in s's segment. -func (s TestJsonAnnotations) NewDependency() (TestJsonAnnotations2, error) { - ss, err := NewTestJsonAnnotations2(capnp.Struct(s).Segment()) - if err != nil { - return TestJsonAnnotations2{}, err - } - err = capnp.Struct(s).SetPtr(6, capnp.Struct(ss).ToPtr()) - return ss, err -} - -func (s TestJsonAnnotations) SimpleGroup() TestJsonAnnotations_simpleGroup { - return TestJsonAnnotations_simpleGroup(s) -} - -func (s TestJsonAnnotations_simpleGroup) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_simpleGroup) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_simpleGroup) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_simpleGroup) Grault() (string, error) { - p, err := capnp.Struct(s).Ptr(7) - return p.Text(), err -} - -func (s TestJsonAnnotations_simpleGroup) HasGrault() bool { - return capnp.Struct(s).HasPtr(7) -} - -func (s TestJsonAnnotations_simpleGroup) GraultBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(7) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_simpleGroup) SetGrault(v string) error { - return capnp.Struct(s).SetText(7, v) -} - -func (s TestJsonAnnotations) Enums() (TestJsonAnnotatedEnum_List, error) { - p, err := capnp.Struct(s).Ptr(8) - return TestJsonAnnotatedEnum_List(p.List()), err -} - -func (s TestJsonAnnotations) HasEnums() bool { - return capnp.Struct(s).HasPtr(8) -} - -func (s TestJsonAnnotations) SetEnums(v TestJsonAnnotatedEnum_List) error { - return capnp.Struct(s).SetPtr(8, v.ToPtr()) -} - -// NewEnums sets the enums field to a newly -// allocated TestJsonAnnotatedEnum_List, preferring placement in s's segment. -func (s TestJsonAnnotations) NewEnums(n int32) (TestJsonAnnotatedEnum_List, error) { - l, err := NewTestJsonAnnotatedEnum_List(capnp.Struct(s).Segment(), n) - if err != nil { - return TestJsonAnnotatedEnum_List{}, err - } - err = capnp.Struct(s).SetPtr(8, l.ToPtr()) - return l, err -} -func (s TestJsonAnnotations) InnerJson() (json.Value, error) { - p, err := capnp.Struct(s).Ptr(9) - return json.Value(p.Struct()), err -} - -func (s TestJsonAnnotations) HasInnerJson() bool { - return capnp.Struct(s).HasPtr(9) -} - -func (s TestJsonAnnotations) SetInnerJson(v json.Value) error { - return capnp.Struct(s).SetPtr(9, capnp.Struct(v).ToPtr()) -} - -// NewInnerJson sets the innerJson field to a newly -// allocated json.Value struct, preferring placement in s's segment. -func (s TestJsonAnnotations) NewInnerJson() (json.Value, error) { - ss, err := json.NewValue(capnp.Struct(s).Segment()) - if err != nil { - return json.Value{}, err - } - err = capnp.Struct(s).SetPtr(9, capnp.Struct(ss).ToPtr()) - return ss, err -} - -func (s TestJsonAnnotations) CustomFieldHandler() (string, error) { - p, err := capnp.Struct(s).Ptr(10) - return p.Text(), err -} - -func (s TestJsonAnnotations) HasCustomFieldHandler() bool { - return capnp.Struct(s).HasPtr(10) -} - -func (s TestJsonAnnotations) CustomFieldHandlerBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(10) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations) SetCustomFieldHandler(v string) error { - return capnp.Struct(s).SetText(10, v) -} - -func (s TestJsonAnnotations) TestBase64() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(11) - return []byte(p.Data()), err -} - -func (s TestJsonAnnotations) HasTestBase64() bool { - return capnp.Struct(s).HasPtr(11) -} - -func (s TestJsonAnnotations) SetTestBase64(v []byte) error { - return capnp.Struct(s).SetData(11, v) -} - -func (s TestJsonAnnotations) TestHex() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(12) - return []byte(p.Data()), err -} - -func (s TestJsonAnnotations) HasTestHex() bool { - return capnp.Struct(s).HasPtr(12) -} - -func (s TestJsonAnnotations) SetTestHex(v []byte) error { - return capnp.Struct(s).SetData(12, v) -} - -func (s TestJsonAnnotations) BUnion() TestJsonAnnotations_bUnion { - return TestJsonAnnotations_bUnion(s) -} - -func (s TestJsonAnnotations_bUnion) Which() TestJsonAnnotations_bUnion_Which { - return TestJsonAnnotations_bUnion_Which(capnp.Struct(s).Uint16(16)) -} -func (s TestJsonAnnotations_bUnion) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_bUnion) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_bUnion) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_bUnion) Foo() (string, error) { - if capnp.Struct(s).Uint16(16) != 0 { - panic("Which() != foo") - } - p, err := capnp.Struct(s).Ptr(13) - return p.Text(), err -} - -func (s TestJsonAnnotations_bUnion) HasFoo() bool { - if capnp.Struct(s).Uint16(16) != 0 { - return false - } - return capnp.Struct(s).HasPtr(13) -} - -func (s TestJsonAnnotations_bUnion) FooBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(13) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_bUnion) SetFoo(v string) error { - capnp.Struct(s).SetUint16(16, 0) - return capnp.Struct(s).SetText(13, v) -} - -func (s TestJsonAnnotations_bUnion) Bar() uint32 { - if capnp.Struct(s).Uint16(16) != 1 { - panic("Which() != bar") - } - return capnp.Struct(s).Uint32(20) -} - -func (s TestJsonAnnotations_bUnion) SetBar(v uint32) { - capnp.Struct(s).SetUint16(16, 1) - capnp.Struct(s).SetUint32(20, v) -} - -func (s TestJsonAnnotations) ExternalUnion() (TestJsonAnnotations3, error) { - p, err := capnp.Struct(s).Ptr(14) - return TestJsonAnnotations3(p.Struct()), err -} - -func (s TestJsonAnnotations) HasExternalUnion() bool { - return capnp.Struct(s).HasPtr(14) -} - -func (s TestJsonAnnotations) SetExternalUnion(v TestJsonAnnotations3) error { - return capnp.Struct(s).SetPtr(14, capnp.Struct(v).ToPtr()) -} - -// NewExternalUnion sets the externalUnion field to a newly -// allocated TestJsonAnnotations3 struct, preferring placement in s's segment. -func (s TestJsonAnnotations) NewExternalUnion() (TestJsonAnnotations3, error) { - ss, err := NewTestJsonAnnotations3(capnp.Struct(s).Segment()) - if err != nil { - return TestJsonAnnotations3{}, err - } - err = capnp.Struct(s).SetPtr(14, capnp.Struct(ss).ToPtr()) - return ss, err -} - -func (s TestJsonAnnotations) UnionWithVoid() TestJsonAnnotations_unionWithVoid { - return TestJsonAnnotations_unionWithVoid(s) -} - -func (s TestJsonAnnotations_unionWithVoid) Which() TestJsonAnnotations_unionWithVoid_Which { - return TestJsonAnnotations_unionWithVoid_Which(capnp.Struct(s).Uint16(18)) -} -func (s TestJsonAnnotations_unionWithVoid) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations_unionWithVoid) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations_unionWithVoid) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations_unionWithVoid) IntValue() uint32 { - if capnp.Struct(s).Uint16(18) != 0 { - panic("Which() != intValue") - } - return capnp.Struct(s).Uint32(24) -} - -func (s TestJsonAnnotations_unionWithVoid) SetIntValue(v uint32) { - capnp.Struct(s).SetUint16(18, 0) - capnp.Struct(s).SetUint32(24, v) -} - -func (s TestJsonAnnotations_unionWithVoid) SetVoidValue() { - capnp.Struct(s).SetUint16(18, 1) - -} - -func (s TestJsonAnnotations_unionWithVoid) TextValue() (string, error) { - if capnp.Struct(s).Uint16(18) != 2 { - panic("Which() != textValue") - } - p, err := capnp.Struct(s).Ptr(15) - return p.Text(), err -} - -func (s TestJsonAnnotations_unionWithVoid) HasTextValue() bool { - if capnp.Struct(s).Uint16(18) != 2 { - return false - } - return capnp.Struct(s).HasPtr(15) -} - -func (s TestJsonAnnotations_unionWithVoid) TextValueBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(15) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations_unionWithVoid) SetTextValue(v string) error { - capnp.Struct(s).SetUint16(18, 2) - return capnp.Struct(s).SetText(15, v) -} - -// TestJsonAnnotations_List is a list of TestJsonAnnotations. -type TestJsonAnnotations_List = capnp.StructList[TestJsonAnnotations] - -// NewTestJsonAnnotations creates a new list of TestJsonAnnotations. -func NewTestJsonAnnotations_List(s *capnp.Segment, sz int32) (TestJsonAnnotations_List, error) { - l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 32, PointerCount: 16}, sz) - return capnp.StructList[TestJsonAnnotations](l), err -} - -// TestJsonAnnotations_Future is a wrapper for a TestJsonAnnotations promised by a client call. -type TestJsonAnnotations_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_Future) Struct() (TestJsonAnnotations, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations(p.Struct()), err -} -func (p TestJsonAnnotations_Future) AGroup() TestJsonAnnotations_aGroup_Future { - return TestJsonAnnotations_aGroup_Future{p.Future} -} - -// TestJsonAnnotations_aGroup_Future is a wrapper for a TestJsonAnnotations_aGroup promised by a client call. -type TestJsonAnnotations_aGroup_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_aGroup_Future) Struct() (TestJsonAnnotations_aGroup, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_aGroup(p.Struct()), err -} -func (p TestJsonAnnotations_aGroup_Future) FlatBaz() TestJsonAnnotations_aGroup_flatBaz_Future { - return TestJsonAnnotations_aGroup_flatBaz_Future{p.Future} -} - -// TestJsonAnnotations_aGroup_flatBaz_Future is a wrapper for a TestJsonAnnotations_aGroup_flatBaz promised by a client call. -type TestJsonAnnotations_aGroup_flatBaz_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_aGroup_flatBaz_Future) Struct() (TestJsonAnnotations_aGroup_flatBaz, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_aGroup_flatBaz(p.Struct()), err -} -func (p TestJsonAnnotations_aGroup_Future) DoubleFlat() TestJsonAnnotations_aGroup_doubleFlat_Future { - return TestJsonAnnotations_aGroup_doubleFlat_Future{p.Future} -} - -// TestJsonAnnotations_aGroup_doubleFlat_Future is a wrapper for a TestJsonAnnotations_aGroup_doubleFlat promised by a client call. -type TestJsonAnnotations_aGroup_doubleFlat_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_aGroup_doubleFlat_Future) Struct() (TestJsonAnnotations_aGroup_doubleFlat, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_aGroup_doubleFlat(p.Struct()), err -} -func (p TestJsonAnnotations_Future) PrefixedGroup() TestJsonAnnotations_prefixedGroup_Future { - return TestJsonAnnotations_prefixedGroup_Future{p.Future} -} - -// TestJsonAnnotations_prefixedGroup_Future is a wrapper for a TestJsonAnnotations_prefixedGroup promised by a client call. -type TestJsonAnnotations_prefixedGroup_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_prefixedGroup_Future) Struct() (TestJsonAnnotations_prefixedGroup, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_prefixedGroup(p.Struct()), err -} -func (p TestJsonAnnotations_prefixedGroup_Future) Baz() TestJsonAnnotations_prefixedGroup_baz_Future { - return TestJsonAnnotations_prefixedGroup_baz_Future{p.Future} -} - -// TestJsonAnnotations_prefixedGroup_baz_Future is a wrapper for a TestJsonAnnotations_prefixedGroup_baz promised by a client call. -type TestJsonAnnotations_prefixedGroup_baz_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_prefixedGroup_baz_Future) Struct() (TestJsonAnnotations_prefixedGroup_baz, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_prefixedGroup_baz(p.Struct()), err -} -func (p TestJsonAnnotations_prefixedGroup_Future) MorePrefix() TestJsonAnnotations_prefixedGroup_morePrefix_Future { - return TestJsonAnnotations_prefixedGroup_morePrefix_Future{p.Future} -} - -// TestJsonAnnotations_prefixedGroup_morePrefix_Future is a wrapper for a TestJsonAnnotations_prefixedGroup_morePrefix promised by a client call. -type TestJsonAnnotations_prefixedGroup_morePrefix_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_prefixedGroup_morePrefix_Future) Struct() (TestJsonAnnotations_prefixedGroup_morePrefix, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_prefixedGroup_morePrefix(p.Struct()), err -} -func (p TestJsonAnnotations_Future) AUnion() TestJsonAnnotations_aUnion_Future { - return TestJsonAnnotations_aUnion_Future{p.Future} -} - -// TestJsonAnnotations_aUnion_Future is a wrapper for a TestJsonAnnotations_aUnion promised by a client call. -type TestJsonAnnotations_aUnion_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_aUnion_Future) Struct() (TestJsonAnnotations_aUnion, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_aUnion(p.Struct()), err -} -func (p TestJsonAnnotations_aUnion_Future) Foo() TestJsonAnnotations_aUnion_foo_Future { - return TestJsonAnnotations_aUnion_foo_Future{p.Future} -} - -// TestJsonAnnotations_aUnion_foo_Future is a wrapper for a TestJsonAnnotations_aUnion_foo promised by a client call. -type TestJsonAnnotations_aUnion_foo_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_aUnion_foo_Future) Struct() (TestJsonAnnotations_aUnion_foo, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_aUnion_foo(p.Struct()), err -} -func (p TestJsonAnnotations_aUnion_Future) Bar() TestJsonAnnotations_aUnion_bar_Future { - return TestJsonAnnotations_aUnion_bar_Future{p.Future} -} - -// TestJsonAnnotations_aUnion_bar_Future is a wrapper for a TestJsonAnnotations_aUnion_bar promised by a client call. -type TestJsonAnnotations_aUnion_bar_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_aUnion_bar_Future) Struct() (TestJsonAnnotations_aUnion_bar, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_aUnion_bar(p.Struct()), err -} -func (p TestJsonAnnotations_Future) Dependency() TestJsonAnnotations2_Future { - return TestJsonAnnotations2_Future{Future: p.Future.Field(6, nil)} -} -func (p TestJsonAnnotations_Future) SimpleGroup() TestJsonAnnotations_simpleGroup_Future { - return TestJsonAnnotations_simpleGroup_Future{p.Future} -} - -// TestJsonAnnotations_simpleGroup_Future is a wrapper for a TestJsonAnnotations_simpleGroup promised by a client call. -type TestJsonAnnotations_simpleGroup_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_simpleGroup_Future) Struct() (TestJsonAnnotations_simpleGroup, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_simpleGroup(p.Struct()), err -} -func (p TestJsonAnnotations_Future) InnerJson() json.Value_Future { - return json.Value_Future{Future: p.Future.Field(9, nil)} -} -func (p TestJsonAnnotations_Future) BUnion() TestJsonAnnotations_bUnion_Future { - return TestJsonAnnotations_bUnion_Future{p.Future} -} - -// TestJsonAnnotations_bUnion_Future is a wrapper for a TestJsonAnnotations_bUnion promised by a client call. -type TestJsonAnnotations_bUnion_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_bUnion_Future) Struct() (TestJsonAnnotations_bUnion, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_bUnion(p.Struct()), err -} -func (p TestJsonAnnotations_Future) ExternalUnion() TestJsonAnnotations3_Future { - return TestJsonAnnotations3_Future{Future: p.Future.Field(14, nil)} -} -func (p TestJsonAnnotations_Future) UnionWithVoid() TestJsonAnnotations_unionWithVoid_Future { - return TestJsonAnnotations_unionWithVoid_Future{p.Future} -} - -// TestJsonAnnotations_unionWithVoid_Future is a wrapper for a TestJsonAnnotations_unionWithVoid promised by a client call. -type TestJsonAnnotations_unionWithVoid_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations_unionWithVoid_Future) Struct() (TestJsonAnnotations_unionWithVoid, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations_unionWithVoid(p.Struct()), err -} - -type TestJsonAnnotations2 capnp.Struct - -// TestJsonAnnotations2_TypeID is the unique identifier for the type TestJsonAnnotations2. -const TestJsonAnnotations2_TypeID = 0xf726f6fa6b58143c - -func NewTestJsonAnnotations2(s *capnp.Segment) (TestJsonAnnotations2, error) { - st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}) - return TestJsonAnnotations2(st), err -} - -func NewRootTestJsonAnnotations2(s *capnp.Segment) (TestJsonAnnotations2, error) { - st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}) - return TestJsonAnnotations2(st), err -} - -func ReadRootTestJsonAnnotations2(msg *capnp.Message) (TestJsonAnnotations2, error) { - root, err := msg.Root() - return TestJsonAnnotations2(root.Struct()), err -} - -func (s TestJsonAnnotations2) String() string { - str, _ := text.Marshal(0xf726f6fa6b58143c, capnp.Struct(s)) - return str -} - -func (s TestJsonAnnotations2) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr { - return capnp.Struct(s).EncodeAsPtr(seg) -} - -func (TestJsonAnnotations2) DecodeFromPtr(p capnp.Ptr) TestJsonAnnotations2 { - return TestJsonAnnotations2(capnp.Struct{}.DecodeFromPtr(p)) -} - -func (s TestJsonAnnotations2) ToPtr() capnp.Ptr { - return capnp.Struct(s).ToPtr() -} -func (s TestJsonAnnotations2) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations2) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations2) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations2) Foo() (string, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.Text(), err -} - -func (s TestJsonAnnotations2) HasFoo() bool { - return capnp.Struct(s).HasPtr(0) -} - -func (s TestJsonAnnotations2) FooBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.TextBytes(), err -} - -func (s TestJsonAnnotations2) SetFoo(v string) error { - return capnp.Struct(s).SetText(0, v) -} - -func (s TestJsonAnnotations2) Cycle() (TestJsonAnnotations, error) { - p, err := capnp.Struct(s).Ptr(1) - return TestJsonAnnotations(p.Struct()), err -} - -func (s TestJsonAnnotations2) HasCycle() bool { - return capnp.Struct(s).HasPtr(1) -} - -func (s TestJsonAnnotations2) SetCycle(v TestJsonAnnotations) error { - return capnp.Struct(s).SetPtr(1, capnp.Struct(v).ToPtr()) -} - -// NewCycle sets the cycle field to a newly -// allocated TestJsonAnnotations struct, preferring placement in s's segment. -func (s TestJsonAnnotations2) NewCycle() (TestJsonAnnotations, error) { - ss, err := NewTestJsonAnnotations(capnp.Struct(s).Segment()) - if err != nil { - return TestJsonAnnotations{}, err - } - err = capnp.Struct(s).SetPtr(1, capnp.Struct(ss).ToPtr()) - return ss, err -} - -// TestJsonAnnotations2_List is a list of TestJsonAnnotations2. -type TestJsonAnnotations2_List = capnp.StructList[TestJsonAnnotations2] - -// NewTestJsonAnnotations2 creates a new list of TestJsonAnnotations2. -func NewTestJsonAnnotations2_List(s *capnp.Segment, sz int32) (TestJsonAnnotations2_List, error) { - l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz) - return capnp.StructList[TestJsonAnnotations2](l), err -} - -// TestJsonAnnotations2_Future is a wrapper for a TestJsonAnnotations2 promised by a client call. -type TestJsonAnnotations2_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations2_Future) Struct() (TestJsonAnnotations2, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations2(p.Struct()), err -} -func (p TestJsonAnnotations2_Future) Cycle() TestJsonAnnotations_Future { - return TestJsonAnnotations_Future{Future: p.Future.Field(1, nil)} -} - -type TestJsonAnnotations3 capnp.Struct -type TestJsonAnnotations3_Which uint16 - -const ( - TestJsonAnnotations3_Which_foo TestJsonAnnotations3_Which = 0 - TestJsonAnnotations3_Which_bar TestJsonAnnotations3_Which = 1 -) - -func (w TestJsonAnnotations3_Which) String() string { - const s = "foobar" - switch w { - case TestJsonAnnotations3_Which_foo: - return s[0:3] - case TestJsonAnnotations3_Which_bar: - return s[3:6] - - } - return "TestJsonAnnotations3_Which(" + strconv.FormatUint(uint64(w), 10) + ")" -} - -// TestJsonAnnotations3_TypeID is the unique identifier for the type TestJsonAnnotations3. -const TestJsonAnnotations3_TypeID = 0xd5533065ce7c825f - -func NewTestJsonAnnotations3(s *capnp.Segment) (TestJsonAnnotations3, error) { - st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}) - return TestJsonAnnotations3(st), err -} - -func NewRootTestJsonAnnotations3(s *capnp.Segment) (TestJsonAnnotations3, error) { - st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}) - return TestJsonAnnotations3(st), err -} - -func ReadRootTestJsonAnnotations3(msg *capnp.Message) (TestJsonAnnotations3, error) { - root, err := msg.Root() - return TestJsonAnnotations3(root.Struct()), err -} - -func (s TestJsonAnnotations3) String() string { - str, _ := text.Marshal(0xd5533065ce7c825f, capnp.Struct(s)) - return str -} - -func (s TestJsonAnnotations3) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr { - return capnp.Struct(s).EncodeAsPtr(seg) -} - -func (TestJsonAnnotations3) DecodeFromPtr(p capnp.Ptr) TestJsonAnnotations3 { - return TestJsonAnnotations3(capnp.Struct{}.DecodeFromPtr(p)) -} - -func (s TestJsonAnnotations3) ToPtr() capnp.Ptr { - return capnp.Struct(s).ToPtr() -} - -func (s TestJsonAnnotations3) Which() TestJsonAnnotations3_Which { - return TestJsonAnnotations3_Which(capnp.Struct(s).Uint16(4)) -} -func (s TestJsonAnnotations3) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestJsonAnnotations3) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestJsonAnnotations3) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestJsonAnnotations3) Foo() uint32 { - if capnp.Struct(s).Uint16(4) != 0 { - panic("Which() != foo") - } - return capnp.Struct(s).Uint32(0) -} - -func (s TestJsonAnnotations3) SetFoo(v uint32) { - capnp.Struct(s).SetUint16(4, 0) - capnp.Struct(s).SetUint32(0, v) -} - -func (s TestJsonAnnotations3) Bar() (TestFlattenedStruct, error) { - if capnp.Struct(s).Uint16(4) != 1 { - panic("Which() != bar") - } - p, err := capnp.Struct(s).Ptr(0) - return TestFlattenedStruct(p.Struct()), err -} - -func (s TestJsonAnnotations3) HasBar() bool { - if capnp.Struct(s).Uint16(4) != 1 { - return false - } - return capnp.Struct(s).HasPtr(0) -} - -func (s TestJsonAnnotations3) SetBar(v TestFlattenedStruct) error { - capnp.Struct(s).SetUint16(4, 1) - return capnp.Struct(s).SetPtr(0, capnp.Struct(v).ToPtr()) -} - -// NewBar sets the bar field to a newly -// allocated TestFlattenedStruct struct, preferring placement in s's segment. -func (s TestJsonAnnotations3) NewBar() (TestFlattenedStruct, error) { - capnp.Struct(s).SetUint16(4, 1) - ss, err := NewTestFlattenedStruct(capnp.Struct(s).Segment()) - if err != nil { - return TestFlattenedStruct{}, err - } - err = capnp.Struct(s).SetPtr(0, capnp.Struct(ss).ToPtr()) - return ss, err -} - -// TestJsonAnnotations3_List is a list of TestJsonAnnotations3. -type TestJsonAnnotations3_List = capnp.StructList[TestJsonAnnotations3] - -// NewTestJsonAnnotations3 creates a new list of TestJsonAnnotations3. -func NewTestJsonAnnotations3_List(s *capnp.Segment, sz int32) (TestJsonAnnotations3_List, error) { - l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}, sz) - return capnp.StructList[TestJsonAnnotations3](l), err -} - -// TestJsonAnnotations3_Future is a wrapper for a TestJsonAnnotations3 promised by a client call. -type TestJsonAnnotations3_Future struct{ *capnp.Future } - -func (f TestJsonAnnotations3_Future) Struct() (TestJsonAnnotations3, error) { - p, err := f.Future.Ptr() - return TestJsonAnnotations3(p.Struct()), err -} -func (p TestJsonAnnotations3_Future) Bar() TestFlattenedStruct_Future { - return TestFlattenedStruct_Future{Future: p.Future.Field(0, nil)} -} - -type TestFlattenedStruct capnp.Struct - -// TestFlattenedStruct_TypeID is the unique identifier for the type TestFlattenedStruct. -const TestFlattenedStruct_TypeID = 0xb1cc94eb5141adf8 - -func NewTestFlattenedStruct(s *capnp.Segment) (TestFlattenedStruct, error) { - st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}) - return TestFlattenedStruct(st), err -} - -func NewRootTestFlattenedStruct(s *capnp.Segment) (TestFlattenedStruct, error) { - st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}) - return TestFlattenedStruct(st), err -} - -func ReadRootTestFlattenedStruct(msg *capnp.Message) (TestFlattenedStruct, error) { - root, err := msg.Root() - return TestFlattenedStruct(root.Struct()), err -} - -func (s TestFlattenedStruct) String() string { - str, _ := text.Marshal(0xb1cc94eb5141adf8, capnp.Struct(s)) - return str -} - -func (s TestFlattenedStruct) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr { - return capnp.Struct(s).EncodeAsPtr(seg) -} - -func (TestFlattenedStruct) DecodeFromPtr(p capnp.Ptr) TestFlattenedStruct { - return TestFlattenedStruct(capnp.Struct{}.DecodeFromPtr(p)) -} - -func (s TestFlattenedStruct) ToPtr() capnp.Ptr { - return capnp.Struct(s).ToPtr() -} -func (s TestFlattenedStruct) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestFlattenedStruct) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestFlattenedStruct) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestFlattenedStruct) Value() (string, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.Text(), err -} - -func (s TestFlattenedStruct) HasValue() bool { - return capnp.Struct(s).HasPtr(0) -} - -func (s TestFlattenedStruct) ValueBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.TextBytes(), err -} - -func (s TestFlattenedStruct) SetValue(v string) error { - return capnp.Struct(s).SetText(0, v) -} - -// TestFlattenedStruct_List is a list of TestFlattenedStruct. -type TestFlattenedStruct_List = capnp.StructList[TestFlattenedStruct] - -// NewTestFlattenedStruct creates a new list of TestFlattenedStruct. -func NewTestFlattenedStruct_List(s *capnp.Segment, sz int32) (TestFlattenedStruct_List, error) { - l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz) - return capnp.StructList[TestFlattenedStruct](l), err -} - -// TestFlattenedStruct_Future is a wrapper for a TestFlattenedStruct promised by a client call. -type TestFlattenedStruct_Future struct{ *capnp.Future } - -func (f TestFlattenedStruct_Future) Struct() (TestFlattenedStruct, error) { - p, err := f.Future.Ptr() - return TestFlattenedStruct(p.Struct()), err -} - -type TestJsonAnnotatedEnum uint16 - -// TestJsonAnnotatedEnum_TypeID is the unique identifier for the type TestJsonAnnotatedEnum. -const TestJsonAnnotatedEnum_TypeID = 0xeca76f3df6b22dbb - -// Values of TestJsonAnnotatedEnum. -const ( - TestJsonAnnotatedEnum_foo TestJsonAnnotatedEnum = 0 - TestJsonAnnotatedEnum_bar TestJsonAnnotatedEnum = 1 - TestJsonAnnotatedEnum_baz TestJsonAnnotatedEnum = 2 - TestJsonAnnotatedEnum_qux TestJsonAnnotatedEnum = 3 -) - -// String returns the enum's constant name. -func (c TestJsonAnnotatedEnum) String() string { - switch c { - case TestJsonAnnotatedEnum_foo: - return "foo" - case TestJsonAnnotatedEnum_bar: - return "bar" - case TestJsonAnnotatedEnum_baz: - return "baz" - case TestJsonAnnotatedEnum_qux: - return "qux" - - default: - return "" - } -} - -// TestJsonAnnotatedEnumFromString returns the enum value with a name, -// or the zero value if there's no such value. -func TestJsonAnnotatedEnumFromString(c string) TestJsonAnnotatedEnum { - switch c { - case "foo": - return TestJsonAnnotatedEnum_foo - case "bar": - return TestJsonAnnotatedEnum_bar - case "baz": - return TestJsonAnnotatedEnum_baz - case "qux": - return TestJsonAnnotatedEnum_qux - - default: - return 0 - } -} - -type TestJsonAnnotatedEnum_List = capnp.EnumList[TestJsonAnnotatedEnum] - -func NewTestJsonAnnotatedEnum_List(s *capnp.Segment, sz int32) (TestJsonAnnotatedEnum_List, error) { - return capnp.NewEnumList[TestJsonAnnotatedEnum](s, sz) -} - -type TestBase64Union capnp.Struct -type TestBase64Union_Which uint16 - -const ( - TestBase64Union_Which_foo TestBase64Union_Which = 0 - TestBase64Union_Which_bar TestBase64Union_Which = 1 -) - -func (w TestBase64Union_Which) String() string { - const s = "foobar" - switch w { - case TestBase64Union_Which_foo: - return s[0:3] - case TestBase64Union_Which_bar: - return s[3:6] - - } - return "TestBase64Union_Which(" + strconv.FormatUint(uint64(w), 10) + ")" -} - -// TestBase64Union_TypeID is the unique identifier for the type TestBase64Union. -const TestBase64Union_TypeID = 0xe36a2dc2a7ba9f0a - -func NewTestBase64Union(s *capnp.Segment) (TestBase64Union, error) { - st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}) - return TestBase64Union(st), err -} - -func NewRootTestBase64Union(s *capnp.Segment) (TestBase64Union, error) { - st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}) - return TestBase64Union(st), err -} - -func ReadRootTestBase64Union(msg *capnp.Message) (TestBase64Union, error) { - root, err := msg.Root() - return TestBase64Union(root.Struct()), err -} - -func (s TestBase64Union) String() string { - str, _ := text.Marshal(0xe36a2dc2a7ba9f0a, capnp.Struct(s)) - return str -} - -func (s TestBase64Union) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr { - return capnp.Struct(s).EncodeAsPtr(seg) -} - -func (TestBase64Union) DecodeFromPtr(p capnp.Ptr) TestBase64Union { - return TestBase64Union(capnp.Struct{}.DecodeFromPtr(p)) -} - -func (s TestBase64Union) ToPtr() capnp.Ptr { - return capnp.Struct(s).ToPtr() -} - -func (s TestBase64Union) Which() TestBase64Union_Which { - return TestBase64Union_Which(capnp.Struct(s).Uint16(0)) -} -func (s TestBase64Union) IsValid() bool { - return capnp.Struct(s).IsValid() -} - -func (s TestBase64Union) Message() *capnp.Message { - return capnp.Struct(s).Message() -} - -func (s TestBase64Union) Segment() *capnp.Segment { - return capnp.Struct(s).Segment() -} -func (s TestBase64Union) Foo() ([]byte, error) { - if capnp.Struct(s).Uint16(0) != 0 { - panic("Which() != foo") - } - p, err := capnp.Struct(s).Ptr(0) - return []byte(p.Data()), err -} - -func (s TestBase64Union) HasFoo() bool { - if capnp.Struct(s).Uint16(0) != 0 { - return false - } - return capnp.Struct(s).HasPtr(0) -} - -func (s TestBase64Union) SetFoo(v []byte) error { - capnp.Struct(s).SetUint16(0, 0) - return capnp.Struct(s).SetData(0, v) -} - -func (s TestBase64Union) Bar() (string, error) { - if capnp.Struct(s).Uint16(0) != 1 { - panic("Which() != bar") - } - p, err := capnp.Struct(s).Ptr(0) - return p.Text(), err -} - -func (s TestBase64Union) HasBar() bool { - if capnp.Struct(s).Uint16(0) != 1 { - return false - } - return capnp.Struct(s).HasPtr(0) -} - -func (s TestBase64Union) BarBytes() ([]byte, error) { - p, err := capnp.Struct(s).Ptr(0) - return p.TextBytes(), err -} - -func (s TestBase64Union) SetBar(v string) error { - capnp.Struct(s).SetUint16(0, 1) - return capnp.Struct(s).SetText(0, v) -} - -// TestBase64Union_List is a list of TestBase64Union. -type TestBase64Union_List = capnp.StructList[TestBase64Union] - -// NewTestBase64Union creates a new list of TestBase64Union. -func NewTestBase64Union_List(s *capnp.Segment, sz int32) (TestBase64Union_List, error) { - l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}, sz) - return capnp.StructList[TestBase64Union](l), err -} - -// TestBase64Union_Future is a wrapper for a TestBase64Union promised by a client call. -type TestBase64Union_Future struct{ *capnp.Future } - -func (f TestBase64Union_Future) Struct() (TestBase64Union, error) { - p, err := f.Future.Ptr() - return TestBase64Union(p.Struct()), err -} - -const schema_c9d405cf4333e4c9 = "x\xda\xacWo\x8cTW\x15?\xe7\xde7\x7fv\x99" + - "a\xde\xe5\xbd-\x90@\x1eL\xaa\x16\xec\xac\xb0\x03\xd4" + - "\xaem\x87]]\xa0\xe8\x9a};\xbb\xd8\xae5\xe5\xcd" + - "\xce]\x98:\xf3\xde0\xf3\xa6\xdd\xd9\xf4ODI\xd5" + - "\xacQ\x0c1\x15?\xf8\xa14@\xb4!4\x92\x18\xad" + - "5j\x8d\xc1(\xa4\xb1\x88~\xe8\x07\xdb\x9aV\xd4\xc6" + - "\x98X\x05\x95g\xce\x9b?o\x16\x86u7\xe9\xa7\xdd" + - "\xb9\xf7\xbcs\xcf\xf9\x9d\xf3\xfb\x9d{\xb7TC;\x95" + - "\xad\xf1D\x0c\x989\x1f\x0a{\xea\xba\xb7.\x9c?\xf1" + - "\xe4<\x98\x1fD\xc5\xfb\x82\xb5\xed\x0f\x87\x06\xb7\x1f\x85" + - ">5\x82\x00\xe9\xbf\x86\xe6\x10P\xbb\x1az\x0c0\xd8" + - "4oG\xc5S\xbe\xba\xfb\xe2m\xcf\xe9\xa7`R\x8d" + - " C\x9e\xfeLx\x8al\x0ba\xb2=\xfd\xea3/" + - "\xef\xf9\xf7\xbeo\xdc`\xdbt{5\xfcu2\xed\x89" + - "\xbc\x05\x18l\x9a**\xde\xf97\xd3\x1f\xbd\x18z\xf5" + - "<\x84\xd4\x08YF\x92\xa8\xf5D\xe9\xdfPt5\x07" + - "\xf4>\x99{&\x13\xfb\x80q\xa6k\x14\xd1\xf4\xfd1" + - "?\x8a\xc9\x18E\xf1\xe4;\xcf\xfd\xe8\xcd\xccw\xce6" + - "\x92\xbb\xfc\xad\x81S\xfb3\xeb\x7f\xdd\x8a\xe2\xf7\xb1\xe3" + - "d\xfa\xa7X\x06\xd0\xfb\xd7\xf3C\xe6\x9f\x8f\xfd\xea," + - "\x08\x15;\x82@:\xb9'\x9eDmm<\x02\xa0\xf5" + - "\xc5\xc9\xf8\xd8\xfc\xf5C\xb1\xfb\xbe\xfc\xb3\xee~\xb7\xc7" + - "_ \xbf#\xbe\xe9\x95\x9d\xaf\x1b\xf3\x17\x9e~\x19\xcc" + - "\x01T\x02X\x9a\xa62~\x85L\xeb\xbe\xe9\x89\xbb\xf7" + - "\xf1\xa1\x17\xdf\xf9e\x97\xcc8\xf6\xa4\xbf\x19\xf7A;" + - "\x1d?\x03\x18\x9c\xd9\x15\xdf\xd1\x95>\x08\x0f\xae$|" + - "_{c\xff\xf6\xd5\x13\x0f\xbe\xd2=\x82\x91\x84\x1f\xec" + - "d\x82\"x\xf8\xf0\xe3\x17\xe4\x96\xec%*E\x07\x0a" + - "#\x18a\xc8\xd2\xb5\xc4f\xd4\x8e$\"\xda\x91\x84\xa1" + - "=\x9f \x80\xd3\xe5\xaf\xdd\xff\xd2Gv_\xee\x1eF" + - "J=L\xbe\xefV\xc9w\xef\xb7\x7fp\xf2\xa7\xa9G" + - "\xde\xe8\xe2\x1b \xfd9\x95\xa1\xf6\x15*\xb9\xf6%\x95" + - "<\xff0\xf5\xc2\xbb\xf7:'\xff\x02Be\x815`" + - ":$\x06P\xeb\x13d)\xc4\x01@\xef\xe9\xfcKW" + - "\xe6O<\xfb\xf7\xee\x1d|D\xf8\x1d|T\x90\xd3{" + - "\xf4\x07>{\xed\xdd\xf7\xff\xf3\x86\"3*\xf2?\xc4" + - "f\xd4B\xab\xc8/\xaez\x0c^\xf4\x1e\xa9:v\xca" + - "\x95U\xc5\xed\x9f\xb6\xcavypBV\xdd\xbdU\xc7" + - "\x1e\xb2m\xc7\xb5\xdc\x82cW\xfb\xadI\xbb\x90q\xec" + - "\xfe\x19\xc71\xa3\\QC:\xf6\x00\x88M\xe3\x00\xe6" + - "\x1d\x1c\xcdm\x0c\x05r\x1d{\x01\xc4\xd6\x1c\x80\xb9\x85" + - "\xa3y\x0fCo\xc6qFe)'\x01+\x18\x03\x86" + - "1@\xafT+\xba\x85QY\x82HNV0\x0a\x0c" + - "\xa3\x80K\x8f\x83;6\xc5\x10\xf3<\xc4\x80\xd7bS" + - "Rl2\x00\xe3x\x9d\xd6\xdbh\x89\xedI\xb1\xfd." + - "\xc0\x08\x85\xae \xf3~\xbc\x83\x9f\x19\x7f\xfb7\x87\xc1" + - "T\x18\x0e\xa9\x88*\xc0N\x04\x8c\xe4\xac\x8a\x19]`" + - "\xa02\x1cZ\x87\xde\xbd\x8f\xf7\xaf\xfb\xad\xf1\xe9k`" + - "\xaea8tG\xfb\x0b\x8c\x01\x08\xccy\x15i[%" + - "\x99O\x01\xb9\x00hg\x12Z,\x93rE\xce\x14f" + - "e~w\xc5\xa9a\xd9T\xb9\xa2r\x1dC\x00\xc2J" + - "\x02\x98\x0fq4\x0f\x12\xa8L\xc70\x80\x90I!\x0d" + - "\xf3\x8b\x1c\xcdc\x0c\x91aG\xbf\x8b\xa3I`\xc8\xb1" + - "\x83\x84\xa2>%\x9e0\x1aI\xb7`\xf7\xf3#\x00\x82" + - "t\x08\x00\xfdVi\xb4\x0a\x13\xc9Ys^\xc9\xa9\xc8" + - "\xb1\x8a\x9c\x01^\x98\xed\x82\xa2\xde\xc4D\xe0\xe6\xc4\xec" + - "L\xb9\xbf\x03\x04~+\x10\"\x8e]\x1dC4?\xcc" + - "\x15\x00\x05\x01\xb4:\x8ekO\xa0\x91\xfd.r\xcc~" + - "\x9f\x92D\xec\x90\x00\xed\x1c\x0ej\xe7\xd0\x80F\xfem" + - "\x86k?\xc1\x8a\xf6s\x7f\x9d@h3C\xbb\x84\x83" + - "\xda%\xbc\x0bP(a\x1d\xe3\x00Z\x9cM\x01dc" + - "\x8ccv\x0dc\x88!\xec\xe0\xb6\xd6\xc7r\xc0D8" + - "\xaac\x82\xd8\xc1\x06\x00\xb2\xff\xc1\xa6\xad\x88\xf4\xe8\x94" + - "\xa4\xd6\xc7\xc6\x01\xb2:\xf9\xd8@\xeb\xd1^\x1d\x05\x80" + - "\xb6\x9e\x1d\x07\xc8n\xa0\xf5;i\xbdg\x85\x8e\xab\x00" + - "\xb4MlJK1#\xbb\x87v&h\xa77\xa6\xa3" + - "\x06\xa0\x99lX3\x99\x91-\xd2\xce,\xc5\xb3\x02;" + - "\x84_\xab\xb1A\xad\xc6(\xfe\xd8J\x1do\x03\xd0N" + - "\xb3\x0a@\xf6\x14\xd9\x7f\x8f\xec\xe3\xd8!\xa7\xdaYV" + - "\xd1\xce1\x03\xd0\xab:%\xb9\xab \x8b\x80\xf9.%" + - "\xdf\xe0\x97|+\xaeB\x8f*^MM[\xdc~x" + - "\xda\xb1]\xab`o\xb4\xec\xba{\xb0`\x1f\xd80." + - "\xadb\x11\xeb\x00\xad\x0e\xcaX\xd4\xac\xe5EY\xe4\xb5" + - "\xfa\x1a\x8c[\x19w6Kyf\xb6\x1f C\xb4&" + - "Vwc_\x0e\x8f\xbf\xf2\xf6\xb1\x93\x17\x1b\xec\xdb\x12" + - "\xb0\x8f\xfe2\x11\x9a\x02\xf0j\xf4y\xca\xad\x03/K" + - "\x00//\xcb\xd2\xceK\x1b\xf8t\x1d\xd5@\x0e\xfd\x8f" + - "\xd0\xab\x16J\xe5\xa2\xdc]\x81\x88S+\x1b\xd2\xae\x95" + - "\xaa\xb8\x12p\x8c#&\x02A\x06\xa4E\xaf`\xdb\xb2" + - "\xb2\xb7\xea\x00\xda\xa8z\x9f\x7fm\xed\xd5\x91\xd9k\xcf" + - "\xb6\\M\xd7\xaa\xaeS\xdaU@Y\xcc\xef\xb1\xec|" + - "\x91\xcb@\xe7\\Yu\x87\xad\xaa\x04\xbec\x9b\x8f\xc3" + - "\xc7\xef{_\xefH\xfdw\x97\x1b8\xc4\x108\xc6\x81" + - "a\x1c\xf0)\xb2\xdd#\x1b\xdc:\xf7\x8b?\xf6~\xe8" + - "u\xebo7\x9berK\x06\xea\xce\x1b\x80\"\x8e\x0f" + - "fr\xfb\xacb\x8d \x92\xb3\xae\xac\xd8V\x11\x0c\xdf" + - "#\xaa\xc1Pl\xa6\xe6c\xfa\xa9\x82\x0b\xc6\xc1}N" + - "\xa1\xd1G\xc1\x11\x14\xd9\x9av\x0d6\x03$\xdc\xba\x8f" + - "\xfd\x92d<\x17\xc8\xf8:\xcf\x8b\xeb\xa8\xd30!\xdd" + - "\xbb\x9d\xa3\xb9\x85\xe1z\xbc\xee\x85t\xec\x03\x10\xa9\xa4" + - "H\x19\xe6\x18G\xf3!\xf6\x9e\x08\xda\xd2\xf4\xb9\xd1\xeb" + - "\xfd3E\xcb\x1d\xe6\xd6\x9c\xa9pE\xdd\xa0#\x07\x10" + - "\xf1\x01\x003\xca\xd1\xd4\x19\x1a\x07e\xb1\xe8 \x02C" + - "\xecp\xbd@\xf5v\x15-\xd7\x95\xb6\xccg\xddJ\xa4" + - "6\xed\x92\xea)-\xd5[\xe8\xedQ*O\xbb\x81\x96" + - "\x13h\xde\xa9\xe5\x8a\x86\xa4\xb3\xfcX\x99\x8e\x0ay\x1f" + - "\x0e\xbc?E\xc9\x98\xb5\xd9\x9b\xfc\x87\x97:\xa8\xca\xfd" + - "\x8dA\x90\xa0%\xff\x18E\xc7(\x1d\x93\x0c\x8e\x89\x1c" + - "\xear\xc4\xa2)\xb4Z\x8d\x1a\x0d\xf3f\xcc\xef\x8a\xb0" + - "\x8e\xab\x01\xc4\xc8^\x00\xf3c\x1c\xcd1\xe6\xcfv\x1d" + - "\xd7\x00\x88Q\xbax|\x82\xa3\xf9\x00\xc3\xf5\xec\xbf^" + - "B\xc7\xb5\x00b\x92\x96'8\x9a\xfb\x191\xd7mv" + - "{P\xfaG\x9dB\x9e\x16\x01%\x84=W\xce\xba\xcd" + - "_7\x05\xac\xfc?\xccy\xcd\x9f\xda\x00:R\x19\xad" + - "\xe1\xce\xa9\x8d:\x12\xe3$-\xee\xe7h\x16\x9bC\xbb" + - "}S\x17\x85aQh\x8d\xac\xf6=\xbb5\xb7\xfdJ" + - "\xedr\x9cV\xdc\xfe\xefa\xab--\xcd\xdfs\x8b\xb4" + - "\xff\xe1v\xfbc\xd3\x18H\x19\xa9K\xe4\xae\"pj" + - "\x93\xc5t|\xd9\x97\x18\xa3\xdc\x9fk\xf2d\xa3N\xef" + - "\x89e\xf3\xa4\xd3{\xc2\xb1\xabi\x9f(K\x92\x9d\xe6" + - "\x85\xd0'T\xa7\x8e4:\x06\xdb2\xd2l\x19_F" + - "\x82\xfbMeQ(P\x0d^MMm\\\x128\xad" + - "1\xe3\xd4\xca\xe0\xc3\x12\xd1q%\xc12(\xe2F\xeb" + - "\x82\x9c9P\xb1jEw\x91B\xce\x05:\xd64\x0e" + - "&rw\x1ci\xe6\xec\xd8\xe6\xeb:\x10\x84\x0b\xb0\x11" + - "\x9b\x8c\x85t\xa2\xe5Q\x82l\x0fGs\x82\x05\x17\xe5" + - "[O+\x82l\xf1\x10:\xb0\x90F~\xc4\xae\x95(" + - "\x10\xd5'\x05\xd5\x07QlL\x8a\x8d\x0621\x94\x14" + - "C\x06r\xff\xdaKg/W\xd6#\xb9Ey\xb0\xd0" + - "~\x0e\x80\xe4iy\x8f\x1e\xffa\xd0\xb8\x9f\xaf\xb8\xe9" + - "\xd1\x13\xd2\xfds\x16