diff --git a/constants/constants.go b/constants/constants.go index e318c4c6..0407314d 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -2,8 +2,6 @@ package constants import ( - "gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/tables/table_connections" - "gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/connections" "time" ) @@ -15,7 +13,4 @@ var CONNECTION_ID int64 = 3 //7 // BRANCH_ID - ИД в БД Рапира в таблице branches var BRANCH_ID int64 = 2 //20954 -// CONNECTION - объект Соединение, настроенный -var CONNECTION = connections.Connection{Table_Connection: table_connections.Table_Connection{ID: CONNECTION_ID, BranchID: BRANCH_ID, IsLegal: true, Server: "10.1.9.153", Port: "5432", DbName: "kol_atom_ul_uni", DbScheme: "stack", Login: "", Password: ""}} - var TIME_ZONE = "Europe/Moscow" diff --git a/go.mod b/go.mod index 9e5e2af1..53b7a4f2 100644 --- a/go.mod +++ b/go.mod @@ -4,15 +4,15 @@ go 1.20 require ( github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792 - github.com/camunda/zeebe/clients/go/v8 v8.3.4 + github.com/camunda/zeebe/clients/go/v8 v8.4.0 github.com/denisenkom/go-mssqldb v0.12.3 github.com/emersion/go-imap v1.2.1 - github.com/emersion/go-message v0.17.0 + github.com/emersion/go-message v0.18.0 github.com/go-faster/errors v0.7.1 - github.com/gofiber/fiber/v2 v2.51.0 - github.com/golang-module/carbon/v2 v2.3.0 + github.com/gofiber/fiber/v2 v2.52.0 + github.com/golang-module/carbon/v2 v2.3.5 github.com/gotd/contrib v0.19.0 - github.com/gotd/td v0.92.0 + github.com/gotd/td v0.93.0 github.com/jackc/pgx/v4 v4.18.1 github.com/jmoiron/sqlx v1.3.5 github.com/joho/godotenv v1.5.1 @@ -21,15 +21,15 @@ require ( github.com/mattn/go-sqlite3 v1.14.19 github.com/mdp/qrterminal/v3 v3.2.0 github.com/minio/minio-go/v7 v7.0.66 - github.com/nats-io/nats.go v1.31.0 - github.com/sashabaranov/go-openai v1.17.9 + github.com/nats-io/nats.go v1.32.0 + github.com/sashabaranov/go-openai v1.17.11 github.com/segmentio/kafka-go v0.4.47 github.com/xhit/go-simple-mail/v2 v2.16.0 gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange v0.0.16 - gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.37 - go.mau.fi/whatsmeow v0.0.0-20231216213200-9d803dd92735 - golang.org/x/crypto v0.17.0 - golang.org/x/exp v0.0.0-20231226003508-02704c960a9b + gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.43 + go.mau.fi/whatsmeow v0.0.0-20240113094857-194904c8793f + golang.org/x/crypto v0.18.0 + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 gorm.io/driver/postgres v1.5.4 gorm.io/driver/sqlserver v1.5.2 gorm.io/gorm v1.25.5 @@ -37,7 +37,7 @@ require ( require ( filippo.io/edwards25519 v1.1.0 // indirect - github.com/andybalholm/brotli v1.0.6 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -63,8 +63,8 @@ require ( github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.2 // indirect github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect - github.com/jackc/pgtype v1.14.0 // indirect - github.com/jackc/pgx/v5 v5.5.1 // indirect + github.com/jackc/pgtype v1.14.1 // indirect + github.com/jackc/pgx/v5 v5.5.2 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -79,9 +79,9 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/nats-io/nkeys v0.4.6 // indirect + github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/pierrec/lz4/v4 v4.1.19 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rs/xid v1.5.0 // indirect @@ -89,7 +89,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect - github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 // indirect + github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.51.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect @@ -102,18 +102,17 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect google.golang.org/grpc v1.60.1 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.10 // indirect rsc.io/qr v0.2.0 // indirect diff --git a/go.sum b/go.sum index 29946b7e..537ab195 100644 --- a/go.sum +++ b/go.sum @@ -25,13 +25,13 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792 h1:bxwxD0H3kSUAH3uNk/b74gkImcUiP7dyibmMoVwk338= github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792/go.mod h1:OUyxCVbPW/2lC1e6cM7Am941SJiC88BhNnb24x2R3a8= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/camunda/zeebe/clients/go/v8 v8.3.4 h1:GXfr55VIdls7l3qANdZ9aSi1DV2PX6951zlp/x/5/9Q= -github.com/camunda/zeebe/clients/go/v8 v8.3.4/go.mod h1:IlOdQHcF9MgRWWdiuuZGQ+IB5hw54LAveMJYmrlRKSw= +github.com/camunda/zeebe/clients/go/v8 v8.4.0 h1:6ilIn/w3N5V/wcPNGZfWY22CDkb2OYkJJmMr7IrSXlw= +github.com/camunda/zeebe/clients/go/v8 v8.4.0/go.mod h1:J3JDIxshH9A5qEU4DThH4JLMUFetIx51GpMZrjjUOCo= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= @@ -51,8 +51,8 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/emersion/go-imap v1.2.1 h1:+s9ZjMEjOB8NzZMVTM3cCenz2JrQIGGo5j1df19WjTA= github.com/emersion/go-imap v1.2.1/go.mod h1:Qlx1FSx2FTxjnjWpIlVNEuX+ylerZQNFE5NsmKFSejY= github.com/emersion/go-message v0.15.0/go.mod h1:wQUEfE+38+7EW8p8aZ96ptg6bAb1iwdgej19uXASlE4= -github.com/emersion/go-message v0.17.0 h1:NIdSKHiVUx4qKqdd0HyJFD41cW8iFguM2XJnRZWQH04= -github.com/emersion/go-message v0.17.0/go.mod h1:/9Bazlb1jwUNB0npYYBsdJ2EMOiiyN3m5UVHbY7GoNw= +github.com/emersion/go-message v0.18.0 h1:7LxAXHRpSeoO/Wom3ZApVZYG7c3d17yCScYce8WiXA8= +github.com/emersion/go-message v0.18.0/go.mod h1:Zi69ACvzaoV/MBnrxfVBPV3xWEuCmC2nEN39oJF4B8A= github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 h1:hH4PQfOndHDlpzYfLAAfl63E8Le6F2+EL/cdhlkyRJY= github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= @@ -75,16 +75,16 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gofiber/fiber/v2 v2.51.0 h1:JNACcZy5e2tGApWB2QrRpenTWn0fq0hkFm6k0C86gKQ= -github.com/gofiber/fiber/v2 v2.51.0/go.mod h1:xaQRZQJGqnKOQnbQw+ltvku3/h8QxvNi8o6JiJ7Ll0U= +github.com/gofiber/fiber/v2 v2.52.0 h1:S+qXi7y+/Pgvqq4DrSmREGiFwtB7Bu6+QFLuIHYw/UE= +github.com/gofiber/fiber/v2 v2.52.0/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang-module/carbon/v2 v2.3.0 h1:Nn2H1Hc1iR5LHP9AywC5nIE9Smb3hEaLN0wgHY947Kc= -github.com/golang-module/carbon/v2 v2.3.0/go.mod h1:XDALX7KgqmHk95xyLeaqX9/LJGbfLATyruTziq68SZ8= +github.com/golang-module/carbon/v2 v2.3.5 h1:c7uWPX2nAG4NR27iFmen2blNoyrH/yTsiyRQZKkM8iY= +github.com/golang-module/carbon/v2 v2.3.5/go.mod h1:XDALX7KgqmHk95xyLeaqX9/LJGbfLATyruTziq68SZ8= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= @@ -117,8 +117,8 @@ github.com/gotd/ige v0.2.2 h1:XQ9dJZwBfDnOGSTxKXBGP4gMud3Qku2ekScRjDWWfEk= github.com/gotd/ige v0.2.2/go.mod h1:tuCRb+Y5Y3eNTo3ypIfNpQ4MFjrnONiL2jN2AKZXmb0= github.com/gotd/neo v0.1.5 h1:oj0iQfMbGClP8xI59x7fE/uHoTJD7NZH9oV1WNuPukQ= github.com/gotd/neo v0.1.5/go.mod h1:9A2a4bn9zL6FADufBdt7tZt+WMhvZoc5gWXihOPoiBQ= -github.com/gotd/td v0.92.0 h1:yGkIWFnIjfiPHPKEdCwFAiBCkLvjaLj+AjqamX4PEEY= -github.com/gotd/td v0.92.0/go.mod h1:NB76GPqUujl9KxjoSL8YP4bN67IIHLrNmfN6rvRKsSE= +github.com/gotd/td v0.93.0 h1:IxuO8sv/K24mkQDvszXG2tY6XIV6hxG2S3eWMcNwU8A= +github.com/gotd/td v0.93.0/go.mod h1:NB76GPqUujl9KxjoSL8YP4bN67IIHLrNmfN6rvRKsSE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= @@ -161,16 +161,17 @@ github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01C github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.1 h1:LyDar7M2K0tShCWqzJ/ctzF1QC3Wzc9c8a6cHE0PFdc= +github.com/jackc/pgtype v1.14.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= -github.com/jackc/pgx/v5 v5.5.1 h1:5I9etrGkLrN+2XPCsi6XLlV5DITbSL/xBZdmAxFcXPI= -github.com/jackc/pgx/v5 v5.5.1/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= +github.com/jackc/pgx/v5 v5.5.2 h1:iLlpgp4Cp/gC9Xuscl7lFL1PhhW+ZLtXZcrfCt4C3tA= +github.com/jackc/pgx/v5 v5.5.2/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -250,10 +251,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E= -github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8= -github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY= -github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= +github.com/nats-io/nats.go v1.32.0 h1:Bx9BZS+aXYlxW08k8Gd3yR2s73pV5XSoAQUyp1Kwvp0= +github.com/nats-io/nats.go v1.32.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= +github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -262,8 +263,8 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.19 h1:tYLzDnjDXh9qIxSTKHwXwOYmm9d887Y7Y1ZkyXYHAN4= -github.com/pierrec/lz4/v4 v4.1.19/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= @@ -281,8 +282,8 @@ github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/sashabaranov/go-openai v1.17.9 h1:QEoBiGKWW68W79YIfXWEFZ7l5cEgZBV4/Ow3uy+5hNY= -github.com/sashabaranov/go-openai v1.17.9/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.17.11 h1:XVr00J8JymJVx8Hjbh/5mG0V4PQHRarBU3v7k2x6MR0= +github.com/sashabaranov/go-openai v1.17.11/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= @@ -313,8 +314,9 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 h1:PM5hJF7HVfNWmCjMdEfbuOBNXSVF2cMFGgQTPdKCbwM= github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208/go.mod h1:BzWtXXrXzZUvMacR0oF/fbDDgUPO8L36tDMmRAf14ns= +github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 h1:flbMkdl6HxQkLs6DDhH1UkcnFpNBOu70391STjMS0O4= +github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92/go.mod h1:BzWtXXrXzZUvMacR0oF/fbDDgUPO8L36tDMmRAf14ns= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= @@ -337,14 +339,14 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange v0.0.16 h1:H/zpsfNrgNQAo6G7Z4d4k64ovJ7S06AcglJ2GmTWMgU= gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange v0.0.16/go.mod h1:Jf0XXz40E/xniAd8nVAwSmhewULJWQ2aDKLN+tDIJkg= -gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.37 h1:B9t1GcLalMhhGNg7Ulu4J80Qo7pNC+tqZQqTK+JfMTA= -gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.37/go.mod h1:tG+9dM01x6Vy/GH13JOe3T/e0fjVX/9NLqFhjb20tSU= +gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.43 h1:+W9qIA8tfvpcqAXbqy3hSgRiK3MMeP53UAtGafTGCjA= +gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.43/go.mod h1:1VkvEqj+p1yhZZFw4wlqahZrrUDPCSWSMlpeOWUznvo= go.mau.fi/libsignal v0.1.0 h1:vAKI/nJ5tMhdzke4cTK1fb0idJzz1JuEIpmjprueC+c= go.mau.fi/libsignal v0.1.0/go.mod h1:R8ovrTezxtUNzCQE5PH30StOQWWeBskBsWE55vMfY9I= go.mau.fi/util v0.2.1 h1:eazulhFE/UmjOFtPrGg6zkF5YfAyiDzQb8ihLMbsPWw= go.mau.fi/util v0.2.1/go.mod h1:MjlzCQEMzJ+G8RsPawHzpLB8rwTo3aPIjG5FzBvQT/c= -go.mau.fi/whatsmeow v0.0.0-20231216213200-9d803dd92735 h1:+teJYCOK6M4Kn2TYCj29levhHVwnJTmgCtEXLtgwQtM= -go.mau.fi/whatsmeow v0.0.0-20231216213200-9d803dd92735/go.mod h1:5xTtHNaZpGni6z6aE1iEopjW7wNgsKcolZxZrOujK9M= +go.mau.fi/whatsmeow v0.0.0-20240113094857-194904c8793f h1:exgVmpaob28WZ+j9W+S2xpAV1ycSCZWyAtq1GyVJUgs= +go.mau.fi/whatsmeow v0.0.0-20240113094857-194904c8793f/go.mod h1:5xTtHNaZpGni6z6aE1iEopjW7wNgsKcolZxZrOujK9M= go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= @@ -384,10 +386,10 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -410,17 +412,17 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -446,8 +448,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -456,8 +458,8 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -491,8 +493,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= diff --git a/postgres_stek/postgres_stek_test.go b/postgres_stek/postgres_stek_test.go index 2357e317..7ffc56b8 100644 --- a/postgres_stek/postgres_stek_test.go +++ b/postgres_stek/postgres_stek_test.go @@ -3,6 +3,8 @@ package postgres_stek import ( "errors" "github.com/ManyakRus/starter/constants" + "gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/tables/table_connections" + "gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/connections" "testing" //log "github.com/sirupsen/logrus" @@ -15,17 +17,20 @@ import ( "github.com/ManyakRus/starter/stopapp" ) +// CONNECTION - объект Соединение, настроенный +var CONNECTION = connections.Connection{Table_Connection: table_connections.Table_Connection{ID: constants.CONNECTION_ID, BranchID: constants.BRANCH_ID, IsLegal: true, Server: "10.1.9.153", Port: "5432", DbName: "kol_atom_ul_uni", DbScheme: "stack", Login: "", Password: ""}} + func TestConnect_err(t *testing.T) { //Connect_Panic() //ProgramDir := micro.ProgramDir_Common() config_main.LoadEnv() - err := Connect_err(constants.CONNECTION) + err := Connect_err(CONNECTION) if err != nil { t.Error("TestConnect error: ", err) } - err = CloseConnection_err(constants.CONNECTION) + err = CloseConnection_err(CONNECTION) if err != nil { t.Error("TestConnect() error: ", err) } @@ -35,17 +40,17 @@ func TestIsClosed(t *testing.T) { //ProgramDir := micro.ProgramDir_Common() config_main.LoadEnv() - err := Connect_err(constants.CONNECTION) + err := Connect_err(CONNECTION) if err != nil { t.Error("TestIsClosed Connect() error: ", err) } - isClosed := IsClosed(constants.CONNECTION) + isClosed := IsClosed(CONNECTION) if isClosed == true { t.Error("TestIsClosed() isClosed = true ") } - err = CloseConnection_err(constants.CONNECTION) + err = CloseConnection_err(CONNECTION) if err != nil { t.Error("TestIsClosed() CloseConnection() error: ", err) } @@ -55,15 +60,15 @@ func TestIsClosed(t *testing.T) { func TestReconnect(t *testing.T) { //ProgramDir := micro.ProgramDir_Common() config_main.LoadEnv() - err := Connect_err(constants.CONNECTION) + err := Connect_err(CONNECTION) if err != nil { t.Error("TestIsClosed Connect() error: ", err) } //ctx := context.Background() - Reconnect(constants.CONNECTION, errors.New("")) + Reconnect(CONNECTION, errors.New("")) - err = CloseConnection_err(constants.CONNECTION) + err = CloseConnection_err(CONNECTION) if err != nil { t.Error("TestReconnect() CloseConnection() error: ", err) } @@ -85,8 +90,8 @@ func TestWaitStop(t *testing.T) { func TestStartDB(t *testing.T) { //ProgramDir := micro.ProgramDir_Common() config_main.LoadEnv() - StartDB(constants.CONNECTION) - err := CloseConnection_err(constants.CONNECTION) + StartDB(CONNECTION) + err := CloseConnection_err(CONNECTION) if err != nil { t.Error("db_test.TestStartDB() CloseConnection() error: ", err) } @@ -95,15 +100,15 @@ func TestStartDB(t *testing.T) { func TestConnect(t *testing.T) { //ProgramDir := micro.ProgramDir_Common() config_main.LoadEnv() - Connect(constants.CONNECTION) + Connect(CONNECTION) - CloseConnection(constants.CONNECTION) + CloseConnection(CONNECTION) } func TestGetConnection(t *testing.T) { //ProgramDir := micro.ProgramDir_Common() config_main.LoadEnv() - GetConnection(constants.CONNECTION) + GetConnection(CONNECTION) - CloseConnection(constants.CONNECTION) + CloseConnection(CONNECTION) } diff --git a/vendor/github.com/andybalholm/brotli/README.md b/vendor/github.com/andybalholm/brotli/README.md index 1ea7fdb7..00625211 100644 --- a/vendor/github.com/andybalholm/brotli/README.md +++ b/vendor/github.com/andybalholm/brotli/README.md @@ -2,6 +2,13 @@ This package is a brotli compressor and decompressor implemented in Go. It was translated from the reference implementation (https://github.com/google/brotli) with the `c2go` tool at https://github.com/andybalholm/c2go. +I have been working on new compression algorithms (not translated from C) +in the matchfinder package. +You can use them with the NewWriterV2 function. +Currently they give better results than the old implementation +(at least for compressing my test file, Newton’s *Opticks*) +on levels 2 to 6. + I am using it in production with https://github.com/andybalholm/redwood. API documentation is found at https://pkg.go.dev/github.com/andybalholm/brotli?tab=doc. diff --git a/vendor/github.com/andybalholm/brotli/bitwriter.go b/vendor/github.com/andybalholm/brotli/bitwriter.go new file mode 100644 index 00000000..dfc60360 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/bitwriter.go @@ -0,0 +1,56 @@ +package brotli + +/* Copyright 2010 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +/* Write bits into a byte array. */ + +type bitWriter struct { + dst []byte + + // Data waiting to be written is the low nbits of bits. + bits uint64 + nbits uint +} + +func (w *bitWriter) writeBits(nb uint, b uint64) { + w.bits |= b << w.nbits + w.nbits += nb + if w.nbits >= 32 { + bits := w.bits + w.bits >>= 32 + w.nbits -= 32 + w.dst = append(w.dst, + byte(bits), + byte(bits>>8), + byte(bits>>16), + byte(bits>>24), + ) + } +} + +func (w *bitWriter) writeSingleBit(bit bool) { + if bit { + w.writeBits(1, 1) + } else { + w.writeBits(1, 0) + } +} + +func (w *bitWriter) jumpToByteBoundary() { + dst := w.dst + for w.nbits != 0 { + dst = append(dst, byte(w.bits)) + w.bits >>= 8 + if w.nbits > 8 { // Avoid underflow + w.nbits -= 8 + } else { + w.nbits = 0 + } + } + w.bits = 0 + w.dst = dst +} diff --git a/vendor/github.com/andybalholm/brotli/brotli_bit_stream.go b/vendor/github.com/andybalholm/brotli/brotli_bit_stream.go index 7acfb180..ee655298 100644 --- a/vendor/github.com/andybalholm/brotli/brotli_bit_stream.go +++ b/vendor/github.com/andybalholm/brotli/brotli_bit_stream.go @@ -7,12 +7,18 @@ import ( const maxHuffmanTreeSize = (2*numCommandSymbols + 1) -/* The maximum size of Huffman dictionary for distances assuming that - NPOSTFIX = 0 and NDIRECT = 0. */ +/* +The maximum size of Huffman dictionary for distances assuming that + + NPOSTFIX = 0 and NDIRECT = 0. +*/ const maxSimpleDistanceAlphabetSize = 140 -/* Represents the range of values belonging to a prefix code: - [offset, offset + 2^nbits) */ +/* +Represents the range of values belonging to a prefix code: + + [offset, offset + 2^nbits) +*/ type prefixCodeRange struct { offset uint32 nbits uint32 @@ -96,9 +102,12 @@ func nextBlockTypeCode(calculator *blockTypeCodeCalculator, type_ byte) uint { return type_code } -/* |nibblesbits| represents the 2 bits to encode MNIBBLES (0-3) - REQUIRES: length > 0 - REQUIRES: length <= (1 << 24) */ +/* +|nibblesbits| represents the 2 bits to encode MNIBBLES (0-3) + + REQUIRES: length > 0 + REQUIRES: length <= (1 << 24) +*/ func encodeMlen(length uint, bits *uint64, numbits *uint, nibblesbits *uint64) { var lg uint if length == 1 { @@ -132,8 +141,11 @@ func storeCommandExtra(cmd *command, storage_ix *uint, storage []byte) { writeBits(uint(insnumextra+getCopyExtra(copycode)), bits, storage_ix, storage) } -/* Data structure that stores almost everything that is needed to encode each - block switch command. */ +/* +Data structure that stores almost everything that is needed to encode each + + block switch command. +*/ type blockSplitCode struct { type_code_calculator blockTypeCodeCalculator type_depths [maxBlockTypeSymbols]byte @@ -154,9 +166,12 @@ func storeVarLenUint8(n uint, storage_ix *uint, storage []byte) { } } -/* Stores the compressed meta-block header. - REQUIRES: length > 0 - REQUIRES: length <= (1 << 24) */ +/* +Stores the compressed meta-block header. + + REQUIRES: length > 0 + REQUIRES: length <= (1 << 24) +*/ func storeCompressedMetaBlockHeader(is_final_block bool, length uint, storage_ix *uint, storage []byte) { var lenbits uint64 var nlenbits uint @@ -186,9 +201,12 @@ func storeCompressedMetaBlockHeader(is_final_block bool, length uint, storage_ix } } -/* Stores the uncompressed meta-block header. - REQUIRES: length > 0 - REQUIRES: length <= (1 << 24) */ +/* +Stores the uncompressed meta-block header. + + REQUIRES: length > 0 + REQUIRES: length <= (1 << 24) +*/ func storeUncompressedMetaBlockHeader(length uint, storage_ix *uint, storage []byte) { var lenbits uint64 var nlenbits uint @@ -312,8 +330,11 @@ func storeSimpleHuffmanTree(depths []byte, symbols []uint, num_symbols uint, max } } -/* num = alphabet size - depths = symbol depths */ +/* +num = alphabet size + + depths = symbol depths +*/ func storeHuffmanTree(depths []byte, num uint, tree []huffmanTree, storage_ix *uint, storage []byte) { var huffman_tree [numCommandSymbols]byte var huffman_tree_extra_bits [numCommandSymbols]byte @@ -367,8 +388,11 @@ func storeHuffmanTree(depths []byte, num uint, tree []huffmanTree, storage_ix *u storeHuffmanTreeToBitMask(huffman_tree_size, huffman_tree[:], huffman_tree_extra_bits[:], code_length_bitdepth[:], code_length_bitdepth_symbols[:], storage_ix, storage) } -/* Builds a Huffman tree from histogram[0:length] into depth[0:length] and - bits[0:length] and stores the encoded tree to the bit stream. */ +/* +Builds a Huffman tree from histogram[0:length] into depth[0:length] and + + bits[0:length] and stores the encoded tree to the bit stream. +*/ func buildAndStoreHuffmanTree(histogram []uint32, histogram_length uint, alphabet_size uint, tree []huffmanTree, depth []byte, bits []uint16, storage_ix *uint, storage []byte) { var count uint = 0 var s4 = [4]uint{0} @@ -623,6 +647,203 @@ func buildAndStoreHuffmanTreeFast(histogram []uint32, histogram_total uint, max_ } } +func buildAndStoreHuffmanTreeFastBW(histogram []uint32, histogram_total uint, max_bits uint, depth []byte, bits []uint16, bw *bitWriter) { + var count uint = 0 + var symbols = [4]uint{0} + var length uint = 0 + var total uint = histogram_total + for total != 0 { + if histogram[length] != 0 { + if count < 4 { + symbols[count] = length + } + + count++ + total -= uint(histogram[length]) + } + + length++ + } + + if count <= 1 { + bw.writeBits(4, 1) + bw.writeBits(max_bits, uint64(symbols[0])) + depth[symbols[0]] = 0 + bits[symbols[0]] = 0 + return + } + + for i := 0; i < int(length); i++ { + depth[i] = 0 + } + { + var max_tree_size uint = 2*length + 1 + tree, _ := huffmanTreePool.Get().(*[]huffmanTree) + if tree == nil || cap(*tree) < int(max_tree_size) { + tmp := make([]huffmanTree, max_tree_size) + tree = &tmp + } else { + *tree = (*tree)[:max_tree_size] + } + var count_limit uint32 + for count_limit = 1; ; count_limit *= 2 { + var node int = 0 + var l uint + for l = length; l != 0; { + l-- + if histogram[l] != 0 { + if histogram[l] >= count_limit { + initHuffmanTree(&(*tree)[node:][0], histogram[l], -1, int16(l)) + } else { + initHuffmanTree(&(*tree)[node:][0], count_limit, -1, int16(l)) + } + + node++ + } + } + { + var n int = node + /* Points to the next leaf node. */ /* Points to the next non-leaf node. */ + var sentinel huffmanTree + var i int = 0 + var j int = n + 1 + var k int + + sortHuffmanTreeItems(*tree, uint(n), huffmanTreeComparator(sortHuffmanTree1)) + + /* The nodes are: + [0, n): the sorted leaf nodes that we start with. + [n]: we add a sentinel here. + [n + 1, 2n): new parent nodes are added here, starting from + (n+1). These are naturally in ascending order. + [2n]: we add a sentinel at the end as well. + There will be (2n+1) elements at the end. */ + initHuffmanTree(&sentinel, math.MaxUint32, -1, -1) + + (*tree)[node] = sentinel + node++ + (*tree)[node] = sentinel + node++ + + for k = n - 1; k > 0; k-- { + var left int + var right int + if (*tree)[i].total_count_ <= (*tree)[j].total_count_ { + left = i + i++ + } else { + left = j + j++ + } + + if (*tree)[i].total_count_ <= (*tree)[j].total_count_ { + right = i + i++ + } else { + right = j + j++ + } + + /* The sentinel node becomes the parent node. */ + (*tree)[node-1].total_count_ = (*tree)[left].total_count_ + (*tree)[right].total_count_ + + (*tree)[node-1].index_left_ = int16(left) + (*tree)[node-1].index_right_or_value_ = int16(right) + + /* Add back the last sentinel node. */ + (*tree)[node] = sentinel + node++ + } + + if setDepth(2*n-1, *tree, depth, 14) { + /* We need to pack the Huffman tree in 14 bits. If this was not + successful, add fake entities to the lowest values and retry. */ + break + } + } + } + + huffmanTreePool.Put(tree) + } + + convertBitDepthsToSymbols(depth, length, bits) + if count <= 4 { + var i uint + + /* value of 1 indicates a simple Huffman code */ + bw.writeBits(2, 1) + + bw.writeBits(2, uint64(count)-1) /* NSYM - 1 */ + + /* Sort */ + for i = 0; i < count; i++ { + var j uint + for j = i + 1; j < count; j++ { + if depth[symbols[j]] < depth[symbols[i]] { + var tmp uint = symbols[j] + symbols[j] = symbols[i] + symbols[i] = tmp + } + } + } + + if count == 2 { + bw.writeBits(max_bits, uint64(symbols[0])) + bw.writeBits(max_bits, uint64(symbols[1])) + } else if count == 3 { + bw.writeBits(max_bits, uint64(symbols[0])) + bw.writeBits(max_bits, uint64(symbols[1])) + bw.writeBits(max_bits, uint64(symbols[2])) + } else { + bw.writeBits(max_bits, uint64(symbols[0])) + bw.writeBits(max_bits, uint64(symbols[1])) + bw.writeBits(max_bits, uint64(symbols[2])) + bw.writeBits(max_bits, uint64(symbols[3])) + + /* tree-select */ + bw.writeSingleBit(depth[symbols[0]] == 1) + } + } else { + var previous_value byte = 8 + var i uint + + /* Complex Huffman Tree */ + storeStaticCodeLengthCodeBW(bw) + + /* Actual RLE coding. */ + for i = 0; i < length; { + var value byte = depth[i] + var reps uint = 1 + var k uint + for k = i + 1; k < length && depth[k] == value; k++ { + reps++ + } + + i += reps + if value == 0 { + bw.writeBits(uint(kZeroRepsDepth[reps]), kZeroRepsBits[reps]) + } else { + if previous_value != value { + bw.writeBits(uint(kCodeLengthDepth[value]), uint64(kCodeLengthBits[value])) + reps-- + } + + if reps < 3 { + for reps != 0 { + reps-- + bw.writeBits(uint(kCodeLengthDepth[value]), uint64(kCodeLengthBits[value])) + } + } else { + reps -= 3 + bw.writeBits(uint(kNonZeroRepsDepth[reps]), kNonZeroRepsBits[reps]) + } + + previous_value = value + } + } + } +} + func indexOf(v []byte, v_size uint, value byte) uint { var i uint = 0 for ; i < v_size; i++ { @@ -674,12 +895,15 @@ func moveToFrontTransform(v_in []uint32, v_size uint, v_out []uint32) { } } -/* Finds runs of zeros in v[0..in_size) and replaces them with a prefix code of - the run length plus extra bits (lower 9 bits is the prefix code and the rest - are the extra bits). Non-zero values in v[] are shifted by - *max_length_prefix. Will not create prefix codes bigger than the initial - value of *max_run_length_prefix. The prefix code of run length L is simply - Log2Floor(L) and the number of extra bits is the same as the prefix code. */ +/* +Finds runs of zeros in v[0..in_size) and replaces them with a prefix code of + + the run length plus extra bits (lower 9 bits is the prefix code and the rest + are the extra bits). Non-zero values in v[] are shifted by + *max_length_prefix. Will not create prefix codes bigger than the initial + value of *max_run_length_prefix. The prefix code of run length L is simply + Log2Floor(L) and the number of extra bits is the same as the prefix code. +*/ func runLengthCodeZeros(in_size uint, v []uint32, out_size *uint, max_run_length_prefix *uint32) { var max_reps uint32 = 0 var i uint @@ -799,8 +1023,11 @@ func storeBlockSwitch(code *blockSplitCode, block_len uint32, block_type byte, i writeBits(uint(len_nextra), uint64(len_extra), storage_ix, storage) } -/* Builds a BlockSplitCode data structure from the block split given by the - vector of block types and block lengths and stores it to the bit stream. */ +/* +Builds a BlockSplitCode data structure from the block split given by the + + vector of block types and block lengths and stores it to the bit stream. +*/ func buildAndStoreBlockSplitCode(types []byte, lengths []uint32, num_blocks uint, num_types uint, tree []huffmanTree, code *blockSplitCode, storage_ix *uint, storage []byte) { var type_histo [maxBlockTypeSymbols]uint32 var length_histo [numBlockLenSymbols]uint32 @@ -919,14 +1146,20 @@ func cleanupBlockEncoder(self *blockEncoder) { blockEncoderPool.Put(self) } -/* Creates entropy codes of block lengths and block types and stores them - to the bit stream. */ +/* +Creates entropy codes of block lengths and block types and stores them + + to the bit stream. +*/ func buildAndStoreBlockSwitchEntropyCodes(self *blockEncoder, tree []huffmanTree, storage_ix *uint, storage []byte) { buildAndStoreBlockSplitCode(self.block_types_, self.block_lengths_, self.num_blocks_, self.num_block_types_, tree, &self.block_split_code_, storage_ix, storage) } -/* Stores the next symbol with the entropy code of the current block type. - Updates the block type and block length at block boundaries. */ +/* +Stores the next symbol with the entropy code of the current block type. + + Updates the block type and block length at block boundaries. +*/ func storeSymbol(self *blockEncoder, symbol uint, storage_ix *uint, storage []byte) { if self.block_len_ == 0 { self.block_ix_++ @@ -945,9 +1178,12 @@ func storeSymbol(self *blockEncoder, symbol uint, storage_ix *uint, storage []by } } -/* Stores the next symbol with the entropy code of the current block type and - context value. - Updates the block type and block length at block boundaries. */ +/* +Stores the next symbol with the entropy code of the current block type and + + context value. + Updates the block type and block length at block boundaries. +*/ func storeSymbolWithContext(self *blockEncoder, symbol uint, context uint, context_map []uint32, storage_ix *uint, storage []byte, context_bits uint) { if self.block_len_ == 0 { self.block_ix_++ @@ -1268,8 +1504,11 @@ func storeMetaBlockFast(input []byte, start_pos uint, length uint, mask uint, is } } -/* This is for storing uncompressed blocks (simple raw storage of - bytes-as-bytes). */ +/* +This is for storing uncompressed blocks (simple raw storage of + + bytes-as-bytes). +*/ func storeUncompressedMetaBlock(is_final_block bool, input []byte, position uint, mask uint, len uint, storage_ix *uint, storage []byte) { var masked_pos uint = position & mask storeUncompressedMetaBlockHeader(uint(len), storage_ix, storage) diff --git a/vendor/github.com/andybalholm/brotli/compress_fragment_two_pass.go b/vendor/github.com/andybalholm/brotli/compress_fragment_two_pass.go index 172dc7f4..79f9c7fd 100644 --- a/vendor/github.com/andybalholm/brotli/compress_fragment_two_pass.go +++ b/vendor/github.com/andybalholm/brotli/compress_fragment_two_pass.go @@ -39,8 +39,11 @@ func isMatch1(p1 []byte, p2 []byte, length uint) bool { return p1[4] == p2[4] && p1[5] == p2[5] } -/* Builds a command and distance prefix code (each 64 symbols) into "depth" and - "bits" based on "histogram" and stores it into the bit stream. */ +/* +Builds a command and distance prefix code (each 64 symbols) into "depth" and + + "bits" based on "histogram" and stores it into the bit stream. +*/ func buildAndStoreCommandPrefixCode(histogram []uint32, depth []byte, bits []uint16, storage_ix *uint, storage []byte) { var tree [129]huffmanTree var cmd_depth = [numCommandSymbols]byte{0} @@ -216,6 +219,25 @@ func storeMetaBlockHeader(len uint, is_uncompressed bool, storage_ix *uint, stor writeSingleBit(is_uncompressed, storage_ix, storage) } +func storeMetaBlockHeaderBW(len uint, is_uncompressed bool, bw *bitWriter) { + var nibbles uint = 6 + + /* ISLAST */ + bw.writeBits(1, 0) + + if len <= 1<<16 { + nibbles = 4 + } else if len <= 1<<20 { + nibbles = 5 + } + + bw.writeBits(2, uint64(nibbles)-4) + bw.writeBits(nibbles*4, uint64(len)-1) + + /* ISUNCOMPRESSED */ + bw.writeSingleBit(is_uncompressed) +} + func createCommands(input []byte, block_size uint, input_size uint, base_ip_ptr []byte, table []int, table_bits uint, min_match uint, literals *[]byte, commands *[]uint32) { var ip int = 0 var shift uint = 64 - table_bits @@ -710,19 +732,22 @@ func compressFragmentTwoPassImpl(input []byte, input_size uint, is_last bool, co } } -/* Compresses "input" string to the "*storage" buffer as one or more complete - meta-blocks, and updates the "*storage_ix" bit position. +/* +Compresses "input" string to the "*storage" buffer as one or more complete - If "is_last" is 1, emits an additional empty last meta-block. + meta-blocks, and updates the "*storage_ix" bit position. - REQUIRES: "input_size" is greater than zero, or "is_last" is 1. - REQUIRES: "input_size" is less or equal to maximal metablock size (1 << 24). - REQUIRES: "command_buf" and "literal_buf" point to at least - kCompressFragmentTwoPassBlockSize long arrays. - REQUIRES: All elements in "table[0..table_size-1]" are initialized to zero. - REQUIRES: "table_size" is a power of two - OUTPUT: maximal copy distance <= |input_size| - OUTPUT: maximal copy distance <= BROTLI_MAX_BACKWARD_LIMIT(18) */ + If "is_last" is 1, emits an additional empty last meta-block. + + REQUIRES: "input_size" is greater than zero, or "is_last" is 1. + REQUIRES: "input_size" is less or equal to maximal metablock size (1 << 24). + REQUIRES: "command_buf" and "literal_buf" point to at least + kCompressFragmentTwoPassBlockSize long arrays. + REQUIRES: All elements in "table[0..table_size-1]" are initialized to zero. + REQUIRES: "table_size" is a power of two + OUTPUT: maximal copy distance <= |input_size| + OUTPUT: maximal copy distance <= BROTLI_MAX_BACKWARD_LIMIT(18) +*/ func compressFragmentTwoPass(input []byte, input_size uint, is_last bool, command_buf []uint32, literal_buf []byte, table []int, table_size uint, storage_ix *uint, storage []byte) { var initial_storage_ix uint = *storage_ix var table_bits uint = uint(log2FloorNonZero(table_size)) diff --git a/vendor/github.com/andybalholm/brotli/encoder.go b/vendor/github.com/andybalholm/brotli/encoder.go new file mode 100644 index 00000000..650d1e42 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/encoder.go @@ -0,0 +1,168 @@ +package brotli + +import "github.com/andybalholm/brotli/matchfinder" + +// An Encoder implements the matchfinder.Encoder interface, writing in Brotli format. +type Encoder struct { + wroteHeader bool + bw bitWriter + distCache []distanceCode +} + +func (e *Encoder) Reset() { + e.wroteHeader = false + e.bw = bitWriter{} +} + +func (e *Encoder) Encode(dst []byte, src []byte, matches []matchfinder.Match, lastBlock bool) []byte { + e.bw.dst = dst + if !e.wroteHeader { + e.bw.writeBits(4, 15) + e.wroteHeader = true + } + + var literalHisto [256]uint32 + var commandHisto [704]uint32 + var distanceHisto [64]uint32 + literalCount := 0 + commandCount := 0 + distanceCount := 0 + + if len(e.distCache) < len(matches) { + e.distCache = make([]distanceCode, len(matches)) + } + + // first pass: build the histograms + pos := 0 + + // d is the ring buffer of the last 4 distances. + d := [4]int{-10, -10, -10, -10} + for i, m := range matches { + if m.Unmatched > 0 { + for _, c := range src[pos : pos+m.Unmatched] { + literalHisto[c]++ + } + literalCount += m.Unmatched + } + + insertCode := getInsertLengthCode(uint(m.Unmatched)) + copyCode := getCopyLengthCode(uint(m.Length)) + if m.Length == 0 { + // If the stream ends with unmatched bytes, we need a dummy copy length. + copyCode = 2 + } + command := combineLengthCodes(insertCode, copyCode, false) + commandHisto[command]++ + commandCount++ + + if command >= 128 && m.Length != 0 { + var distCode distanceCode + switch m.Distance { + case d[3]: + distCode.code = 0 + case d[2]: + distCode.code = 1 + case d[1]: + distCode.code = 2 + case d[0]: + distCode.code = 3 + case d[3] - 1: + distCode.code = 4 + case d[3] + 1: + distCode.code = 5 + case d[3] - 2: + distCode.code = 6 + case d[3] + 2: + distCode.code = 7 + case d[3] - 3: + distCode.code = 8 + case d[3] + 3: + distCode.code = 9 + + // In my testing, codes 10–15 actually reduced the compression ratio. + + default: + distCode = getDistanceCode(m.Distance) + } + e.distCache[i] = distCode + distanceHisto[distCode.code]++ + distanceCount++ + if distCode.code != 0 { + d[0], d[1], d[2], d[3] = d[1], d[2], d[3], m.Distance + } + } + + pos += m.Unmatched + m.Length + } + + storeMetaBlockHeaderBW(uint(len(src)), false, &e.bw) + e.bw.writeBits(13, 0) + + var literalDepths [256]byte + var literalBits [256]uint16 + buildAndStoreHuffmanTreeFastBW(literalHisto[:], uint(literalCount), 8, literalDepths[:], literalBits[:], &e.bw) + + var commandDepths [704]byte + var commandBits [704]uint16 + buildAndStoreHuffmanTreeFastBW(commandHisto[:], uint(commandCount), 10, commandDepths[:], commandBits[:], &e.bw) + + var distanceDepths [64]byte + var distanceBits [64]uint16 + buildAndStoreHuffmanTreeFastBW(distanceHisto[:], uint(distanceCount), 6, distanceDepths[:], distanceBits[:], &e.bw) + + pos = 0 + for i, m := range matches { + insertCode := getInsertLengthCode(uint(m.Unmatched)) + copyCode := getCopyLengthCode(uint(m.Length)) + if m.Length == 0 { + // If the stream ends with unmatched bytes, we need a dummy copy length. + copyCode = 2 + } + command := combineLengthCodes(insertCode, copyCode, false) + e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command])) + if kInsExtra[insertCode] > 0 { + e.bw.writeBits(uint(kInsExtra[insertCode]), uint64(m.Unmatched)-uint64(kInsBase[insertCode])) + } + if kCopyExtra[copyCode] > 0 { + e.bw.writeBits(uint(kCopyExtra[copyCode]), uint64(m.Length)-uint64(kCopyBase[copyCode])) + } + + if m.Unmatched > 0 { + for _, c := range src[pos : pos+m.Unmatched] { + e.bw.writeBits(uint(literalDepths[c]), uint64(literalBits[c])) + } + } + + if command >= 128 && m.Length != 0 { + distCode := e.distCache[i] + e.bw.writeBits(uint(distanceDepths[distCode.code]), uint64(distanceBits[distCode.code])) + if distCode.nExtra > 0 { + e.bw.writeBits(distCode.nExtra, distCode.extraBits) + } + } + + pos += m.Unmatched + m.Length + } + + if lastBlock { + e.bw.writeBits(2, 3) // islast + isempty + e.bw.jumpToByteBoundary() + } + return e.bw.dst +} + +type distanceCode struct { + code int + nExtra uint + extraBits uint64 +} + +func getDistanceCode(distance int) distanceCode { + d := distance + 3 + nbits := log2FloorNonZero(uint(d)) - 1 + prefix := (d >> nbits) & 1 + offset := (2 + prefix) << nbits + distcode := int(2*(nbits-1)) + prefix + 16 + extra := d - offset + return distanceCode{distcode, uint(nbits), uint64(extra)} +} diff --git a/vendor/github.com/andybalholm/brotli/entropy_encode_static.go b/vendor/github.com/andybalholm/brotli/entropy_encode_static.go index 5ddf3fcb..294aff4f 100644 --- a/vendor/github.com/andybalholm/brotli/entropy_encode_static.go +++ b/vendor/github.com/andybalholm/brotli/entropy_encode_static.go @@ -782,6 +782,11 @@ func storeStaticCodeLengthCode(storage_ix *uint, storage []byte) { writeBits(40, 0x0000FF55555554, storage_ix, storage) } +func storeStaticCodeLengthCodeBW(bw *bitWriter) { + bw.writeBits(32, 0x55555554) + bw.writeBits(8, 0xFF) +} + var kZeroRepsBits = [numCommandSymbols]uint64{ 0x00000000, 0x00000000, diff --git a/vendor/github.com/andybalholm/brotli/http.go b/vendor/github.com/andybalholm/brotli/http.go index b5b89047..3d3a8a06 100644 --- a/vendor/github.com/andybalholm/brotli/http.go +++ b/vendor/github.com/andybalholm/brotli/http.go @@ -20,7 +20,7 @@ func HTTPCompressor(w http.ResponseWriter, r *http.Request) io.WriteCloser { switch encoding { case "br": w.Header().Set("Content-Encoding", "br") - return NewWriter(w) + return NewWriterV2(w, DefaultCompression) case "gzip": w.Header().Set("Content-Encoding", "gzip") return gzip.NewWriter(w) diff --git a/vendor/github.com/andybalholm/brotli/matchfinder/emitter.go b/vendor/github.com/andybalholm/brotli/matchfinder/emitter.go new file mode 100644 index 00000000..37ed8e13 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/matchfinder/emitter.go @@ -0,0 +1,45 @@ +package matchfinder + +// An absoluteMatch is like a Match, but it stores indexes into the byte +// stream instead of lengths. +type absoluteMatch struct { + // Start is the index of the first byte. + Start int + + // End is the index of the byte after the last byte + // (so that End - Start = Length). + End int + + // Match is the index of the previous data that matches + // (Start - Match = Distance). + Match int +} + +// A matchEmitter manages the output of matches for a MatchFinder. +type matchEmitter struct { + // Dst is the destination slice that Matches are added to. + Dst []Match + + // NextEmit is the index of the next byte to emit. + NextEmit int +} + +func (e *matchEmitter) emit(m absoluteMatch) { + e.Dst = append(e.Dst, Match{ + Unmatched: m.Start - e.NextEmit, + Length: m.End - m.Start, + Distance: m.Start - m.Match, + }) + e.NextEmit = m.End +} + +// trim shortens m if it extends past maxEnd. Then if the length is at least +// minLength, the match is emitted. +func (e *matchEmitter) trim(m absoluteMatch, maxEnd int, minLength int) { + if m.End > maxEnd { + m.End = maxEnd + } + if m.End-m.Start >= minLength { + e.emit(m) + } +} diff --git a/vendor/github.com/andybalholm/brotli/matchfinder/m0.go b/vendor/github.com/andybalholm/brotli/matchfinder/m0.go new file mode 100644 index 00000000..773b7c49 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/matchfinder/m0.go @@ -0,0 +1,169 @@ +package matchfinder + +import ( + "encoding/binary" +) + +// M0 is an implementation of the MatchFinder interface based +// on the algorithm used by snappy, but modified to be more like the algorithm +// used by compression level 0 of the brotli reference implementation. +// +// It has a maximum block size of 65536 bytes. +type M0 struct { + // Lazy turns on "lazy matching," for higher compression but less speed. + Lazy bool + + MaxDistance int + MaxLength int +} + +func (M0) Reset() {} + +const ( + m0HashLen = 5 + + m0TableBits = 14 + m0TableSize = 1 << m0TableBits + m0Shift = 32 - m0TableBits + // m0TableMask is redundant, but helps the compiler eliminate bounds + // checks. + m0TableMask = m0TableSize - 1 +) + +func (m M0) hash(data uint64) uint64 { + hash := (data << (64 - 8*m0HashLen)) * hashMul64 + return hash >> (64 - m0TableBits) +} + +// FindMatches looks for matches in src, appends them to dst, and returns dst. +// src must not be longer than 65536 bytes. +func (m M0) FindMatches(dst []Match, src []byte) []Match { + const inputMargin = 16 - 1 + const minNonLiteralBlockSize = 1 + 1 + inputMargin + + if len(src) < minNonLiteralBlockSize { + dst = append(dst, Match{ + Unmatched: len(src), + }) + return dst + } + if len(src) > 65536 { + panic("block too long") + } + + var table [m0TableSize]uint16 + + // sLimit is when to stop looking for offset/length copies. The inputMargin + // lets us use a fast path for emitLiteral in the main loop, while we are + // looking for copies. + sLimit := len(src) - inputMargin + + // nextEmit is where in src the next emitLiteral should start from. + nextEmit := 0 + + // The encoded form must start with a literal, as there are no previous + // bytes to copy, so we start looking for hash matches at s == 1. + s := 1 + nextHash := m.hash(binary.LittleEndian.Uint64(src[s:])) + + for { + // Copied from the C++ snappy implementation: + // + // Heuristic match skipping: If 32 bytes are scanned with no matches + // found, start looking only at every other byte. If 32 more bytes are + // scanned (or skipped), look at every third byte, etc.. When a match + // is found, immediately go back to looking at every byte. This is a + // small loss (~5% performance, ~0.1% density) for compressible data + // due to more bookkeeping, but for non-compressible data (such as + // JPEG) it's a huge win since the compressor quickly "realizes" the + // data is incompressible and doesn't bother looking for matches + // everywhere. + // + // The "skip" variable keeps track of how many bytes there are since + // the last match; dividing it by 32 (ie. right-shifting by five) gives + // the number of bytes to move ahead for each iteration. + skip := 32 + + nextS := s + candidate := 0 + for { + s = nextS + bytesBetweenHashLookups := skip >> 5 + nextS = s + bytesBetweenHashLookups + skip += bytesBetweenHashLookups + if nextS > sLimit { + goto emitRemainder + } + candidate = int(table[nextHash&m0TableMask]) + table[nextHash&m0TableMask] = uint16(s) + nextHash = m.hash(binary.LittleEndian.Uint64(src[nextS:])) + if m.MaxDistance != 0 && s-candidate > m.MaxDistance { + continue + } + if binary.LittleEndian.Uint32(src[s:]) == binary.LittleEndian.Uint32(src[candidate:]) { + break + } + } + + // Invariant: we have a 4-byte match at s. + base := s + s = extendMatch(src, candidate+4, s+4) + + origBase := base + if m.Lazy && base+1 < sLimit { + newBase := base + 1 + h := m.hash(binary.LittleEndian.Uint64(src[newBase:])) + newCandidate := int(table[h&m0TableMask]) + table[h&m0TableMask] = uint16(newBase) + okDistance := true + if m.MaxDistance != 0 && newBase-newCandidate > m.MaxDistance { + okDistance = false + } + if okDistance && binary.LittleEndian.Uint32(src[newBase:]) == binary.LittleEndian.Uint32(src[newCandidate:]) { + newS := extendMatch(src, newCandidate+4, newBase+4) + if newS-newBase > s-base+1 { + s = newS + base = newBase + candidate = newCandidate + } + } + } + + if m.MaxLength != 0 && s-base > m.MaxLength { + s = base + m.MaxLength + } + dst = append(dst, Match{ + Unmatched: base - nextEmit, + Length: s - base, + Distance: base - candidate, + }) + nextEmit = s + if s >= sLimit { + goto emitRemainder + } + + if m.Lazy { + // If lazy matching is enabled, we update the hash table for + // every byte in the match. + for i := origBase + 2; i < s-1; i++ { + x := binary.LittleEndian.Uint64(src[i:]) + table[m.hash(x)&m0TableMask] = uint16(i) + } + } + + // We could immediately start working at s now, but to improve + // compression we first update the hash table at s-1 and at s. + x := binary.LittleEndian.Uint64(src[s-1:]) + prevHash := m.hash(x >> 0) + table[prevHash&m0TableMask] = uint16(s - 1) + nextHash = m.hash(x >> 8) + } + +emitRemainder: + if nextEmit < len(src) { + dst = append(dst, Match{ + Unmatched: len(src) - nextEmit, + }) + } + return dst +} diff --git a/vendor/github.com/andybalholm/brotli/matchfinder/m4.go b/vendor/github.com/andybalholm/brotli/matchfinder/m4.go new file mode 100644 index 00000000..5b2acba2 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/matchfinder/m4.go @@ -0,0 +1,297 @@ +package matchfinder + +import ( + "encoding/binary" + "math/bits" + "runtime" +) + +// M4 is an implementation of the MatchFinder +// interface that uses a hash table to find matches, +// optional match chains, +// and the advanced parsing technique from +// https://fastcompression.blogspot.com/2011/12/advanced-parsing-strategies.html. +type M4 struct { + // MaxDistance is the maximum distance (in bytes) to look back for + // a match. The default is 65535. + MaxDistance int + + // MinLength is the length of the shortest match to return. + // The default is 4. + MinLength int + + // HashLen is the number of bytes to use to calculate the hashes. + // The maximum is 8 and the default is 6. + HashLen int + + // TableBits is the number of bits in the hash table indexes. + // The default is 17 (128K entries). + TableBits int + + // ChainLength is how many entries to search on the "match chain" of older + // locations with the same hash as the current location. + ChainLength int + + // DistanceBitCost is used when comparing two matches to see + // which is better. The comparison is primarily based on the length + // of the matches, but it can also take the distance into account, + // in terms of the number of bits needed to represent the distance. + // One byte of length is given a score of 256, so 32 (256/8) would + // be a reasonable first guess for the value of one bit. + // (The default is 0, which bases the comparison solely on length.) + DistanceBitCost int + + table []uint32 + chain []uint16 + + history []byte +} + +func (q *M4) Reset() { + for i := range q.table { + q.table[i] = 0 + } + q.history = q.history[:0] + q.chain = q.chain[:0] +} + +func (q *M4) score(m absoluteMatch) int { + return (m.End-m.Start)*256 + bits.LeadingZeros32(uint32(m.Start-m.Match))*q.DistanceBitCost +} + +func (q *M4) FindMatches(dst []Match, src []byte) []Match { + if q.MaxDistance == 0 { + q.MaxDistance = 65535 + } + if q.MinLength == 0 { + q.MinLength = 4 + } + if q.HashLen == 0 { + q.HashLen = 6 + } + if q.TableBits == 0 { + q.TableBits = 17 + } + if len(q.table) < 1< q.MaxDistance*2 { + // Trim down the history buffer. + delta := len(q.history) - q.MaxDistance + copy(q.history, q.history[delta:]) + q.history = q.history[:q.MaxDistance] + if q.ChainLength > 0 { + q.chain = q.chain[:q.MaxDistance] + } + + for i, v := range q.table { + newV := int(v) - delta + if newV < 0 { + newV = 0 + } + q.table[i] = uint32(newV) + } + } + + // Append src to the history buffer. + e.NextEmit = len(q.history) + q.history = append(q.history, src...) + if q.ChainLength > 0 { + q.chain = append(q.chain, make([]uint16, len(src))...) + } + src = q.history + + // matches stores the matches that have been found but not emitted, + // in reverse order. (matches[0] is the most recent one.) + var matches [3]absoluteMatch + for i := e.NextEmit; i < len(src)-7; i++ { + if matches[0] != (absoluteMatch{}) && i >= matches[0].End { + // We have found some matches, and we're far enough along that we probably + // won't find overlapping matches, so we might as well emit them. + if matches[1] != (absoluteMatch{}) { + e.trim(matches[1], matches[0].Start, q.MinLength) + } + e.emit(matches[0]) + matches = [3]absoluteMatch{} + } + + // Calculate and store the hash. + h := ((binary.LittleEndian.Uint64(src[i:]) & (1<<(8*q.HashLen) - 1)) * hashMul64) >> (64 - q.TableBits) + candidate := int(q.table[h]) + q.table[h] = uint32(i) + if q.ChainLength > 0 && candidate != 0 { + delta := i - candidate + if delta < 1<<16 { + q.chain[i] = uint16(delta) + } + } + + if i < matches[0].End && i != matches[0].End+2-q.HashLen { + continue + } + if candidate == 0 || i-candidate > q.MaxDistance { + continue + } + + // Look for a match. + var currentMatch absoluteMatch + + if i-candidate != matches[0].Start-matches[0].Match { + if binary.LittleEndian.Uint32(src[candidate:]) == binary.LittleEndian.Uint32(src[i:]) { + m := extendMatch2(src, i, candidate, e.NextEmit) + if m.End-m.Start > q.MinLength { + currentMatch = m + } + } + } + + for j := 0; j < q.ChainLength; j++ { + delta := q.chain[candidate] + if delta == 0 { + break + } + candidate -= int(delta) + if candidate <= 0 || i-candidate > q.MaxDistance { + break + } + if i-candidate != matches[0].Start-matches[0].Match { + if binary.LittleEndian.Uint32(src[candidate:]) == binary.LittleEndian.Uint32(src[i:]) { + m := extendMatch2(src, i, candidate, e.NextEmit) + if m.End-m.Start > q.MinLength && q.score(m) > q.score(currentMatch) { + currentMatch = m + } + } + } + } + + if currentMatch.End-currentMatch.Start < q.MinLength { + continue + } + + overlapPenalty := 0 + if matches[0] != (absoluteMatch{}) { + overlapPenalty = 275 + if currentMatch.Start <= matches[1].End { + // This match would completely replace the previous match, + // so there is no penalty for overlap. + overlapPenalty = 0 + } + } + + if q.score(currentMatch) <= q.score(matches[0])+overlapPenalty { + continue + } + + matches = [3]absoluteMatch{ + currentMatch, + matches[0], + matches[1], + } + + if matches[2] == (absoluteMatch{}) { + continue + } + + // We have three matches, so it's time to emit one and/or eliminate one. + switch { + case matches[0].Start < matches[2].End: + // The first and third matches overlap; discard the one in between. + matches = [3]absoluteMatch{ + matches[0], + matches[2], + absoluteMatch{}, + } + + case matches[0].Start < matches[2].End+q.MinLength: + // The first and third matches don't overlap, but there's no room for + // another match between them. Emit the first match and discard the second. + e.emit(matches[2]) + matches = [3]absoluteMatch{ + matches[0], + absoluteMatch{}, + absoluteMatch{}, + } + + default: + // Emit the first match, shortening it if necessary to avoid overlap with the second. + e.trim(matches[2], matches[1].Start, q.MinLength) + matches[2] = absoluteMatch{} + } + } + + // We've found all the matches now; emit the remaining ones. + if matches[1] != (absoluteMatch{}) { + e.trim(matches[1], matches[0].Start, q.MinLength) + } + if matches[0] != (absoluteMatch{}) { + e.emit(matches[0]) + } + + dst = e.Dst + if e.NextEmit < len(src) { + dst = append(dst, Match{ + Unmatched: len(src) - e.NextEmit, + }) + } + + return dst +} + +const hashMul64 = 0x1E35A7BD1E35A7BD + +// extendMatch returns the largest k such that k <= len(src) and that +// src[i:i+k-j] and src[j:k] have the same contents. +// +// It assumes that: +// +// 0 <= i && i < j && j <= len(src) +func extendMatch(src []byte, i, j int) int { + switch runtime.GOARCH { + case "amd64": + // As long as we are 8 or more bytes before the end of src, we can load and + // compare 8 bytes at a time. If those 8 bytes are equal, repeat. + for j+8 < len(src) { + iBytes := binary.LittleEndian.Uint64(src[i:]) + jBytes := binary.LittleEndian.Uint64(src[j:]) + if iBytes != jBytes { + // If those 8 bytes were not equal, XOR the two 8 byte values, and return + // the index of the first byte that differs. The BSF instruction finds the + // least significant 1 bit, the amd64 architecture is little-endian, and + // the shift by 3 converts a bit index to a byte index. + return j + bits.TrailingZeros64(iBytes^jBytes)>>3 + } + i, j = i+8, j+8 + } + case "386": + // On a 32-bit CPU, we do it 4 bytes at a time. + for j+4 < len(src) { + iBytes := binary.LittleEndian.Uint32(src[i:]) + jBytes := binary.LittleEndian.Uint32(src[j:]) + if iBytes != jBytes { + return j + bits.TrailingZeros32(iBytes^jBytes)>>3 + } + i, j = i+4, j+4 + } + } + for ; j < len(src) && src[i] == src[j]; i, j = i+1, j+1 { + } + return j +} + +// Given a 4-byte match at src[start] and src[candidate], extendMatch2 extends it +// upward as far as possible, and downward no farther than to min. +func extendMatch2(src []byte, start, candidate, min int) absoluteMatch { + end := extendMatch(src, candidate+4, start+4) + for start > min && candidate > 0 && src[start-1] == src[candidate-1] { + start-- + candidate-- + } + return absoluteMatch{ + Start: start, + End: end, + Match: candidate, + } +} diff --git a/vendor/github.com/andybalholm/brotli/matchfinder/matchfinder.go b/vendor/github.com/andybalholm/brotli/matchfinder/matchfinder.go new file mode 100644 index 00000000..f6bcfdb3 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/matchfinder/matchfinder.go @@ -0,0 +1,103 @@ +// The matchfinder package defines reusable components for data compression. +// +// Many compression libraries have two main parts: +// - Something that looks for repeated sequences of bytes +// - An encoder for the compressed data format (often an entropy coder) +// +// Although these are logically two separate steps, the implementations are +// usually closely tied together. You can't use flate's matcher with snappy's +// encoder, for example. This package defines interfaces and an intermediate +// representation to allow mixing and matching compression components. +package matchfinder + +import "io" + +// A Match is the basic unit of LZ77 compression. +type Match struct { + Unmatched int // the number of unmatched bytes since the previous match + Length int // the number of bytes in the matched string; it may be 0 at the end of the input + Distance int // how far back in the stream to copy from +} + +// A MatchFinder performs the LZ77 stage of compression, looking for matches. +type MatchFinder interface { + // FindMatches looks for matches in src, appends them to dst, and returns dst. + FindMatches(dst []Match, src []byte) []Match + + // Reset clears any internal state, preparing the MatchFinder to be used with + // a new stream. + Reset() +} + +// An Encoder encodes the data in its final format. +type Encoder interface { + // Encode appends the encoded format of src to dst, using the match + // information from matches. + Encode(dst []byte, src []byte, matches []Match, lastBlock bool) []byte + + // Reset clears any internal state, preparing the Encoder to be used with + // a new stream. + Reset() +} + +// A Writer uses MatchFinder and Encoder to write compressed data to Dest. +type Writer struct { + Dest io.Writer + MatchFinder MatchFinder + Encoder Encoder + + // BlockSize is the number of bytes to compress at a time. If it is zero, + // each Write operation will be treated as one block. + BlockSize int + + err error + inBuf []byte + outBuf []byte + matches []Match +} + +func (w *Writer) Write(p []byte) (n int, err error) { + if w.err != nil { + return 0, w.err + } + + if w.BlockSize == 0 { + return w.writeBlock(p, false) + } + + w.inBuf = append(w.inBuf, p...) + var pos int + for pos = 0; pos+w.BlockSize <= len(w.inBuf) && w.err == nil; pos += w.BlockSize { + w.writeBlock(w.inBuf[pos:pos+w.BlockSize], false) + } + if pos > 0 { + n := copy(w.inBuf, w.inBuf[pos:]) + w.inBuf = w.inBuf[:n] + } + + return len(p), w.err +} + +func (w *Writer) writeBlock(p []byte, lastBlock bool) (n int, err error) { + w.outBuf = w.outBuf[:0] + w.matches = w.MatchFinder.FindMatches(w.matches[:0], p) + w.outBuf = w.Encoder.Encode(w.outBuf, p, w.matches, lastBlock) + _, w.err = w.Dest.Write(w.outBuf) + return len(p), w.err +} + +func (w *Writer) Close() error { + w.writeBlock(w.inBuf, true) + w.inBuf = w.inBuf[:0] + return w.err +} + +func (w *Writer) Reset(newDest io.Writer) { + w.MatchFinder.Reset() + w.Encoder.Reset() + w.err = nil + w.inBuf = w.inBuf[:0] + w.outBuf = w.outBuf[:0] + w.matches = w.matches[:0] + w.Dest = newDest +} diff --git a/vendor/github.com/andybalholm/brotli/matchfinder/textencoder.go b/vendor/github.com/andybalholm/brotli/matchfinder/textencoder.go new file mode 100644 index 00000000..75ecc590 --- /dev/null +++ b/vendor/github.com/andybalholm/brotli/matchfinder/textencoder.go @@ -0,0 +1,53 @@ +package matchfinder + +import "fmt" + +// A TextEncoder is an Encoder that produces a human-readable representation of +// the LZ77 compression. Matches are replaced with symbols. +type TextEncoder struct{} + +func (t TextEncoder) Reset() {} + +func (t TextEncoder) Encode(dst []byte, src []byte, matches []Match, lastBlock bool) []byte { + pos := 0 + for _, m := range matches { + if m.Unmatched > 0 { + dst = append(dst, src[pos:pos+m.Unmatched]...) + pos += m.Unmatched + } + if m.Length > 0 { + dst = append(dst, []byte(fmt.Sprintf("<%d,%d>", m.Length, m.Distance))...) + pos += m.Length + } + } + if pos < len(src) { + dst = append(dst, src[pos:]...) + } + return dst +} + +// A NoMatchFinder implements MatchFinder, but doesn't find any matches. +// It can be used to implement the equivalent of the standard library flate package's +// HuffmanOnly setting. +type NoMatchFinder struct{} + +func (n NoMatchFinder) Reset() {} + +func (n NoMatchFinder) FindMatches(dst []Match, src []byte) []Match { + return append(dst, Match{ + Unmatched: len(src), + }) +} + +// AutoReset wraps a MatchFinder that can return references to data in previous +// blocks, and calls Reset before each block. It is useful for (e.g.) using a +// snappy Encoder with a MatchFinder designed for flate. (Snappy doesn't +// support references between blocks.) +type AutoReset struct { + MatchFinder +} + +func (a AutoReset) FindMatches(dst []Match, src []byte) []Match { + a.Reset() + return a.MatchFinder.FindMatches(dst, src) +} diff --git a/vendor/github.com/andybalholm/brotli/writer.go b/vendor/github.com/andybalholm/brotli/writer.go index 39feaef5..8a688117 100644 --- a/vendor/github.com/andybalholm/brotli/writer.go +++ b/vendor/github.com/andybalholm/brotli/writer.go @@ -3,6 +3,8 @@ package brotli import ( "errors" "io" + + "github.com/andybalholm/brotli/matchfinder" ) const ( @@ -117,3 +119,44 @@ type nopCloser struct { } func (nopCloser) Close() error { return nil } + +// NewWriterV2 is like NewWriterLevel, but it uses the new implementation +// based on the matchfinder package. It currently supports up to level 7; +// if a higher level is specified, level 7 will be used. +func NewWriterV2(dst io.Writer, level int) *matchfinder.Writer { + var mf matchfinder.MatchFinder + if level < 2 { + mf = matchfinder.M0{Lazy: level == 1} + } else { + hashLen := 6 + if level >= 6 { + hashLen = 5 + } + chainLen := 64 + switch level { + case 2: + chainLen = 0 + case 3: + chainLen = 1 + case 4: + chainLen = 2 + case 5: + chainLen = 4 + case 6: + chainLen = 8 + } + mf = &matchfinder.M4{ + MaxDistance: 1 << 20, + ChainLength: chainLen, + HashLen: hashLen, + DistanceBitCost: 57, + } + } + + return &matchfinder.Writer{ + Dest: dst, + MatchFinder: mf, + Encoder: &Encoder{}, + BlockSize: 1 << 16, + } +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/internal/embedded/data/VERSION b/vendor/github.com/camunda/zeebe/clients/go/v8/internal/embedded/data/VERSION index b105b3a9..a2f28f43 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/internal/embedded/data/VERSION +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/internal/embedded/data/VERSION @@ -1 +1 @@ -8.3.4 +8.4.0 diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/internal/utils/jobStreamActuator.go b/vendor/github.com/camunda/zeebe/clients/go/v8/internal/utils/jobStreamActuator.go new file mode 100644 index 00000000..cf4b7ae7 --- /dev/null +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/internal/utils/jobStreamActuator.go @@ -0,0 +1,73 @@ +// Copyright © 2018 Camunda Services GmbH (info@camunda.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "time" +) + +type RemoteJobStream struct { + JobType string `json:"jobType"` + Metadata RemoteJobStreamMetadata `json:"metadata"` + Consumers []RemoteJobStreamConsumer `json:"consumers"` +} + +type RemoteJobStreamMetadata struct { + Worker string `json:"worker"` + Timeout string `json:"timeout"` + FetchVariables []string `json:"fetchVariables"` +} + +type RemoteJobStreamConsumer struct { + ID string `json:"id"` + Receiver string `json:"receiver"` +} + +// We use the worker name to differentiate which stream we await +func AwaitJobStreamExists(workerName string, monitoringAddress string) bool { + streamExists := false + for start := time.Now(); !streamExists && time.Since(start) < 10*time.Second; { + response, err := http.Get(fmt.Sprintf("http://%s/actuator/jobstreams/remote", monitoringAddress)) + if err != nil { + time.Sleep(time.Second) + continue + } + + remoteStreams := make([]RemoteJobStream, 1) + responseData, err := io.ReadAll(response.Body) + if err != nil { + time.Sleep(time.Second) + continue + } + + err = json.Unmarshal(responseData, &remoteStreams) + if err != nil { + time.Sleep(time.Second) + continue + } + + for _, remoteStream := range remoteStreams { + if remoteStream.Metadata.Worker == workerName { + return true + } + } + } + + return false +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/activate_jobs.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/activate_jobs.go index a7cc9b83..96aa4cd1 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/activate_jobs.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/activate_jobs.go @@ -44,6 +44,7 @@ type ActivateJobsCommandStep2 interface { type ActivateJobsCommandStep3 interface { DispatchActivateJobsCommand + TenantIds(...string) ActivateJobsCommandStep3 Timeout(time.Duration) ActivateJobsCommandStep3 WorkerName(string) ActivateJobsCommandStep3 FetchVariables(...string) ActivateJobsCommandStep3 @@ -64,6 +65,11 @@ func (cmd *ActivateJobsCommand) MaxJobsToActivate(maxJobsToActivate int32) Activ return cmd } +func (cmd *ActivateJobsCommand) TenantIds(tenantIds ...string) ActivateJobsCommandStep3 { + cmd.request.TenantIds = tenantIds + return cmd +} + func (cmd *ActivateJobsCommand) Timeout(timeout time.Duration) ActivateJobsCommandStep3 { cmd.request.Timeout = int64(timeout / time.Millisecond) return cmd diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/broadcast_signal.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/broadcast_signal.go index dc59d61a..c073c1da 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/broadcast_signal.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/broadcast_signal.go @@ -32,6 +32,7 @@ type BroadcastSignalCommandStep1 interface { type BroadcastSignalCommandStep2 interface { DispatchBroadcastSignalCommand + TenantId(string) BroadcastSignalCommandStep2 // Expected to be valid JSON string VariablesFromString(string) (BroadcastSignalCommandStep2, error) @@ -49,6 +50,12 @@ type BroadcastSignalCommand struct { request pb.BroadcastSignalRequest } +//nolint:revive +func (cmd *BroadcastSignalCommand) TenantId(tenantId string) BroadcastSignalCommandStep2 { + cmd.request.TenantId = tenantId + return cmd +} + func (cmd *BroadcastSignalCommand) VariablesFromString(variables string) (BroadcastSignalCommandStep2, error) { err := cmd.mixin.Validate("variables", variables) if err != nil { diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/create_instance.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/create_instance.go index 97cfdace..55c009be 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/create_instance.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/create_instance.go @@ -44,6 +44,7 @@ type CreateInstanceCommandStep2 interface { type CreateInstanceCommandStep3 interface { DispatchCreateInstanceCommand + TenantId(string) CreateInstanceCommandStep3 // Expected to be valid JSON string VariablesFromString(string) (CreateInstanceCommandStep3, error) @@ -76,6 +77,12 @@ type CreateInstanceWithResultCommand struct { request pb.CreateProcessInstanceWithResultRequest } +//nolint:revive +func (cmd *CreateInstanceCommand) TenantId(tenantId string) CreateInstanceCommandStep3 { + cmd.request.TenantId = tenantId + return cmd +} + func (cmd *CreateInstanceCommand) VariablesFromString(variables string) (CreateInstanceCommandStep3, error) { err := cmd.mixin.Validate("variables", variables) if err != nil { diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/deploy_resource.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/deploy_resource.go index 2f00e19d..b0236797 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/deploy_resource.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/deploy_resource.go @@ -48,6 +48,12 @@ func (cmd *DeployResourceCommand) Send(ctx context.Context) (*pb.DeployResourceR return response, err } +//nolint:revive +func (cmd *DeployResourceCommand) TenantId(tenantId string) *DeployResourceCommand { + cmd.request.TenantId = tenantId + return cmd +} + func NewDeployResourceCommand(gateway pb.GatewayClient, pred retryPredicate) *DeployResourceCommand { return &DeployResourceCommand{ Command: Command{ diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/evaluate_decision.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/evaluate_decision.go index 8f56ad87..9ec4ffb9 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/evaluate_decision.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/evaluate_decision.go @@ -33,6 +33,7 @@ type EvaluateDecisionCommandStep1 interface { type EvaluateDecisionCommandStep2 interface { DispatchEvaluateDecisionCommand + TenantId(string) EvaluateDecisionCommandStep2 // Expected to be valid JSON string VariablesFromString(string) (EvaluateDecisionCommandStep2, error) @@ -50,6 +51,12 @@ type EvaluateDecisionCommand struct { request pb.EvaluateDecisionRequest } +//nolint:revive +func (cmd *EvaluateDecisionCommand) TenantId(tenantId string) EvaluateDecisionCommandStep2 { + cmd.request.TenantId = tenantId + return cmd +} + func (cmd *EvaluateDecisionCommand) VariablesFromString(variables string) (EvaluateDecisionCommandStep2, error) { err := cmd.mixin.Validate("variables", variables) if err != nil { diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/publish_message.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/publish_message.go index b36ce3eb..e1362bc0 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/publish_message.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/publish_message.go @@ -35,6 +35,7 @@ type PublishMessageCommandStep3 interface { DispatchPublishMessageCommand MessageId(string) PublishMessageCommandStep3 + TenantId(string) PublishMessageCommandStep3 TimeToLive(duration time.Duration) PublishMessageCommandStep3 // Expected to be valid JSON string @@ -64,6 +65,12 @@ func (cmd *PublishMessageCommand) MessageId(messageId string) PublishMessageComm return cmd } +//nolint:revive +func (cmd *PublishMessageCommand) TenantId(tenantId string) PublishMessageCommandStep3 { + cmd.request.TenantId = tenantId + return cmd +} + func (cmd *PublishMessageCommand) VariablesFromObject(variables interface{}) (PublishMessageCommandStep3, error) { value, err := cmd.mixin.AsJSON("variables", variables, false) if err != nil { diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/stream_jobs.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/stream_jobs.go new file mode 100644 index 00000000..d90523c8 --- /dev/null +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/stream_jobs.go @@ -0,0 +1,154 @@ +// Copyright © 2018 Camunda Services GmbH (info@camunda.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package commands + +import ( + "context" + "io" + "log" + "time" + + "github.com/camunda/zeebe/clients/go/v8/pkg/entities" + "github.com/camunda/zeebe/clients/go/v8/pkg/pb" +) + +type StreamJobsConsumer chan<- entities.Job + +type DispatchStreamJobsCommand interface { + RequestTimeout(time.Duration) DispatchStreamJobsCommand + Send(ctx context.Context) error +} + +type StreamJobsCommandStep1 interface { + JobType(string) StreamJobsCommandStep2 +} + +type StreamJobsCommandStep2 interface { + Consumer(StreamJobsConsumer) StreamJobsCommandStep3 +} + +type StreamJobsCommandStep3 interface { + DispatchStreamJobsCommand + + TenantIds(...string) StreamJobsCommandStep3 + Timeout(time.Duration) StreamJobsCommandStep3 + WorkerName(string) StreamJobsCommandStep3 + FetchVariables(...string) StreamJobsCommandStep3 +} + +type StreamJobsCommand struct { + Command + request pb.StreamActivatedJobsRequest + consumer StreamJobsConsumer + requestTimeout time.Duration +} + +func (cmd *StreamJobsCommand) JobType(jobType string) StreamJobsCommandStep2 { + cmd.request.Type = jobType + return cmd +} + +func (cmd *StreamJobsCommand) Consumer(consumer StreamJobsConsumer) StreamJobsCommandStep3 { + cmd.consumer = consumer + return cmd +} + +func (cmd *StreamJobsCommand) TenantIds(tenantIds ...string) StreamJobsCommandStep3 { + cmd.request.TenantIds = tenantIds + return cmd +} + +func (cmd *StreamJobsCommand) Timeout(timeout time.Duration) StreamJobsCommandStep3 { + cmd.request.Timeout = int64(timeout / time.Millisecond) + return cmd +} + +func (cmd *StreamJobsCommand) WorkerName(workerName string) StreamJobsCommandStep3 { + cmd.request.Worker = workerName + return cmd +} + +func (cmd *StreamJobsCommand) FetchVariables(fetchVariables ...string) StreamJobsCommandStep3 { + cmd.request.FetchVariable = fetchVariables + return cmd +} + +func (cmd *StreamJobsCommand) RequestTimeout(requestTimeout time.Duration) DispatchStreamJobsCommand { + cmd.requestTimeout = requestTimeout + return cmd +} + +func (cmd *StreamJobsCommand) Send(ctx context.Context) error { + if cmd.requestTimeout > 0 { + streamContext, cancelCtx := context.WithTimeout(ctx, cmd.requestTimeout) + ctx = streamContext + defer cancelCtx() + } + + stream, err := cmd.openStream(ctx) + if err != nil { + return err + } + + for { + job, err := stream.Recv() + if err != nil { + if err == io.EOF { + break + } + + if !cmd.shouldRetry(ctx, err) { + return err + } + + stream, err = cmd.openStream(ctx) + if err != nil { + log.Printf("Failed to reopen job stream: %v\n", err) + return err + } + } + + cmd.consumer <- entities.Job{ActivatedJob: job} + } + + return nil +} + +func (cmd *StreamJobsCommand) openStream(ctx context.Context) (pb.Gateway_StreamActivatedJobsClient, error) { + stream, err := cmd.gateway.StreamActivatedJobs(ctx, &cmd.request) + + if err != nil { + if cmd.shouldRetry(ctx, err) { + return cmd.openStream(ctx) + } + + return nil, err + } + + return stream, nil +} + +func NewStreamJobsCommand(gateway pb.GatewayClient, pred retryPredicate) StreamJobsCommandStep1 { + return &StreamJobsCommand{ + request: pb.StreamActivatedJobsRequest{ + Timeout: DefaultJobTimeoutInMs, + Worker: DefaultJobWorkerName, + }, + Command: Command{ + gateway: gateway, + shouldRetry: pred, + }, + } +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/update_job_timeout.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/update_job_timeout.go new file mode 100644 index 00000000..7166b4c0 --- /dev/null +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/commands/update_job_timeout.go @@ -0,0 +1,70 @@ +// Copyright © 2018 Camunda Services GmbH (info@camunda.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package commands + +import ( + "context" + "github.com/camunda/zeebe/clients/go/v8/pkg/pb" +) + +type DispatchUpdateJobTimeoutCommand interface { + Send(context.Context) (*pb.UpdateJobTimeoutResponse, error) +} + +type UpdateJobTimeoutCommandStep1 interface { + JobKey(int64) UpdateJobTimeoutCommandStep2 +} + +type UpdateJobTimeoutCommandStep2 interface { + DispatchUpdateJobTimeoutCommand + + Timeout(int64) DispatchUpdateJobTimeoutCommand +} + +type UpdateJobTimeoutCommand struct { + Command + request pb.UpdateJobTimeoutRequest +} + +func (cmd *UpdateJobTimeoutCommand) JobKey(jobKey int64) UpdateJobTimeoutCommandStep2 { + cmd.request.JobKey = jobKey + return cmd +} + +func (cmd *UpdateJobTimeoutCommand) Timeout(timeout int64) DispatchUpdateJobTimeoutCommand { + cmd.request.Timeout = timeout + return cmd +} + +func (cmd *UpdateJobTimeoutCommand) Send(ctx context.Context) (*pb.UpdateJobTimeoutResponse, error) { + response, err := cmd.gateway.UpdateJobTimeout(ctx, &cmd.request) + if cmd.shouldRetry(ctx, err) { + return cmd.Send(ctx) + } + + return response, err +} + +func NewUpdateJobTimeoutCommand(gateway pb.GatewayClient, pred retryPredicate) UpdateJobTimeoutCommandStep1 { + return &UpdateJobTimeoutCommand{ + request: pb.UpdateJobTimeoutRequest{ + Timeout: DefaultJobTimeoutInMs, + }, + Command: Command{ + gateway: gateway, + shouldRetry: pred, + }, + } +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/pb/gateway.pb.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/pb/gateway.pb.go index 5ef871b9..983bfe0a 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/pb/gateway.pb.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/pb/gateway.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel -// protoc v3.21.11 +// protoc-gen-go v1.26.0 +// protoc v4.25.1 // source: gateway.proto package pb @@ -71,7 +71,7 @@ func (x Partition_PartitionBrokerRole) Number() protoreflect.EnumNumber { // Deprecated: Use Partition_PartitionBrokerRole.Descriptor instead. func (Partition_PartitionBrokerRole) EnumDescriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{39, 0} + return file_gateway_proto_rawDescGZIP(), []int{41, 0} } // Describes the current health of the partition @@ -121,7 +121,94 @@ func (x Partition_PartitionBrokerHealth) Number() protoreflect.EnumNumber { // Deprecated: Use Partition_PartitionBrokerHealth.Descriptor instead. func (Partition_PartitionBrokerHealth) EnumDescriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{39, 1} + return file_gateway_proto_rawDescGZIP(), []int{41, 1} +} + +type StreamActivatedJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the job type, as defined in the BPMN process (e.g. ) + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // the name of the worker activating the jobs, mostly used for logging purposes + Worker string `protobuf:"bytes,2,opt,name=worker,proto3" json:"worker,omitempty"` + // a job returned after this call will not be activated by another call until the + // timeout (in ms) has been reached + Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + // a list of variables to fetch as the job variables; if empty, all visible variables at + // the time of activation for the scope of the job will be returned + FetchVariable []string `protobuf:"bytes,5,rep,name=fetchVariable,proto3" json:"fetchVariable,omitempty"` + // a list of identifiers of tenants for which to stream jobs + TenantIds []string `protobuf:"bytes,6,rep,name=tenantIds,proto3" json:"tenantIds,omitempty"` +} + +func (x *StreamActivatedJobsRequest) Reset() { + *x = StreamActivatedJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamActivatedJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamActivatedJobsRequest) ProtoMessage() {} + +func (x *StreamActivatedJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamActivatedJobsRequest.ProtoReflect.Descriptor instead. +func (*StreamActivatedJobsRequest) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{0} +} + +func (x *StreamActivatedJobsRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *StreamActivatedJobsRequest) GetWorker() string { + if x != nil { + return x.Worker + } + return "" +} + +func (x *StreamActivatedJobsRequest) GetTimeout() int64 { + if x != nil { + return x.Timeout + } + return 0 +} + +func (x *StreamActivatedJobsRequest) GetFetchVariable() []string { + if x != nil { + return x.FetchVariable + } + return nil +} + +func (x *StreamActivatedJobsRequest) GetTenantIds() []string { + if x != nil { + return x.TenantIds + } + return nil } type ActivateJobsRequest struct { @@ -146,12 +233,14 @@ type ActivateJobsRequest struct { // if the requestTimeout = 0, a default timeout is used. // if the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. RequestTimeout int64 `protobuf:"varint,6,opt,name=requestTimeout,proto3" json:"requestTimeout,omitempty"` + // a list of IDs of tenants for which to activate jobs + TenantIds []string `protobuf:"bytes,7,rep,name=tenantIds,proto3" json:"tenantIds,omitempty"` } func (x *ActivateJobsRequest) Reset() { *x = ActivateJobsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[0] + mi := &file_gateway_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -164,7 +253,7 @@ func (x *ActivateJobsRequest) String() string { func (*ActivateJobsRequest) ProtoMessage() {} func (x *ActivateJobsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[0] + mi := &file_gateway_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -177,7 +266,7 @@ func (x *ActivateJobsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateJobsRequest.ProtoReflect.Descriptor instead. func (*ActivateJobsRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{0} + return file_gateway_proto_rawDescGZIP(), []int{1} } func (x *ActivateJobsRequest) GetType() string { @@ -222,6 +311,13 @@ func (x *ActivateJobsRequest) GetRequestTimeout() int64 { return 0 } +func (x *ActivateJobsRequest) GetTenantIds() []string { + if x != nil { + return x.TenantIds + } + return nil +} + type ActivateJobsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -234,7 +330,7 @@ type ActivateJobsResponse struct { func (x *ActivateJobsResponse) Reset() { *x = ActivateJobsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[1] + mi := &file_gateway_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -247,7 +343,7 @@ func (x *ActivateJobsResponse) String() string { func (*ActivateJobsResponse) ProtoMessage() {} func (x *ActivateJobsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[1] + mi := &file_gateway_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -260,7 +356,7 @@ func (x *ActivateJobsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateJobsResponse.ProtoReflect.Descriptor instead. func (*ActivateJobsResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{1} + return file_gateway_proto_rawDescGZIP(), []int{2} } func (x *ActivateJobsResponse) GetJobs() []*ActivatedJob { @@ -304,12 +400,14 @@ type ActivatedJob struct { // JSON document, computed at activation time, consisting of all visible variables to // the task scope Variables string `protobuf:"bytes,13,opt,name=variables,proto3" json:"variables,omitempty"` + // the id of the tenant that owns the job + TenantId string `protobuf:"bytes,14,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *ActivatedJob) Reset() { *x = ActivatedJob{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[2] + mi := &file_gateway_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -322,7 +420,7 @@ func (x *ActivatedJob) String() string { func (*ActivatedJob) ProtoMessage() {} func (x *ActivatedJob) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[2] + mi := &file_gateway_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -335,7 +433,7 @@ func (x *ActivatedJob) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivatedJob.ProtoReflect.Descriptor instead. func (*ActivatedJob) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{2} + return file_gateway_proto_rawDescGZIP(), []int{3} } func (x *ActivatedJob) GetKey() int64 { @@ -429,6 +527,13 @@ func (x *ActivatedJob) GetVariables() string { return "" } +func (x *ActivatedJob) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type CancelProcessInstanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -442,7 +547,7 @@ type CancelProcessInstanceRequest struct { func (x *CancelProcessInstanceRequest) Reset() { *x = CancelProcessInstanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[3] + mi := &file_gateway_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -455,7 +560,7 @@ func (x *CancelProcessInstanceRequest) String() string { func (*CancelProcessInstanceRequest) ProtoMessage() {} func (x *CancelProcessInstanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[3] + mi := &file_gateway_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -468,7 +573,7 @@ func (x *CancelProcessInstanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelProcessInstanceRequest.ProtoReflect.Descriptor instead. func (*CancelProcessInstanceRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{3} + return file_gateway_proto_rawDescGZIP(), []int{4} } func (x *CancelProcessInstanceRequest) GetProcessInstanceKey() int64 { @@ -487,7 +592,7 @@ type CancelProcessInstanceResponse struct { func (x *CancelProcessInstanceResponse) Reset() { *x = CancelProcessInstanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[4] + mi := &file_gateway_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +605,7 @@ func (x *CancelProcessInstanceResponse) String() string { func (*CancelProcessInstanceResponse) ProtoMessage() {} func (x *CancelProcessInstanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[4] + mi := &file_gateway_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +618,7 @@ func (x *CancelProcessInstanceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelProcessInstanceResponse.ProtoReflect.Descriptor instead. func (*CancelProcessInstanceResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{4} + return file_gateway_proto_rawDescGZIP(), []int{5} } type CompleteJobRequest struct { @@ -530,7 +635,7 @@ type CompleteJobRequest struct { func (x *CompleteJobRequest) Reset() { *x = CompleteJobRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[5] + mi := &file_gateway_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -543,7 +648,7 @@ func (x *CompleteJobRequest) String() string { func (*CompleteJobRequest) ProtoMessage() {} func (x *CompleteJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[5] + mi := &file_gateway_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -556,7 +661,7 @@ func (x *CompleteJobRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CompleteJobRequest.ProtoReflect.Descriptor instead. func (*CompleteJobRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{5} + return file_gateway_proto_rawDescGZIP(), []int{6} } func (x *CompleteJobRequest) GetJobKey() int64 { @@ -582,7 +687,7 @@ type CompleteJobResponse struct { func (x *CompleteJobResponse) Reset() { *x = CompleteJobResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[6] + mi := &file_gateway_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -595,7 +700,7 @@ func (x *CompleteJobResponse) String() string { func (*CompleteJobResponse) ProtoMessage() {} func (x *CompleteJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[6] + mi := &file_gateway_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -608,7 +713,7 @@ func (x *CompleteJobResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CompleteJobResponse.ProtoReflect.Descriptor instead. func (*CompleteJobResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{6} + return file_gateway_proto_rawDescGZIP(), []int{7} } type CreateProcessInstanceRequest struct { @@ -633,12 +738,14 @@ type CreateProcessInstanceRequest struct { // will start at the start event. If non-empty the process instance will apply start // instructions after it has been created StartInstructions []*ProcessInstanceCreationStartInstruction `protobuf:"bytes,5,rep,name=startInstructions,proto3" json:"startInstructions,omitempty"` + // the tenant id of the process definition + TenantId string `protobuf:"bytes,6,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *CreateProcessInstanceRequest) Reset() { *x = CreateProcessInstanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[7] + mi := &file_gateway_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -651,7 +758,7 @@ func (x *CreateProcessInstanceRequest) String() string { func (*CreateProcessInstanceRequest) ProtoMessage() {} func (x *CreateProcessInstanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[7] + mi := &file_gateway_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -664,7 +771,7 @@ func (x *CreateProcessInstanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateProcessInstanceRequest.ProtoReflect.Descriptor instead. func (*CreateProcessInstanceRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{7} + return file_gateway_proto_rawDescGZIP(), []int{8} } func (x *CreateProcessInstanceRequest) GetProcessDefinitionKey() int64 { @@ -702,6 +809,13 @@ func (x *CreateProcessInstanceRequest) GetStartInstructions() []*ProcessInstance return nil } +func (x *CreateProcessInstanceRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type ProcessInstanceCreationStartInstruction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -714,7 +828,7 @@ type ProcessInstanceCreationStartInstruction struct { func (x *ProcessInstanceCreationStartInstruction) Reset() { *x = ProcessInstanceCreationStartInstruction{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[8] + mi := &file_gateway_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -727,7 +841,7 @@ func (x *ProcessInstanceCreationStartInstruction) String() string { func (*ProcessInstanceCreationStartInstruction) ProtoMessage() {} func (x *ProcessInstanceCreationStartInstruction) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[8] + mi := &file_gateway_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -740,7 +854,7 @@ func (x *ProcessInstanceCreationStartInstruction) ProtoReflect() protoreflect.Me // Deprecated: Use ProcessInstanceCreationStartInstruction.ProtoReflect.Descriptor instead. func (*ProcessInstanceCreationStartInstruction) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{8} + return file_gateway_proto_rawDescGZIP(), []int{9} } func (x *ProcessInstanceCreationStartInstruction) GetElementId() string { @@ -765,12 +879,14 @@ type CreateProcessInstanceResponse struct { // the unique identifier of the created process instance; to be used wherever a request // needs a process instance key (e.g. CancelProcessInstanceRequest) ProcessInstanceKey int64 `protobuf:"varint,4,opt,name=processInstanceKey,proto3" json:"processInstanceKey,omitempty"` + // the tenant identifier of the created process instance + TenantId string `protobuf:"bytes,5,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *CreateProcessInstanceResponse) Reset() { *x = CreateProcessInstanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[9] + mi := &file_gateway_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -783,7 +899,7 @@ func (x *CreateProcessInstanceResponse) String() string { func (*CreateProcessInstanceResponse) ProtoMessage() {} func (x *CreateProcessInstanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[9] + mi := &file_gateway_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -796,7 +912,7 @@ func (x *CreateProcessInstanceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateProcessInstanceResponse.ProtoReflect.Descriptor instead. func (*CreateProcessInstanceResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{9} + return file_gateway_proto_rawDescGZIP(), []int{10} } func (x *CreateProcessInstanceResponse) GetProcessDefinitionKey() int64 { @@ -827,6 +943,13 @@ func (x *CreateProcessInstanceResponse) GetProcessInstanceKey() int64 { return 0 } +func (x *CreateProcessInstanceResponse) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type CreateProcessInstanceWithResultRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -845,7 +968,7 @@ type CreateProcessInstanceWithResultRequest struct { func (x *CreateProcessInstanceWithResultRequest) Reset() { *x = CreateProcessInstanceWithResultRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[10] + mi := &file_gateway_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -858,7 +981,7 @@ func (x *CreateProcessInstanceWithResultRequest) String() string { func (*CreateProcessInstanceWithResultRequest) ProtoMessage() {} func (x *CreateProcessInstanceWithResultRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[10] + mi := &file_gateway_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -871,7 +994,7 @@ func (x *CreateProcessInstanceWithResultRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use CreateProcessInstanceWithResultRequest.ProtoReflect.Descriptor instead. func (*CreateProcessInstanceWithResultRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{10} + return file_gateway_proto_rawDescGZIP(), []int{11} } func (x *CreateProcessInstanceWithResultRequest) GetRequest() *CreateProcessInstanceRequest { @@ -913,12 +1036,14 @@ type CreateProcessInstanceWithResultResponse struct { // JSON document // consists of visible variables in the root scope Variables string `protobuf:"bytes,5,opt,name=variables,proto3" json:"variables,omitempty"` + // the tenant identifier of the process definition + TenantId string `protobuf:"bytes,6,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *CreateProcessInstanceWithResultResponse) Reset() { *x = CreateProcessInstanceWithResultResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[11] + mi := &file_gateway_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -931,7 +1056,7 @@ func (x *CreateProcessInstanceWithResultResponse) String() string { func (*CreateProcessInstanceWithResultResponse) ProtoMessage() {} func (x *CreateProcessInstanceWithResultResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[11] + mi := &file_gateway_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -944,7 +1069,7 @@ func (x *CreateProcessInstanceWithResultResponse) ProtoReflect() protoreflect.Me // Deprecated: Use CreateProcessInstanceWithResultResponse.ProtoReflect.Descriptor instead. func (*CreateProcessInstanceWithResultResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{11} + return file_gateway_proto_rawDescGZIP(), []int{12} } func (x *CreateProcessInstanceWithResultResponse) GetProcessDefinitionKey() int64 { @@ -982,6 +1107,13 @@ func (x *CreateProcessInstanceWithResultResponse) GetVariables() string { return "" } +func (x *CreateProcessInstanceWithResultResponse) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type EvaluateDecisionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -999,12 +1131,14 @@ type EvaluateDecisionRequest struct { // [{ "a": 1, "b": 2 }] would not be a valid argument, as the root of the // JSON document is an array and not an object. Variables string `protobuf:"bytes,3,opt,name=variables,proto3" json:"variables,omitempty"` + // the tenant identifier of the decision + TenantId string `protobuf:"bytes,4,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *EvaluateDecisionRequest) Reset() { *x = EvaluateDecisionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[12] + mi := &file_gateway_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1017,7 +1151,7 @@ func (x *EvaluateDecisionRequest) String() string { func (*EvaluateDecisionRequest) ProtoMessage() {} func (x *EvaluateDecisionRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[12] + mi := &file_gateway_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1030,7 +1164,7 @@ func (x *EvaluateDecisionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluateDecisionRequest.ProtoReflect.Descriptor instead. func (*EvaluateDecisionRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{12} + return file_gateway_proto_rawDescGZIP(), []int{13} } func (x *EvaluateDecisionRequest) GetDecisionKey() int64 { @@ -1054,6 +1188,13 @@ func (x *EvaluateDecisionRequest) GetVariables() string { return "" } +func (x *EvaluateDecisionRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type EvaluateDecisionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1085,12 +1226,14 @@ type EvaluateDecisionResponse struct { FailedDecisionId string `protobuf:"bytes,9,opt,name=failedDecisionId,proto3" json:"failedDecisionId,omitempty"` // an optional message describing why the decision which was evaluated failed FailureMessage string `protobuf:"bytes,10,opt,name=failureMessage,proto3" json:"failureMessage,omitempty"` + // the tenant identifier of the evaluated decision + TenantId string `protobuf:"bytes,11,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *EvaluateDecisionResponse) Reset() { *x = EvaluateDecisionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[13] + mi := &file_gateway_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1103,7 +1246,7 @@ func (x *EvaluateDecisionResponse) String() string { func (*EvaluateDecisionResponse) ProtoMessage() {} func (x *EvaluateDecisionResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[13] + mi := &file_gateway_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1116,7 +1259,7 @@ func (x *EvaluateDecisionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluateDecisionResponse.ProtoReflect.Descriptor instead. func (*EvaluateDecisionResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{13} + return file_gateway_proto_rawDescGZIP(), []int{14} } func (x *EvaluateDecisionResponse) GetDecisionKey() int64 { @@ -1189,6 +1332,13 @@ func (x *EvaluateDecisionResponse) GetFailureMessage() string { return "" } +func (x *EvaluateDecisionResponse) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type EvaluatedDecision struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1213,12 +1363,14 @@ type EvaluatedDecision struct { MatchedRules []*MatchedDecisionRule `protobuf:"bytes,7,rep,name=matchedRules,proto3" json:"matchedRules,omitempty"` // the decision inputs that were evaluated within this decision evaluation EvaluatedInputs []*EvaluatedDecisionInput `protobuf:"bytes,8,rep,name=evaluatedInputs,proto3" json:"evaluatedInputs,omitempty"` + // the tenant identifier of the evaluated decision + TenantId string `protobuf:"bytes,9,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *EvaluatedDecision) Reset() { *x = EvaluatedDecision{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[14] + mi := &file_gateway_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1231,7 +1383,7 @@ func (x *EvaluatedDecision) String() string { func (*EvaluatedDecision) ProtoMessage() {} func (x *EvaluatedDecision) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[14] + mi := &file_gateway_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1244,7 +1396,7 @@ func (x *EvaluatedDecision) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluatedDecision.ProtoReflect.Descriptor instead. func (*EvaluatedDecision) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{14} + return file_gateway_proto_rawDescGZIP(), []int{15} } func (x *EvaluatedDecision) GetDecisionKey() int64 { @@ -1303,6 +1455,13 @@ func (x *EvaluatedDecision) GetEvaluatedInputs() []*EvaluatedDecisionInput { return nil } +func (x *EvaluatedDecision) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type EvaluatedDecisionInput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1319,7 +1478,7 @@ type EvaluatedDecisionInput struct { func (x *EvaluatedDecisionInput) Reset() { *x = EvaluatedDecisionInput{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[15] + mi := &file_gateway_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1332,7 +1491,7 @@ func (x *EvaluatedDecisionInput) String() string { func (*EvaluatedDecisionInput) ProtoMessage() {} func (x *EvaluatedDecisionInput) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[15] + mi := &file_gateway_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1345,7 +1504,7 @@ func (x *EvaluatedDecisionInput) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluatedDecisionInput.ProtoReflect.Descriptor instead. func (*EvaluatedDecisionInput) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{15} + return file_gateway_proto_rawDescGZIP(), []int{16} } func (x *EvaluatedDecisionInput) GetInputId() string { @@ -1385,7 +1544,7 @@ type EvaluatedDecisionOutput struct { func (x *EvaluatedDecisionOutput) Reset() { *x = EvaluatedDecisionOutput{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[16] + mi := &file_gateway_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1398,7 +1557,7 @@ func (x *EvaluatedDecisionOutput) String() string { func (*EvaluatedDecisionOutput) ProtoMessage() {} func (x *EvaluatedDecisionOutput) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[16] + mi := &file_gateway_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1411,7 +1570,7 @@ func (x *EvaluatedDecisionOutput) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluatedDecisionOutput.ProtoReflect.Descriptor instead. func (*EvaluatedDecisionOutput) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{16} + return file_gateway_proto_rawDescGZIP(), []int{17} } func (x *EvaluatedDecisionOutput) GetOutputId() string { @@ -1451,7 +1610,7 @@ type MatchedDecisionRule struct { func (x *MatchedDecisionRule) Reset() { *x = MatchedDecisionRule{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[17] + mi := &file_gateway_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1464,7 +1623,7 @@ func (x *MatchedDecisionRule) String() string { func (*MatchedDecisionRule) ProtoMessage() {} func (x *MatchedDecisionRule) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[17] + mi := &file_gateway_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1477,7 +1636,7 @@ func (x *MatchedDecisionRule) ProtoReflect() protoreflect.Message { // Deprecated: Use MatchedDecisionRule.ProtoReflect.Descriptor instead. func (*MatchedDecisionRule) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{17} + return file_gateway_proto_rawDescGZIP(), []int{18} } func (x *MatchedDecisionRule) GetRuleId() string { @@ -1501,7 +1660,7 @@ func (x *MatchedDecisionRule) GetEvaluatedOutputs() []*EvaluatedDecisionOutput { return nil } -// Deprecated: Marked as deprecated in gateway.proto. +// Deprecated: Do not use. type DeployProcessRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1514,7 +1673,7 @@ type DeployProcessRequest struct { func (x *DeployProcessRequest) Reset() { *x = DeployProcessRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[18] + mi := &file_gateway_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1527,7 +1686,7 @@ func (x *DeployProcessRequest) String() string { func (*DeployProcessRequest) ProtoMessage() {} func (x *DeployProcessRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[18] + mi := &file_gateway_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1540,7 +1699,7 @@ func (x *DeployProcessRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeployProcessRequest.ProtoReflect.Descriptor instead. func (*DeployProcessRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{18} + return file_gateway_proto_rawDescGZIP(), []int{19} } func (x *DeployProcessRequest) GetProcesses() []*ProcessRequestObject { @@ -1550,7 +1709,7 @@ func (x *DeployProcessRequest) GetProcesses() []*ProcessRequestObject { return nil } -// Deprecated: Marked as deprecated in gateway.proto. +// Deprecated: Do not use. type ProcessRequestObject struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1565,7 +1724,7 @@ type ProcessRequestObject struct { func (x *ProcessRequestObject) Reset() { *x = ProcessRequestObject{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[19] + mi := &file_gateway_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1578,7 +1737,7 @@ func (x *ProcessRequestObject) String() string { func (*ProcessRequestObject) ProtoMessage() {} func (x *ProcessRequestObject) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[19] + mi := &file_gateway_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1591,7 +1750,7 @@ func (x *ProcessRequestObject) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessRequestObject.ProtoReflect.Descriptor instead. func (*ProcessRequestObject) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{19} + return file_gateway_proto_rawDescGZIP(), []int{20} } func (x *ProcessRequestObject) GetName() string { @@ -1608,7 +1767,7 @@ func (x *ProcessRequestObject) GetDefinition() []byte { return nil } -// Deprecated: Marked as deprecated in gateway.proto. +// Deprecated: Do not use. type DeployProcessResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1623,7 +1782,7 @@ type DeployProcessResponse struct { func (x *DeployProcessResponse) Reset() { *x = DeployProcessResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[20] + mi := &file_gateway_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1636,7 +1795,7 @@ func (x *DeployProcessResponse) String() string { func (*DeployProcessResponse) ProtoMessage() {} func (x *DeployProcessResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[20] + mi := &file_gateway_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1649,7 +1808,7 @@ func (x *DeployProcessResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeployProcessResponse.ProtoReflect.Descriptor instead. func (*DeployProcessResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{20} + return file_gateway_proto_rawDescGZIP(), []int{21} } func (x *DeployProcessResponse) GetKey() int64 { @@ -1673,12 +1832,14 @@ type DeployResourceRequest struct { // list of resources to deploy Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` + // the tenant id of the resources to deploy + TenantId string `protobuf:"bytes,2,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *DeployResourceRequest) Reset() { *x = DeployResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[21] + mi := &file_gateway_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1691,7 +1852,7 @@ func (x *DeployResourceRequest) String() string { func (*DeployResourceRequest) ProtoMessage() {} func (x *DeployResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[21] + mi := &file_gateway_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1704,7 +1865,7 @@ func (x *DeployResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeployResourceRequest.ProtoReflect.Descriptor instead. func (*DeployResourceRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{21} + return file_gateway_proto_rawDescGZIP(), []int{22} } func (x *DeployResourceRequest) GetResources() []*Resource { @@ -1714,6 +1875,13 @@ func (x *DeployResourceRequest) GetResources() []*Resource { return nil } +func (x *DeployResourceRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type Resource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1728,7 +1896,7 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[22] + mi := &file_gateway_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1741,7 +1909,7 @@ func (x *Resource) String() string { func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[22] + mi := &file_gateway_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1754,7 +1922,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{22} + return file_gateway_proto_rawDescGZIP(), []int{23} } func (x *Resource) GetName() string { @@ -1780,12 +1948,14 @@ type DeployResourceResponse struct { Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` // a list of deployed resources, e.g. processes Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` + // the tenant id of the deployed resources + TenantId string `protobuf:"bytes,3,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *DeployResourceResponse) Reset() { *x = DeployResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[23] + mi := &file_gateway_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1798,7 +1968,7 @@ func (x *DeployResourceResponse) String() string { func (*DeployResourceResponse) ProtoMessage() {} func (x *DeployResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[23] + mi := &file_gateway_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1811,7 +1981,7 @@ func (x *DeployResourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeployResourceResponse.ProtoReflect.Descriptor instead. func (*DeployResourceResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{23} + return file_gateway_proto_rawDescGZIP(), []int{24} } func (x *DeployResourceResponse) GetKey() int64 { @@ -1828,6 +1998,13 @@ func (x *DeployResourceResponse) GetDeployments() []*Deployment { return nil } +func (x *DeployResourceResponse) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type Deployment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1836,16 +2013,18 @@ type Deployment struct { // each deployment has only one metadata // // Types that are assignable to Metadata: + // // *Deployment_Process // *Deployment_Decision // *Deployment_DecisionRequirements + // *Deployment_Form Metadata isDeployment_Metadata `protobuf_oneof:"Metadata"` } func (x *Deployment) Reset() { *x = Deployment{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[24] + mi := &file_gateway_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1858,7 +2037,7 @@ func (x *Deployment) String() string { func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[24] + mi := &file_gateway_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1871,7 +2050,7 @@ func (x *Deployment) ProtoReflect() protoreflect.Message { // Deprecated: Use Deployment.ProtoReflect.Descriptor instead. func (*Deployment) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{24} + return file_gateway_proto_rawDescGZIP(), []int{25} } func (m *Deployment) GetMetadata() isDeployment_Metadata { @@ -1902,6 +2081,13 @@ func (x *Deployment) GetDecisionRequirements() *DecisionRequirementsMetadata { return nil } +func (x *Deployment) GetForm() *FormMetadata { + if x, ok := x.GetMetadata().(*Deployment_Form); ok { + return x.Form + } + return nil +} + type isDeployment_Metadata interface { isDeployment_Metadata() } @@ -1921,12 +2107,19 @@ type Deployment_DecisionRequirements struct { DecisionRequirements *DecisionRequirementsMetadata `protobuf:"bytes,3,opt,name=decisionRequirements,proto3,oneof"` } +type Deployment_Form struct { + // metadata of a deployed form + Form *FormMetadata `protobuf:"bytes,4,opt,name=form,proto3,oneof"` +} + func (*Deployment_Process) isDeployment_Metadata() {} func (*Deployment_Decision) isDeployment_Metadata() {} func (*Deployment_DecisionRequirements) isDeployment_Metadata() {} +func (*Deployment_Form) isDeployment_Metadata() {} + type ProcessMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1942,12 +2135,14 @@ type ProcessMetadata struct { // the resource name (see: ProcessRequestObject.name) from which this process was // parsed ResourceName string `protobuf:"bytes,4,opt,name=resourceName,proto3" json:"resourceName,omitempty"` + // the tenant id of the deployed process + TenantId string `protobuf:"bytes,5,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *ProcessMetadata) Reset() { *x = ProcessMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[25] + mi := &file_gateway_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1960,7 +2155,7 @@ func (x *ProcessMetadata) String() string { func (*ProcessMetadata) ProtoMessage() {} func (x *ProcessMetadata) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[25] + mi := &file_gateway_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1973,7 +2168,7 @@ func (x *ProcessMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessMetadata.ProtoReflect.Descriptor instead. func (*ProcessMetadata) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{25} + return file_gateway_proto_rawDescGZIP(), []int{26} } func (x *ProcessMetadata) GetBpmnProcessId() string { @@ -2004,6 +2199,13 @@ func (x *ProcessMetadata) GetResourceName() string { return "" } +func (x *ProcessMetadata) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type DecisionMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2025,12 +2227,14 @@ type DecisionMetadata struct { // the assigned key of the decision requirements graph that this decision is // part of DecisionRequirementsKey int64 `protobuf:"varint,6,opt,name=decisionRequirementsKey,proto3" json:"decisionRequirementsKey,omitempty"` + // the tenant id of the deployed decision + TenantId string `protobuf:"bytes,7,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *DecisionMetadata) Reset() { *x = DecisionMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[26] + mi := &file_gateway_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2043,7 +2247,7 @@ func (x *DecisionMetadata) String() string { func (*DecisionMetadata) ProtoMessage() {} func (x *DecisionMetadata) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[26] + mi := &file_gateway_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2056,7 +2260,7 @@ func (x *DecisionMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use DecisionMetadata.ProtoReflect.Descriptor instead. func (*DecisionMetadata) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{26} + return file_gateway_proto_rawDescGZIP(), []int{27} } func (x *DecisionMetadata) GetDmnDecisionId() string { @@ -2101,6 +2305,13 @@ func (x *DecisionMetadata) GetDecisionRequirementsKey() int64 { return 0 } +func (x *DecisionMetadata) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type DecisionRequirementsMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2119,12 +2330,14 @@ type DecisionRequirementsMetadata struct { // the resource name (see: Resource.name) from which this decision // requirements was parsed ResourceName string `protobuf:"bytes,5,opt,name=resourceName,proto3" json:"resourceName,omitempty"` + // the tenant id of the deployed decision requirements + TenantId string `protobuf:"bytes,6,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *DecisionRequirementsMetadata) Reset() { *x = DecisionRequirementsMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[27] + mi := &file_gateway_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2137,7 +2350,7 @@ func (x *DecisionRequirementsMetadata) String() string { func (*DecisionRequirementsMetadata) ProtoMessage() {} func (x *DecisionRequirementsMetadata) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[27] + mi := &file_gateway_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2150,7 +2363,7 @@ func (x *DecisionRequirementsMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use DecisionRequirementsMetadata.ProtoReflect.Descriptor instead. func (*DecisionRequirementsMetadata) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{27} + return file_gateway_proto_rawDescGZIP(), []int{28} } func (x *DecisionRequirementsMetadata) GetDmnDecisionRequirementsId() string { @@ -2188,6 +2401,98 @@ func (x *DecisionRequirementsMetadata) GetResourceName() string { return "" } +func (x *DecisionRequirementsMetadata) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +type FormMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the form ID, as parsed during deployment; together with the + // versions forms a unique identifier for a specific form + FormId string `protobuf:"bytes,1,opt,name=formId,proto3" json:"formId,omitempty"` + // the assigned form version + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // the assigned key, which acts as a unique identifier for this form + FormKey int64 `protobuf:"varint,3,opt,name=formKey,proto3" json:"formKey,omitempty"` + // the resource name + ResourceName string `protobuf:"bytes,4,opt,name=resourceName,proto3" json:"resourceName,omitempty"` + // the tenant id of the deployed form + TenantId string `protobuf:"bytes,5,opt,name=tenantId,proto3" json:"tenantId,omitempty"` +} + +func (x *FormMetadata) Reset() { + *x = FormMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FormMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FormMetadata) ProtoMessage() {} + +func (x *FormMetadata) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FormMetadata.ProtoReflect.Descriptor instead. +func (*FormMetadata) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{29} +} + +func (x *FormMetadata) GetFormId() string { + if x != nil { + return x.FormId + } + return "" +} + +func (x *FormMetadata) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *FormMetadata) GetFormKey() int64 { + if x != nil { + return x.FormKey + } + return 0 +} + +func (x *FormMetadata) GetResourceName() string { + if x != nil { + return x.ResourceName + } + return "" +} + +func (x *FormMetadata) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type FailJobRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2214,7 +2519,7 @@ type FailJobRequest struct { func (x *FailJobRequest) Reset() { *x = FailJobRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[28] + mi := &file_gateway_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2227,7 +2532,7 @@ func (x *FailJobRequest) String() string { func (*FailJobRequest) ProtoMessage() {} func (x *FailJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[28] + mi := &file_gateway_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2240,7 +2545,7 @@ func (x *FailJobRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FailJobRequest.ProtoReflect.Descriptor instead. func (*FailJobRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{28} + return file_gateway_proto_rawDescGZIP(), []int{30} } func (x *FailJobRequest) GetJobKey() int64 { @@ -2287,7 +2592,7 @@ type FailJobResponse struct { func (x *FailJobResponse) Reset() { *x = FailJobResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[29] + mi := &file_gateway_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2300,7 +2605,7 @@ func (x *FailJobResponse) String() string { func (*FailJobResponse) ProtoMessage() {} func (x *FailJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[29] + mi := &file_gateway_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2313,7 +2618,7 @@ func (x *FailJobResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FailJobResponse.ProtoReflect.Descriptor instead. func (*FailJobResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{29} + return file_gateway_proto_rawDescGZIP(), []int{31} } type ThrowErrorRequest struct { @@ -2338,7 +2643,7 @@ type ThrowErrorRequest struct { func (x *ThrowErrorRequest) Reset() { *x = ThrowErrorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[30] + mi := &file_gateway_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2351,7 +2656,7 @@ func (x *ThrowErrorRequest) String() string { func (*ThrowErrorRequest) ProtoMessage() {} func (x *ThrowErrorRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[30] + mi := &file_gateway_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2364,7 +2669,7 @@ func (x *ThrowErrorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ThrowErrorRequest.ProtoReflect.Descriptor instead. func (*ThrowErrorRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{30} + return file_gateway_proto_rawDescGZIP(), []int{32} } func (x *ThrowErrorRequest) GetJobKey() int64 { @@ -2404,7 +2709,7 @@ type ThrowErrorResponse struct { func (x *ThrowErrorResponse) Reset() { *x = ThrowErrorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[31] + mi := &file_gateway_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2417,7 +2722,7 @@ func (x *ThrowErrorResponse) String() string { func (*ThrowErrorResponse) ProtoMessage() {} func (x *ThrowErrorResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[31] + mi := &file_gateway_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2430,7 +2735,7 @@ func (x *ThrowErrorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ThrowErrorResponse.ProtoReflect.Descriptor instead. func (*ThrowErrorResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{31} + return file_gateway_proto_rawDescGZIP(), []int{33} } type PublishMessageRequest struct { @@ -2450,12 +2755,14 @@ type PublishMessageRequest struct { // the message variables as a JSON document; to be valid, the root of the document must be an // object, e.g. { "a": "foo" }. [ "foo" ] would not be valid. Variables string `protobuf:"bytes,5,opt,name=variables,proto3" json:"variables,omitempty"` + // the tenant id of the message + TenantId string `protobuf:"bytes,6,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *PublishMessageRequest) Reset() { *x = PublishMessageRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[32] + mi := &file_gateway_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2468,7 +2775,7 @@ func (x *PublishMessageRequest) String() string { func (*PublishMessageRequest) ProtoMessage() {} func (x *PublishMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[32] + mi := &file_gateway_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2481,7 +2788,7 @@ func (x *PublishMessageRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PublishMessageRequest.ProtoReflect.Descriptor instead. func (*PublishMessageRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{32} + return file_gateway_proto_rawDescGZIP(), []int{34} } func (x *PublishMessageRequest) GetName() string { @@ -2519,6 +2826,13 @@ func (x *PublishMessageRequest) GetVariables() string { return "" } +func (x *PublishMessageRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type PublishMessageResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2526,12 +2840,14 @@ type PublishMessageResponse struct { // the unique ID of the message that was published Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + // the tenant id of the message + TenantId string `protobuf:"bytes,2,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *PublishMessageResponse) Reset() { *x = PublishMessageResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[33] + mi := &file_gateway_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2544,7 +2860,7 @@ func (x *PublishMessageResponse) String() string { func (*PublishMessageResponse) ProtoMessage() {} func (x *PublishMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[33] + mi := &file_gateway_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2557,7 +2873,7 @@ func (x *PublishMessageResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PublishMessageResponse.ProtoReflect.Descriptor instead. func (*PublishMessageResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{33} + return file_gateway_proto_rawDescGZIP(), []int{35} } func (x *PublishMessageResponse) GetKey() int64 { @@ -2567,6 +2883,13 @@ func (x *PublishMessageResponse) GetKey() int64 { return 0 } +func (x *PublishMessageResponse) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type ResolveIncidentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2579,7 +2902,7 @@ type ResolveIncidentRequest struct { func (x *ResolveIncidentRequest) Reset() { *x = ResolveIncidentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[34] + mi := &file_gateway_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2592,7 +2915,7 @@ func (x *ResolveIncidentRequest) String() string { func (*ResolveIncidentRequest) ProtoMessage() {} func (x *ResolveIncidentRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[34] + mi := &file_gateway_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2605,7 +2928,7 @@ func (x *ResolveIncidentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveIncidentRequest.ProtoReflect.Descriptor instead. func (*ResolveIncidentRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{34} + return file_gateway_proto_rawDescGZIP(), []int{36} } func (x *ResolveIncidentRequest) GetIncidentKey() int64 { @@ -2624,7 +2947,7 @@ type ResolveIncidentResponse struct { func (x *ResolveIncidentResponse) Reset() { *x = ResolveIncidentResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[35] + mi := &file_gateway_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2637,7 +2960,7 @@ func (x *ResolveIncidentResponse) String() string { func (*ResolveIncidentResponse) ProtoMessage() {} func (x *ResolveIncidentResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[35] + mi := &file_gateway_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2650,7 +2973,7 @@ func (x *ResolveIncidentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveIncidentResponse.ProtoReflect.Descriptor instead. func (*ResolveIncidentResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{35} + return file_gateway_proto_rawDescGZIP(), []int{37} } type TopologyRequest struct { @@ -2662,7 +2985,7 @@ type TopologyRequest struct { func (x *TopologyRequest) Reset() { *x = TopologyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[36] + mi := &file_gateway_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2675,7 +2998,7 @@ func (x *TopologyRequest) String() string { func (*TopologyRequest) ProtoMessage() {} func (x *TopologyRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[36] + mi := &file_gateway_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2688,7 +3011,7 @@ func (x *TopologyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TopologyRequest.ProtoReflect.Descriptor instead. func (*TopologyRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{36} + return file_gateway_proto_rawDescGZIP(), []int{38} } type TopologyResponse struct { @@ -2711,7 +3034,7 @@ type TopologyResponse struct { func (x *TopologyResponse) Reset() { *x = TopologyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[37] + mi := &file_gateway_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2724,7 +3047,7 @@ func (x *TopologyResponse) String() string { func (*TopologyResponse) ProtoMessage() {} func (x *TopologyResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[37] + mi := &file_gateway_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2737,7 +3060,7 @@ func (x *TopologyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TopologyResponse.ProtoReflect.Descriptor instead. func (*TopologyResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{37} + return file_gateway_proto_rawDescGZIP(), []int{39} } func (x *TopologyResponse) GetBrokers() []*BrokerInfo { @@ -2795,7 +3118,7 @@ type BrokerInfo struct { func (x *BrokerInfo) Reset() { *x = BrokerInfo{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[38] + mi := &file_gateway_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2808,7 +3131,7 @@ func (x *BrokerInfo) String() string { func (*BrokerInfo) ProtoMessage() {} func (x *BrokerInfo) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[38] + mi := &file_gateway_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2821,7 +3144,7 @@ func (x *BrokerInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BrokerInfo.ProtoReflect.Descriptor instead. func (*BrokerInfo) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{38} + return file_gateway_proto_rawDescGZIP(), []int{40} } func (x *BrokerInfo) GetNodeId() int32 { @@ -2875,7 +3198,7 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[39] + mi := &file_gateway_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2888,7 +3211,7 @@ func (x *Partition) String() string { func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[39] + mi := &file_gateway_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2901,7 +3224,7 @@ func (x *Partition) ProtoReflect() protoreflect.Message { // Deprecated: Use Partition.ProtoReflect.Descriptor instead. func (*Partition) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{39} + return file_gateway_proto_rawDescGZIP(), []int{41} } func (x *Partition) GetPartitionId() int32 { @@ -2939,7 +3262,7 @@ type UpdateJobRetriesRequest struct { func (x *UpdateJobRetriesRequest) Reset() { *x = UpdateJobRetriesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[40] + mi := &file_gateway_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2952,7 +3275,7 @@ func (x *UpdateJobRetriesRequest) String() string { func (*UpdateJobRetriesRequest) ProtoMessage() {} func (x *UpdateJobRetriesRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[40] + mi := &file_gateway_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2965,7 +3288,7 @@ func (x *UpdateJobRetriesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateJobRetriesRequest.ProtoReflect.Descriptor instead. func (*UpdateJobRetriesRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{40} + return file_gateway_proto_rawDescGZIP(), []int{42} } func (x *UpdateJobRetriesRequest) GetJobKey() int64 { @@ -2991,7 +3314,7 @@ type UpdateJobRetriesResponse struct { func (x *UpdateJobRetriesResponse) Reset() { *x = UpdateJobRetriesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[41] + mi := &file_gateway_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3004,7 +3327,7 @@ func (x *UpdateJobRetriesResponse) String() string { func (*UpdateJobRetriesResponse) ProtoMessage() {} func (x *UpdateJobRetriesResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[41] + mi := &file_gateway_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3017,7 +3340,102 @@ func (x *UpdateJobRetriesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateJobRetriesResponse.ProtoReflect.Descriptor instead. func (*UpdateJobRetriesResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{41} + return file_gateway_proto_rawDescGZIP(), []int{43} +} + +type UpdateJobTimeoutRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the unique job identifier, as obtained from ActivateJobsResponse + JobKey int64 `protobuf:"varint,1,opt,name=jobKey,proto3" json:"jobKey,omitempty"` + // the duration of the new timeout in ms, starting from the current moment + Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *UpdateJobTimeoutRequest) Reset() { + *x = UpdateJobTimeoutRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateJobTimeoutRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateJobTimeoutRequest) ProtoMessage() {} + +func (x *UpdateJobTimeoutRequest) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateJobTimeoutRequest.ProtoReflect.Descriptor instead. +func (*UpdateJobTimeoutRequest) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{44} +} + +func (x *UpdateJobTimeoutRequest) GetJobKey() int64 { + if x != nil { + return x.JobKey + } + return 0 +} + +func (x *UpdateJobTimeoutRequest) GetTimeout() int64 { + if x != nil { + return x.Timeout + } + return 0 +} + +type UpdateJobTimeoutResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateJobTimeoutResponse) Reset() { + *x = UpdateJobTimeoutResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateJobTimeoutResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateJobTimeoutResponse) ProtoMessage() {} + +func (x *UpdateJobTimeoutResponse) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateJobTimeoutResponse.ProtoReflect.Descriptor instead. +func (*UpdateJobTimeoutResponse) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{45} } type SetVariablesRequest struct { @@ -3045,7 +3463,7 @@ type SetVariablesRequest struct { func (x *SetVariablesRequest) Reset() { *x = SetVariablesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[42] + mi := &file_gateway_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3058,7 +3476,7 @@ func (x *SetVariablesRequest) String() string { func (*SetVariablesRequest) ProtoMessage() {} func (x *SetVariablesRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[42] + mi := &file_gateway_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3071,7 +3489,7 @@ func (x *SetVariablesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetVariablesRequest.ProtoReflect.Descriptor instead. func (*SetVariablesRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{42} + return file_gateway_proto_rawDescGZIP(), []int{46} } func (x *SetVariablesRequest) GetElementInstanceKey() int64 { @@ -3107,7 +3525,7 @@ type SetVariablesResponse struct { func (x *SetVariablesResponse) Reset() { *x = SetVariablesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[43] + mi := &file_gateway_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3120,7 +3538,7 @@ func (x *SetVariablesResponse) String() string { func (*SetVariablesResponse) ProtoMessage() {} func (x *SetVariablesResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[43] + mi := &file_gateway_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3133,7 +3551,7 @@ func (x *SetVariablesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetVariablesResponse.ProtoReflect.Descriptor instead. func (*SetVariablesResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{43} + return file_gateway_proto_rawDescGZIP(), []int{47} } func (x *SetVariablesResponse) GetKey() int64 { @@ -3160,7 +3578,7 @@ type ModifyProcessInstanceRequest struct { func (x *ModifyProcessInstanceRequest) Reset() { *x = ModifyProcessInstanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[44] + mi := &file_gateway_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3173,7 +3591,7 @@ func (x *ModifyProcessInstanceRequest) String() string { func (*ModifyProcessInstanceRequest) ProtoMessage() {} func (x *ModifyProcessInstanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[44] + mi := &file_gateway_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3186,7 +3604,7 @@ func (x *ModifyProcessInstanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyProcessInstanceRequest.ProtoReflect.Descriptor instead. func (*ModifyProcessInstanceRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{44} + return file_gateway_proto_rawDescGZIP(), []int{48} } func (x *ModifyProcessInstanceRequest) GetProcessInstanceKey() int64 { @@ -3219,7 +3637,7 @@ type ModifyProcessInstanceResponse struct { func (x *ModifyProcessInstanceResponse) Reset() { *x = ModifyProcessInstanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[45] + mi := &file_gateway_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3232,7 +3650,7 @@ func (x *ModifyProcessInstanceResponse) String() string { func (*ModifyProcessInstanceResponse) ProtoMessage() {} func (x *ModifyProcessInstanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[45] + mi := &file_gateway_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3245,7 +3663,102 @@ func (x *ModifyProcessInstanceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyProcessInstanceResponse.ProtoReflect.Descriptor instead. func (*ModifyProcessInstanceResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{45} + return file_gateway_proto_rawDescGZIP(), []int{49} +} + +type MigrateProcessInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // key of the process instance to migrate + ProcessInstanceKey int64 `protobuf:"varint,1,opt,name=processInstanceKey,proto3" json:"processInstanceKey,omitempty"` + // the migration plan that defines target process and element mappings + MigrationPlan *MigrateProcessInstanceRequest_MigrationPlan `protobuf:"bytes,2,opt,name=migrationPlan,proto3" json:"migrationPlan,omitempty"` +} + +func (x *MigrateProcessInstanceRequest) Reset() { + *x = MigrateProcessInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MigrateProcessInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MigrateProcessInstanceRequest) ProtoMessage() {} + +func (x *MigrateProcessInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MigrateProcessInstanceRequest.ProtoReflect.Descriptor instead. +func (*MigrateProcessInstanceRequest) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{50} +} + +func (x *MigrateProcessInstanceRequest) GetProcessInstanceKey() int64 { + if x != nil { + return x.ProcessInstanceKey + } + return 0 +} + +func (x *MigrateProcessInstanceRequest) GetMigrationPlan() *MigrateProcessInstanceRequest_MigrationPlan { + if x != nil { + return x.MigrationPlan + } + return nil +} + +type MigrateProcessInstanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MigrateProcessInstanceResponse) Reset() { + *x = MigrateProcessInstanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MigrateProcessInstanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MigrateProcessInstanceResponse) ProtoMessage() {} + +func (x *MigrateProcessInstanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MigrateProcessInstanceResponse.ProtoReflect.Descriptor instead. +func (*MigrateProcessInstanceResponse) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{51} } type DeleteResourceRequest struct { @@ -3254,14 +3767,14 @@ type DeleteResourceRequest struct { unknownFields protoimpl.UnknownFields // The key of the resource that should be deleted. This can either be the key - // of a process definition, or the key of a decision requirements definition. + // of a process definition, the key of a decision requirements definition or the key of a form. ResourceKey int64 `protobuf:"varint,1,opt,name=resourceKey,proto3" json:"resourceKey,omitempty"` } func (x *DeleteResourceRequest) Reset() { *x = DeleteResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[46] + mi := &file_gateway_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3274,7 +3787,7 @@ func (x *DeleteResourceRequest) String() string { func (*DeleteResourceRequest) ProtoMessage() {} func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[46] + mi := &file_gateway_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3287,7 +3800,7 @@ func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteResourceRequest.ProtoReflect.Descriptor instead. func (*DeleteResourceRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{46} + return file_gateway_proto_rawDescGZIP(), []int{52} } func (x *DeleteResourceRequest) GetResourceKey() int64 { @@ -3306,7 +3819,7 @@ type DeleteResourceResponse struct { func (x *DeleteResourceResponse) Reset() { *x = DeleteResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[47] + mi := &file_gateway_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3319,7 +3832,7 @@ func (x *DeleteResourceResponse) String() string { func (*DeleteResourceResponse) ProtoMessage() {} func (x *DeleteResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[47] + mi := &file_gateway_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3332,7 +3845,7 @@ func (x *DeleteResourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteResourceResponse.ProtoReflect.Descriptor instead. func (*DeleteResourceResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{47} + return file_gateway_proto_rawDescGZIP(), []int{53} } type BroadcastSignalRequest struct { @@ -3345,12 +3858,14 @@ type BroadcastSignalRequest struct { // the signal variables as a JSON document; to be valid, the root of the document must be an // object, e.g. { "a": "foo" }. [ "foo" ] would not be valid. Variables string `protobuf:"bytes,2,opt,name=variables,proto3" json:"variables,omitempty"` + // the id of the tenant that owns the signal. + TenantId string `protobuf:"bytes,3,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *BroadcastSignalRequest) Reset() { *x = BroadcastSignalRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[48] + mi := &file_gateway_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3363,7 +3878,7 @@ func (x *BroadcastSignalRequest) String() string { func (*BroadcastSignalRequest) ProtoMessage() {} func (x *BroadcastSignalRequest) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[48] + mi := &file_gateway_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3376,7 +3891,7 @@ func (x *BroadcastSignalRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BroadcastSignalRequest.ProtoReflect.Descriptor instead. func (*BroadcastSignalRequest) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{48} + return file_gateway_proto_rawDescGZIP(), []int{54} } func (x *BroadcastSignalRequest) GetSignalName() string { @@ -3393,6 +3908,13 @@ func (x *BroadcastSignalRequest) GetVariables() string { return "" } +func (x *BroadcastSignalRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type BroadcastSignalResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3400,12 +3922,14 @@ type BroadcastSignalResponse struct { // the unique ID of the signal that was broadcasted. Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + // the tenant id of the signal that was broadcasted. + TenantId string `protobuf:"bytes,2,opt,name=tenantId,proto3" json:"tenantId,omitempty"` } func (x *BroadcastSignalResponse) Reset() { *x = BroadcastSignalResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[49] + mi := &file_gateway_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3418,7 +3942,7 @@ func (x *BroadcastSignalResponse) String() string { func (*BroadcastSignalResponse) ProtoMessage() {} func (x *BroadcastSignalResponse) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[49] + mi := &file_gateway_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3431,7 +3955,7 @@ func (x *BroadcastSignalResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BroadcastSignalResponse.ProtoReflect.Descriptor instead. func (*BroadcastSignalResponse) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{49} + return file_gateway_proto_rawDescGZIP(), []int{55} } func (x *BroadcastSignalResponse) GetKey() int64 { @@ -3441,6 +3965,13 @@ func (x *BroadcastSignalResponse) GetKey() int64 { return 0 } +func (x *BroadcastSignalResponse) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + type ModifyProcessInstanceRequest_ActivateInstruction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3459,7 +3990,7 @@ type ModifyProcessInstanceRequest_ActivateInstruction struct { func (x *ModifyProcessInstanceRequest_ActivateInstruction) Reset() { *x = ModifyProcessInstanceRequest_ActivateInstruction{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[50] + mi := &file_gateway_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3472,7 +4003,7 @@ func (x *ModifyProcessInstanceRequest_ActivateInstruction) String() string { func (*ModifyProcessInstanceRequest_ActivateInstruction) ProtoMessage() {} func (x *ModifyProcessInstanceRequest_ActivateInstruction) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[50] + mi := &file_gateway_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3485,7 +4016,7 @@ func (x *ModifyProcessInstanceRequest_ActivateInstruction) ProtoReflect() protor // Deprecated: Use ModifyProcessInstanceRequest_ActivateInstruction.ProtoReflect.Descriptor instead. func (*ModifyProcessInstanceRequest_ActivateInstruction) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{44, 0} + return file_gateway_proto_rawDescGZIP(), []int{48, 0} } func (x *ModifyProcessInstanceRequest_ActivateInstruction) GetElementId() string { @@ -3528,7 +4059,7 @@ type ModifyProcessInstanceRequest_VariableInstruction struct { func (x *ModifyProcessInstanceRequest_VariableInstruction) Reset() { *x = ModifyProcessInstanceRequest_VariableInstruction{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[51] + mi := &file_gateway_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3541,7 +4072,7 @@ func (x *ModifyProcessInstanceRequest_VariableInstruction) String() string { func (*ModifyProcessInstanceRequest_VariableInstruction) ProtoMessage() {} func (x *ModifyProcessInstanceRequest_VariableInstruction) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[51] + mi := &file_gateway_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3554,7 +4085,7 @@ func (x *ModifyProcessInstanceRequest_VariableInstruction) ProtoReflect() protor // Deprecated: Use ModifyProcessInstanceRequest_VariableInstruction.ProtoReflect.Descriptor instead. func (*ModifyProcessInstanceRequest_VariableInstruction) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{44, 1} + return file_gateway_proto_rawDescGZIP(), []int{48, 1} } func (x *ModifyProcessInstanceRequest_VariableInstruction) GetVariables() string { @@ -3583,7 +4114,7 @@ type ModifyProcessInstanceRequest_TerminateInstruction struct { func (x *ModifyProcessInstanceRequest_TerminateInstruction) Reset() { *x = ModifyProcessInstanceRequest_TerminateInstruction{} if protoimpl.UnsafeEnabled { - mi := &file_gateway_proto_msgTypes[52] + mi := &file_gateway_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3596,7 +4127,7 @@ func (x *ModifyProcessInstanceRequest_TerminateInstruction) String() string { func (*ModifyProcessInstanceRequest_TerminateInstruction) ProtoMessage() {} func (x *ModifyProcessInstanceRequest_TerminateInstruction) ProtoReflect() protoreflect.Message { - mi := &file_gateway_proto_msgTypes[52] + mi := &file_gateway_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3609,7 +4140,7 @@ func (x *ModifyProcessInstanceRequest_TerminateInstruction) ProtoReflect() proto // Deprecated: Use ModifyProcessInstanceRequest_TerminateInstruction.ProtoReflect.Descriptor instead. func (*ModifyProcessInstanceRequest_TerminateInstruction) Descriptor() ([]byte, []int) { - return file_gateway_proto_rawDescGZIP(), []int{44, 2} + return file_gateway_proto_rawDescGZIP(), []int{48, 2} } func (x *ModifyProcessInstanceRequest_TerminateInstruction) GetElementInstanceKey() int64 { @@ -3619,97 +4150,254 @@ func (x *ModifyProcessInstanceRequest_TerminateInstruction) GetElementInstanceKe return 0 } +type MigrateProcessInstanceRequest_MigrationPlan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the key of process definition to migrate the process instance to + TargetProcessDefinitionKey int64 `protobuf:"varint,1,opt,name=targetProcessDefinitionKey,proto3" json:"targetProcessDefinitionKey,omitempty"` + // the mapping instructions describe how to map elements from the source process definition to the target process definition + MappingInstructions []*MigrateProcessInstanceRequest_MappingInstruction `protobuf:"bytes,2,rep,name=mappingInstructions,proto3" json:"mappingInstructions,omitempty"` +} + +func (x *MigrateProcessInstanceRequest_MigrationPlan) Reset() { + *x = MigrateProcessInstanceRequest_MigrationPlan{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MigrateProcessInstanceRequest_MigrationPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MigrateProcessInstanceRequest_MigrationPlan) ProtoMessage() {} + +func (x *MigrateProcessInstanceRequest_MigrationPlan) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MigrateProcessInstanceRequest_MigrationPlan.ProtoReflect.Descriptor instead. +func (*MigrateProcessInstanceRequest_MigrationPlan) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{50, 0} +} + +func (x *MigrateProcessInstanceRequest_MigrationPlan) GetTargetProcessDefinitionKey() int64 { + if x != nil { + return x.TargetProcessDefinitionKey + } + return 0 +} + +func (x *MigrateProcessInstanceRequest_MigrationPlan) GetMappingInstructions() []*MigrateProcessInstanceRequest_MappingInstruction { + if x != nil { + return x.MappingInstructions + } + return nil +} + +type MigrateProcessInstanceRequest_MappingInstruction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the element id to migrate from + SourceElementId string `protobuf:"bytes,1,opt,name=sourceElementId,proto3" json:"sourceElementId,omitempty"` + // the element id to migrate into + TargetElementId string `protobuf:"bytes,2,opt,name=targetElementId,proto3" json:"targetElementId,omitempty"` +} + +func (x *MigrateProcessInstanceRequest_MappingInstruction) Reset() { + *x = MigrateProcessInstanceRequest_MappingInstruction{} + if protoimpl.UnsafeEnabled { + mi := &file_gateway_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MigrateProcessInstanceRequest_MappingInstruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MigrateProcessInstanceRequest_MappingInstruction) ProtoMessage() {} + +func (x *MigrateProcessInstanceRequest_MappingInstruction) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MigrateProcessInstanceRequest_MappingInstruction.ProtoReflect.Descriptor instead. +func (*MigrateProcessInstanceRequest_MappingInstruction) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{50, 1} +} + +func (x *MigrateProcessInstanceRequest_MappingInstruction) GetSourceElementId() string { + if x != nil { + return x.SourceElementId + } + return "" +} + +func (x *MigrateProcessInstanceRequest_MappingInstruction) GetTargetElementId() string { + if x != nil { + return x.TargetElementId + } + return "" +} + var File_gateway_proto protoreflect.FileDescriptor var file_gateway_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x22, 0xd7, 0x01, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, - 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, - 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x2c, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4a, - 0x6f, 0x62, 0x73, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, - 0x0d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x4a, 0x0a, 0x14, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, - 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x22, 0xda, 0x03, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, - 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x24, - 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x18, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, + 0x6c, 0x22, 0xa6, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x13, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x4a, + 0x6f, 0x62, 0x73, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x54, 0x6f, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, + 0x64, 0x73, 0x22, 0x4a, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x6a, 0x6f, + 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x22, 0xf6, + 0x03, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, + 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x18, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb5, 0x02, 0x0a, 0x1c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, - 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, - 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, - 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, - 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, - 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6a, 0x6f, 0x62, - 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x99, 0x02, 0x0a, 0x1c, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, - 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, - 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x11, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x47, 0x0a, 0x27, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1c, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xc3, 0x01, - 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, + 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x67, + 0x0a, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x27, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xdf, 0x01, 0x0a, + 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, + 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, + 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xc2, + 0x01, 0x0a, 0x26, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x22, 0x87, 0x02, 0x0a, 0x27, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, @@ -3720,73 +4408,53 @@ var file_gateway_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x4b, 0x65, 0x79, 0x22, 0xc2, 0x01, 0x0a, 0x26, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, - 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x65, 0x74, 0x63, 0x68, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x27, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x79, 0x0a, 0x17, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x22, 0xed, 0x03, 0x0a, 0x18, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x44, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, - 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, - 0x0a, 0x16, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, - 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, - 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, - 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x65, 0x76, 0x61, 0x6c, - 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x65, 0x76, 0x61, 0x6c, 0x75, - 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, - 0x10, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0x8e, 0x03, 0x0a, 0x11, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, + 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x95, 0x01, + 0x0a, 0x17, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x89, 0x04, 0x0a, 0x18, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x16, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x12, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x65, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, + 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0xaa, 0x03, 0x0a, 0x11, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x63, @@ -3811,416 +4479,507 @@ var file_gateway_proto_rawDesc = []byte{ 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x0f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x22, 0x70, 0x0a, 0x16, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x77, 0x0a, 0x17, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa2, 0x01, - 0x0a, 0x13, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x55, 0x0a, 0x10, 0x65, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, - 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x10, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 0x22, 0x60, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4e, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x02, 0x18, 0x01, 0x22, 0x6e, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x3f, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x70, + 0x0a, 0x16, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x77, 0x0a, 0x17, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x13, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x75, 0x6c, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x75, + 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x55, 0x0a, 0x10, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x10, 0x65, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x60, + 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, + 0x22, 0x4e, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x02, 0x18, 0x01, + 0x22, 0x6e, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x09, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, + 0x22, 0x6d, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, + 0x38, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x16, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x49, 0x64, 0x22, 0xb5, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x3a, 0x02, 0x18, 0x01, 0x22, 0x51, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x22, 0x6a, 0x0a, 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, - 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xff, 0x01, - 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x48, 0x00, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, - 0x14, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, - 0xa9, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, 0x6d, 0x6e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x02, 0x0a, 0x10, - 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x40, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x14, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6d, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x0a, + 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc5, 0x01, 0x0a, 0x0f, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, + 0x0a, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x70, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, + 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x49, 0x64, 0x22, 0xb2, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6d, 0x6e, 0x44, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x19, - 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x19, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x4b, 0x65, 0x79, 0x22, 0x96, 0x02, 0x0a, 0x1c, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x19, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x4b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x19, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, + 0x64, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xb2, 0x02, 0x0a, 0x1c, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x19, 0x64, 0x6d, 0x6e, 0x44, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x64, 0x6d, 0x6e, + 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1b, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1b, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x64, 0x6d, 0x6e, 0x44, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x38, 0x0a, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa8, 0x01, - 0x0a, 0x0e, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, - 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x46, 0x61, 0x69, 0x6c, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x11, - 0x54, 0x68, 0x72, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x68, 0x72, - 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xaf, 0x01, 0x0a, 0x15, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, - 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, - 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, - 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x3a, 0x0a, - 0x16, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x69, 0x6e, - 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x10, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, - 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x64, 0x6d, 0x6e, + 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9a, 0x01, 0x0a, + 0x0c, 0x46, 0x6f, 0x72, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x6d, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x66, 0x6f, 0x72, 0x6d, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x0e, 0x46, 0x61, + 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6a, 0x6f, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, + 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, + 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, + 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x54, 0x68, 0x72, 0x6f, + 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6a, + 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x68, 0x72, 0x6f, 0x77, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x15, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x72, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x16, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x3a, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x69, + 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x19, 0x0a, + 0x17, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x10, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0x0a, 0x0a, 0x42, + 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x62, 0x72, 0x6f, - 0x6b, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x72, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x26, - 0x0a, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0x0a, 0x0a, 0x42, 0x72, 0x6f, 0x6b, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xbb, 0x02, 0x0a, - 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x12, 0x49, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0x3d, 0x0a, 0x13, - 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x52, - 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x22, 0x3d, 0x0a, 0x15, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, - 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x41, 0x44, 0x10, 0x02, 0x22, 0x4b, 0x0a, 0x17, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0x28, - 0x0a, 0x14, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xc6, 0x05, 0x0a, 0x1c, 0x4d, 0x6f, 0x64, - 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x76, 0x0a, 0x14, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, - 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x79, 0x0a, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x49, 0x6e, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x43, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xeb, 0x01, 0x0a, - 0x13, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x1a, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x45, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x76, 0x0a, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x42, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x4d, 0x0a, 0x13, 0x56, 0x61, + 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xbb, 0x02, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x43, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, 0x6b, + 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x22, 0x3d, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, + 0x6b, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x41, 0x44, 0x45, + 0x52, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x52, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x22, + 0x3d, 0x0a, 0x15, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x6f, 0x6b, + 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, + 0x54, 0x48, 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, + 0x48, 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x41, 0x44, 0x10, 0x02, 0x22, 0x4b, + 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x6f, 0x62, + 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, + 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x79, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0x28, 0x0a, 0x14, 0x53, + 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xc6, 0x05, 0x0a, 0x1c, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x76, 0x0a, 0x14, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x79, + 0x0a, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xeb, 0x01, 0x0a, 0x13, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x3e, 0x0a, 0x1a, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x1a, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, + 0x76, 0x0a, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x1a, 0x46, 0x0a, 0x14, 0x54, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, - 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x39, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x18, 0x0a, - 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x16, 0x42, 0x72, 0x6f, 0x61, 0x64, - 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, - 0x2b, 0x0a, 0x17, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0x86, 0x0f, 0x0a, + 0x6e, 0x52, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x4d, 0x0a, 0x13, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x1a, 0x46, 0x0a, 0x14, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, + 0x0a, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1f, + 0x0a, 0x1d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xe6, 0x03, 0x0a, 0x1d, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x63, 0x0a, 0x0d, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c, + 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x0d, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x1a, 0xc5, 0x01, 0x0a, 0x0d, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x3e, 0x0a, 0x1a, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x74, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x68, + 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x28, + 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x15, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x72, 0x0a, 0x16, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x17, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x32, 0xdb, 0x11, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x61, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x15, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x24, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x67, 0x0a, 0x13, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, + 0x62, 0x73, 0x12, 0x2c, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, + 0x24, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x98, 0x01, 0x0a, 0x1f, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, - 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x98, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x39, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, - 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0d, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, - 0x12, 0x65, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x27, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x61, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4a, - 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0a, 0x54, 0x68, 0x72, - 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x77, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x54, 0x68, 0x72, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x65, 0x0a, 0x0e, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, + 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x23, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x77, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, + 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x27, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x0f, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x28, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, + 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, + 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x12, 0x21, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x15, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x0f, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x28, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x53, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x63, 0x61, 0x6d, 0x75, - 0x6e, 0x64, 0x61, 0x2e, 0x7a, 0x65, 0x65, 0x62, 0x65, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x00, 0x5a, 0x05, 0x2e, 0x2f, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x7a, 0x0a, 0x15, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, + 0x16, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x29, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x68, 0x0a, 0x0f, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x0a, 0x21, 0x69, 0x6f, + 0x2e, 0x63, 0x61, 0x6d, 0x75, 0x6e, 0x64, 0x61, 0x2e, 0x7a, 0x65, 0x65, 0x62, 0x65, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, + 0x00, 0x5a, 0x05, 0x2e, 0x2f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4236,127 +4995,144 @@ func file_gateway_proto_rawDescGZIP() []byte { } var file_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 53) +var file_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 61) var file_gateway_proto_goTypes = []interface{}{ (Partition_PartitionBrokerRole)(0), // 0: gateway_protocol.Partition.PartitionBrokerRole (Partition_PartitionBrokerHealth)(0), // 1: gateway_protocol.Partition.PartitionBrokerHealth - (*ActivateJobsRequest)(nil), // 2: gateway_protocol.ActivateJobsRequest - (*ActivateJobsResponse)(nil), // 3: gateway_protocol.ActivateJobsResponse - (*ActivatedJob)(nil), // 4: gateway_protocol.ActivatedJob - (*CancelProcessInstanceRequest)(nil), // 5: gateway_protocol.CancelProcessInstanceRequest - (*CancelProcessInstanceResponse)(nil), // 6: gateway_protocol.CancelProcessInstanceResponse - (*CompleteJobRequest)(nil), // 7: gateway_protocol.CompleteJobRequest - (*CompleteJobResponse)(nil), // 8: gateway_protocol.CompleteJobResponse - (*CreateProcessInstanceRequest)(nil), // 9: gateway_protocol.CreateProcessInstanceRequest - (*ProcessInstanceCreationStartInstruction)(nil), // 10: gateway_protocol.ProcessInstanceCreationStartInstruction - (*CreateProcessInstanceResponse)(nil), // 11: gateway_protocol.CreateProcessInstanceResponse - (*CreateProcessInstanceWithResultRequest)(nil), // 12: gateway_protocol.CreateProcessInstanceWithResultRequest - (*CreateProcessInstanceWithResultResponse)(nil), // 13: gateway_protocol.CreateProcessInstanceWithResultResponse - (*EvaluateDecisionRequest)(nil), // 14: gateway_protocol.EvaluateDecisionRequest - (*EvaluateDecisionResponse)(nil), // 15: gateway_protocol.EvaluateDecisionResponse - (*EvaluatedDecision)(nil), // 16: gateway_protocol.EvaluatedDecision - (*EvaluatedDecisionInput)(nil), // 17: gateway_protocol.EvaluatedDecisionInput - (*EvaluatedDecisionOutput)(nil), // 18: gateway_protocol.EvaluatedDecisionOutput - (*MatchedDecisionRule)(nil), // 19: gateway_protocol.MatchedDecisionRule - (*DeployProcessRequest)(nil), // 20: gateway_protocol.DeployProcessRequest - (*ProcessRequestObject)(nil), // 21: gateway_protocol.ProcessRequestObject - (*DeployProcessResponse)(nil), // 22: gateway_protocol.DeployProcessResponse - (*DeployResourceRequest)(nil), // 23: gateway_protocol.DeployResourceRequest - (*Resource)(nil), // 24: gateway_protocol.Resource - (*DeployResourceResponse)(nil), // 25: gateway_protocol.DeployResourceResponse - (*Deployment)(nil), // 26: gateway_protocol.Deployment - (*ProcessMetadata)(nil), // 27: gateway_protocol.ProcessMetadata - (*DecisionMetadata)(nil), // 28: gateway_protocol.DecisionMetadata - (*DecisionRequirementsMetadata)(nil), // 29: gateway_protocol.DecisionRequirementsMetadata - (*FailJobRequest)(nil), // 30: gateway_protocol.FailJobRequest - (*FailJobResponse)(nil), // 31: gateway_protocol.FailJobResponse - (*ThrowErrorRequest)(nil), // 32: gateway_protocol.ThrowErrorRequest - (*ThrowErrorResponse)(nil), // 33: gateway_protocol.ThrowErrorResponse - (*PublishMessageRequest)(nil), // 34: gateway_protocol.PublishMessageRequest - (*PublishMessageResponse)(nil), // 35: gateway_protocol.PublishMessageResponse - (*ResolveIncidentRequest)(nil), // 36: gateway_protocol.ResolveIncidentRequest - (*ResolveIncidentResponse)(nil), // 37: gateway_protocol.ResolveIncidentResponse - (*TopologyRequest)(nil), // 38: gateway_protocol.TopologyRequest - (*TopologyResponse)(nil), // 39: gateway_protocol.TopologyResponse - (*BrokerInfo)(nil), // 40: gateway_protocol.BrokerInfo - (*Partition)(nil), // 41: gateway_protocol.Partition - (*UpdateJobRetriesRequest)(nil), // 42: gateway_protocol.UpdateJobRetriesRequest - (*UpdateJobRetriesResponse)(nil), // 43: gateway_protocol.UpdateJobRetriesResponse - (*SetVariablesRequest)(nil), // 44: gateway_protocol.SetVariablesRequest - (*SetVariablesResponse)(nil), // 45: gateway_protocol.SetVariablesResponse - (*ModifyProcessInstanceRequest)(nil), // 46: gateway_protocol.ModifyProcessInstanceRequest - (*ModifyProcessInstanceResponse)(nil), // 47: gateway_protocol.ModifyProcessInstanceResponse - (*DeleteResourceRequest)(nil), // 48: gateway_protocol.DeleteResourceRequest - (*DeleteResourceResponse)(nil), // 49: gateway_protocol.DeleteResourceResponse - (*BroadcastSignalRequest)(nil), // 50: gateway_protocol.BroadcastSignalRequest - (*BroadcastSignalResponse)(nil), // 51: gateway_protocol.BroadcastSignalResponse - (*ModifyProcessInstanceRequest_ActivateInstruction)(nil), // 52: gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction - (*ModifyProcessInstanceRequest_VariableInstruction)(nil), // 53: gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction - (*ModifyProcessInstanceRequest_TerminateInstruction)(nil), // 54: gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction + (*StreamActivatedJobsRequest)(nil), // 2: gateway_protocol.StreamActivatedJobsRequest + (*ActivateJobsRequest)(nil), // 3: gateway_protocol.ActivateJobsRequest + (*ActivateJobsResponse)(nil), // 4: gateway_protocol.ActivateJobsResponse + (*ActivatedJob)(nil), // 5: gateway_protocol.ActivatedJob + (*CancelProcessInstanceRequest)(nil), // 6: gateway_protocol.CancelProcessInstanceRequest + (*CancelProcessInstanceResponse)(nil), // 7: gateway_protocol.CancelProcessInstanceResponse + (*CompleteJobRequest)(nil), // 8: gateway_protocol.CompleteJobRequest + (*CompleteJobResponse)(nil), // 9: gateway_protocol.CompleteJobResponse + (*CreateProcessInstanceRequest)(nil), // 10: gateway_protocol.CreateProcessInstanceRequest + (*ProcessInstanceCreationStartInstruction)(nil), // 11: gateway_protocol.ProcessInstanceCreationStartInstruction + (*CreateProcessInstanceResponse)(nil), // 12: gateway_protocol.CreateProcessInstanceResponse + (*CreateProcessInstanceWithResultRequest)(nil), // 13: gateway_protocol.CreateProcessInstanceWithResultRequest + (*CreateProcessInstanceWithResultResponse)(nil), // 14: gateway_protocol.CreateProcessInstanceWithResultResponse + (*EvaluateDecisionRequest)(nil), // 15: gateway_protocol.EvaluateDecisionRequest + (*EvaluateDecisionResponse)(nil), // 16: gateway_protocol.EvaluateDecisionResponse + (*EvaluatedDecision)(nil), // 17: gateway_protocol.EvaluatedDecision + (*EvaluatedDecisionInput)(nil), // 18: gateway_protocol.EvaluatedDecisionInput + (*EvaluatedDecisionOutput)(nil), // 19: gateway_protocol.EvaluatedDecisionOutput + (*MatchedDecisionRule)(nil), // 20: gateway_protocol.MatchedDecisionRule + (*DeployProcessRequest)(nil), // 21: gateway_protocol.DeployProcessRequest + (*ProcessRequestObject)(nil), // 22: gateway_protocol.ProcessRequestObject + (*DeployProcessResponse)(nil), // 23: gateway_protocol.DeployProcessResponse + (*DeployResourceRequest)(nil), // 24: gateway_protocol.DeployResourceRequest + (*Resource)(nil), // 25: gateway_protocol.Resource + (*DeployResourceResponse)(nil), // 26: gateway_protocol.DeployResourceResponse + (*Deployment)(nil), // 27: gateway_protocol.Deployment + (*ProcessMetadata)(nil), // 28: gateway_protocol.ProcessMetadata + (*DecisionMetadata)(nil), // 29: gateway_protocol.DecisionMetadata + (*DecisionRequirementsMetadata)(nil), // 30: gateway_protocol.DecisionRequirementsMetadata + (*FormMetadata)(nil), // 31: gateway_protocol.FormMetadata + (*FailJobRequest)(nil), // 32: gateway_protocol.FailJobRequest + (*FailJobResponse)(nil), // 33: gateway_protocol.FailJobResponse + (*ThrowErrorRequest)(nil), // 34: gateway_protocol.ThrowErrorRequest + (*ThrowErrorResponse)(nil), // 35: gateway_protocol.ThrowErrorResponse + (*PublishMessageRequest)(nil), // 36: gateway_protocol.PublishMessageRequest + (*PublishMessageResponse)(nil), // 37: gateway_protocol.PublishMessageResponse + (*ResolveIncidentRequest)(nil), // 38: gateway_protocol.ResolveIncidentRequest + (*ResolveIncidentResponse)(nil), // 39: gateway_protocol.ResolveIncidentResponse + (*TopologyRequest)(nil), // 40: gateway_protocol.TopologyRequest + (*TopologyResponse)(nil), // 41: gateway_protocol.TopologyResponse + (*BrokerInfo)(nil), // 42: gateway_protocol.BrokerInfo + (*Partition)(nil), // 43: gateway_protocol.Partition + (*UpdateJobRetriesRequest)(nil), // 44: gateway_protocol.UpdateJobRetriesRequest + (*UpdateJobRetriesResponse)(nil), // 45: gateway_protocol.UpdateJobRetriesResponse + (*UpdateJobTimeoutRequest)(nil), // 46: gateway_protocol.UpdateJobTimeoutRequest + (*UpdateJobTimeoutResponse)(nil), // 47: gateway_protocol.UpdateJobTimeoutResponse + (*SetVariablesRequest)(nil), // 48: gateway_protocol.SetVariablesRequest + (*SetVariablesResponse)(nil), // 49: gateway_protocol.SetVariablesResponse + (*ModifyProcessInstanceRequest)(nil), // 50: gateway_protocol.ModifyProcessInstanceRequest + (*ModifyProcessInstanceResponse)(nil), // 51: gateway_protocol.ModifyProcessInstanceResponse + (*MigrateProcessInstanceRequest)(nil), // 52: gateway_protocol.MigrateProcessInstanceRequest + (*MigrateProcessInstanceResponse)(nil), // 53: gateway_protocol.MigrateProcessInstanceResponse + (*DeleteResourceRequest)(nil), // 54: gateway_protocol.DeleteResourceRequest + (*DeleteResourceResponse)(nil), // 55: gateway_protocol.DeleteResourceResponse + (*BroadcastSignalRequest)(nil), // 56: gateway_protocol.BroadcastSignalRequest + (*BroadcastSignalResponse)(nil), // 57: gateway_protocol.BroadcastSignalResponse + (*ModifyProcessInstanceRequest_ActivateInstruction)(nil), // 58: gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction + (*ModifyProcessInstanceRequest_VariableInstruction)(nil), // 59: gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction + (*ModifyProcessInstanceRequest_TerminateInstruction)(nil), // 60: gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction + (*MigrateProcessInstanceRequest_MigrationPlan)(nil), // 61: gateway_protocol.MigrateProcessInstanceRequest.MigrationPlan + (*MigrateProcessInstanceRequest_MappingInstruction)(nil), // 62: gateway_protocol.MigrateProcessInstanceRequest.MappingInstruction } var file_gateway_proto_depIdxs = []int32{ - 4, // 0: gateway_protocol.ActivateJobsResponse.jobs:type_name -> gateway_protocol.ActivatedJob - 10, // 1: gateway_protocol.CreateProcessInstanceRequest.startInstructions:type_name -> gateway_protocol.ProcessInstanceCreationStartInstruction - 9, // 2: gateway_protocol.CreateProcessInstanceWithResultRequest.request:type_name -> gateway_protocol.CreateProcessInstanceRequest - 16, // 3: gateway_protocol.EvaluateDecisionResponse.evaluatedDecisions:type_name -> gateway_protocol.EvaluatedDecision - 19, // 4: gateway_protocol.EvaluatedDecision.matchedRules:type_name -> gateway_protocol.MatchedDecisionRule - 17, // 5: gateway_protocol.EvaluatedDecision.evaluatedInputs:type_name -> gateway_protocol.EvaluatedDecisionInput - 18, // 6: gateway_protocol.MatchedDecisionRule.evaluatedOutputs:type_name -> gateway_protocol.EvaluatedDecisionOutput - 21, // 7: gateway_protocol.DeployProcessRequest.processes:type_name -> gateway_protocol.ProcessRequestObject - 27, // 8: gateway_protocol.DeployProcessResponse.processes:type_name -> gateway_protocol.ProcessMetadata - 24, // 9: gateway_protocol.DeployResourceRequest.resources:type_name -> gateway_protocol.Resource - 26, // 10: gateway_protocol.DeployResourceResponse.deployments:type_name -> gateway_protocol.Deployment - 27, // 11: gateway_protocol.Deployment.process:type_name -> gateway_protocol.ProcessMetadata - 28, // 12: gateway_protocol.Deployment.decision:type_name -> gateway_protocol.DecisionMetadata - 29, // 13: gateway_protocol.Deployment.decisionRequirements:type_name -> gateway_protocol.DecisionRequirementsMetadata - 40, // 14: gateway_protocol.TopologyResponse.brokers:type_name -> gateway_protocol.BrokerInfo - 41, // 15: gateway_protocol.BrokerInfo.partitions:type_name -> gateway_protocol.Partition - 0, // 16: gateway_protocol.Partition.role:type_name -> gateway_protocol.Partition.PartitionBrokerRole - 1, // 17: gateway_protocol.Partition.health:type_name -> gateway_protocol.Partition.PartitionBrokerHealth - 52, // 18: gateway_protocol.ModifyProcessInstanceRequest.activateInstructions:type_name -> gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction - 54, // 19: gateway_protocol.ModifyProcessInstanceRequest.terminateInstructions:type_name -> gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction - 53, // 20: gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction.variableInstructions:type_name -> gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction - 2, // 21: gateway_protocol.Gateway.ActivateJobs:input_type -> gateway_protocol.ActivateJobsRequest - 5, // 22: gateway_protocol.Gateway.CancelProcessInstance:input_type -> gateway_protocol.CancelProcessInstanceRequest - 7, // 23: gateway_protocol.Gateway.CompleteJob:input_type -> gateway_protocol.CompleteJobRequest - 9, // 24: gateway_protocol.Gateway.CreateProcessInstance:input_type -> gateway_protocol.CreateProcessInstanceRequest - 12, // 25: gateway_protocol.Gateway.CreateProcessInstanceWithResult:input_type -> gateway_protocol.CreateProcessInstanceWithResultRequest - 14, // 26: gateway_protocol.Gateway.EvaluateDecision:input_type -> gateway_protocol.EvaluateDecisionRequest - 20, // 27: gateway_protocol.Gateway.DeployProcess:input_type -> gateway_protocol.DeployProcessRequest - 23, // 28: gateway_protocol.Gateway.DeployResource:input_type -> gateway_protocol.DeployResourceRequest - 30, // 29: gateway_protocol.Gateway.FailJob:input_type -> gateway_protocol.FailJobRequest - 32, // 30: gateway_protocol.Gateway.ThrowError:input_type -> gateway_protocol.ThrowErrorRequest - 34, // 31: gateway_protocol.Gateway.PublishMessage:input_type -> gateway_protocol.PublishMessageRequest - 36, // 32: gateway_protocol.Gateway.ResolveIncident:input_type -> gateway_protocol.ResolveIncidentRequest - 44, // 33: gateway_protocol.Gateway.SetVariables:input_type -> gateway_protocol.SetVariablesRequest - 38, // 34: gateway_protocol.Gateway.Topology:input_type -> gateway_protocol.TopologyRequest - 42, // 35: gateway_protocol.Gateway.UpdateJobRetries:input_type -> gateway_protocol.UpdateJobRetriesRequest - 46, // 36: gateway_protocol.Gateway.ModifyProcessInstance:input_type -> gateway_protocol.ModifyProcessInstanceRequest - 48, // 37: gateway_protocol.Gateway.DeleteResource:input_type -> gateway_protocol.DeleteResourceRequest - 50, // 38: gateway_protocol.Gateway.BroadcastSignal:input_type -> gateway_protocol.BroadcastSignalRequest - 3, // 39: gateway_protocol.Gateway.ActivateJobs:output_type -> gateway_protocol.ActivateJobsResponse - 6, // 40: gateway_protocol.Gateway.CancelProcessInstance:output_type -> gateway_protocol.CancelProcessInstanceResponse - 8, // 41: gateway_protocol.Gateway.CompleteJob:output_type -> gateway_protocol.CompleteJobResponse - 11, // 42: gateway_protocol.Gateway.CreateProcessInstance:output_type -> gateway_protocol.CreateProcessInstanceResponse - 13, // 43: gateway_protocol.Gateway.CreateProcessInstanceWithResult:output_type -> gateway_protocol.CreateProcessInstanceWithResultResponse - 15, // 44: gateway_protocol.Gateway.EvaluateDecision:output_type -> gateway_protocol.EvaluateDecisionResponse - 22, // 45: gateway_protocol.Gateway.DeployProcess:output_type -> gateway_protocol.DeployProcessResponse - 25, // 46: gateway_protocol.Gateway.DeployResource:output_type -> gateway_protocol.DeployResourceResponse - 31, // 47: gateway_protocol.Gateway.FailJob:output_type -> gateway_protocol.FailJobResponse - 33, // 48: gateway_protocol.Gateway.ThrowError:output_type -> gateway_protocol.ThrowErrorResponse - 35, // 49: gateway_protocol.Gateway.PublishMessage:output_type -> gateway_protocol.PublishMessageResponse - 37, // 50: gateway_protocol.Gateway.ResolveIncident:output_type -> gateway_protocol.ResolveIncidentResponse - 45, // 51: gateway_protocol.Gateway.SetVariables:output_type -> gateway_protocol.SetVariablesResponse - 39, // 52: gateway_protocol.Gateway.Topology:output_type -> gateway_protocol.TopologyResponse - 43, // 53: gateway_protocol.Gateway.UpdateJobRetries:output_type -> gateway_protocol.UpdateJobRetriesResponse - 47, // 54: gateway_protocol.Gateway.ModifyProcessInstance:output_type -> gateway_protocol.ModifyProcessInstanceResponse - 49, // 55: gateway_protocol.Gateway.DeleteResource:output_type -> gateway_protocol.DeleteResourceResponse - 51, // 56: gateway_protocol.Gateway.BroadcastSignal:output_type -> gateway_protocol.BroadcastSignalResponse - 39, // [39:57] is the sub-list for method output_type - 21, // [21:39] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 5, // 0: gateway_protocol.ActivateJobsResponse.jobs:type_name -> gateway_protocol.ActivatedJob + 11, // 1: gateway_protocol.CreateProcessInstanceRequest.startInstructions:type_name -> gateway_protocol.ProcessInstanceCreationStartInstruction + 10, // 2: gateway_protocol.CreateProcessInstanceWithResultRequest.request:type_name -> gateway_protocol.CreateProcessInstanceRequest + 17, // 3: gateway_protocol.EvaluateDecisionResponse.evaluatedDecisions:type_name -> gateway_protocol.EvaluatedDecision + 20, // 4: gateway_protocol.EvaluatedDecision.matchedRules:type_name -> gateway_protocol.MatchedDecisionRule + 18, // 5: gateway_protocol.EvaluatedDecision.evaluatedInputs:type_name -> gateway_protocol.EvaluatedDecisionInput + 19, // 6: gateway_protocol.MatchedDecisionRule.evaluatedOutputs:type_name -> gateway_protocol.EvaluatedDecisionOutput + 22, // 7: gateway_protocol.DeployProcessRequest.processes:type_name -> gateway_protocol.ProcessRequestObject + 28, // 8: gateway_protocol.DeployProcessResponse.processes:type_name -> gateway_protocol.ProcessMetadata + 25, // 9: gateway_protocol.DeployResourceRequest.resources:type_name -> gateway_protocol.Resource + 27, // 10: gateway_protocol.DeployResourceResponse.deployments:type_name -> gateway_protocol.Deployment + 28, // 11: gateway_protocol.Deployment.process:type_name -> gateway_protocol.ProcessMetadata + 29, // 12: gateway_protocol.Deployment.decision:type_name -> gateway_protocol.DecisionMetadata + 30, // 13: gateway_protocol.Deployment.decisionRequirements:type_name -> gateway_protocol.DecisionRequirementsMetadata + 31, // 14: gateway_protocol.Deployment.form:type_name -> gateway_protocol.FormMetadata + 42, // 15: gateway_protocol.TopologyResponse.brokers:type_name -> gateway_protocol.BrokerInfo + 43, // 16: gateway_protocol.BrokerInfo.partitions:type_name -> gateway_protocol.Partition + 0, // 17: gateway_protocol.Partition.role:type_name -> gateway_protocol.Partition.PartitionBrokerRole + 1, // 18: gateway_protocol.Partition.health:type_name -> gateway_protocol.Partition.PartitionBrokerHealth + 58, // 19: gateway_protocol.ModifyProcessInstanceRequest.activateInstructions:type_name -> gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction + 60, // 20: gateway_protocol.ModifyProcessInstanceRequest.terminateInstructions:type_name -> gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction + 61, // 21: gateway_protocol.MigrateProcessInstanceRequest.migrationPlan:type_name -> gateway_protocol.MigrateProcessInstanceRequest.MigrationPlan + 59, // 22: gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction.variableInstructions:type_name -> gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction + 62, // 23: gateway_protocol.MigrateProcessInstanceRequest.MigrationPlan.mappingInstructions:type_name -> gateway_protocol.MigrateProcessInstanceRequest.MappingInstruction + 3, // 24: gateway_protocol.Gateway.ActivateJobs:input_type -> gateway_protocol.ActivateJobsRequest + 2, // 25: gateway_protocol.Gateway.StreamActivatedJobs:input_type -> gateway_protocol.StreamActivatedJobsRequest + 6, // 26: gateway_protocol.Gateway.CancelProcessInstance:input_type -> gateway_protocol.CancelProcessInstanceRequest + 8, // 27: gateway_protocol.Gateway.CompleteJob:input_type -> gateway_protocol.CompleteJobRequest + 10, // 28: gateway_protocol.Gateway.CreateProcessInstance:input_type -> gateway_protocol.CreateProcessInstanceRequest + 13, // 29: gateway_protocol.Gateway.CreateProcessInstanceWithResult:input_type -> gateway_protocol.CreateProcessInstanceWithResultRequest + 15, // 30: gateway_protocol.Gateway.EvaluateDecision:input_type -> gateway_protocol.EvaluateDecisionRequest + 21, // 31: gateway_protocol.Gateway.DeployProcess:input_type -> gateway_protocol.DeployProcessRequest + 24, // 32: gateway_protocol.Gateway.DeployResource:input_type -> gateway_protocol.DeployResourceRequest + 32, // 33: gateway_protocol.Gateway.FailJob:input_type -> gateway_protocol.FailJobRequest + 34, // 34: gateway_protocol.Gateway.ThrowError:input_type -> gateway_protocol.ThrowErrorRequest + 36, // 35: gateway_protocol.Gateway.PublishMessage:input_type -> gateway_protocol.PublishMessageRequest + 38, // 36: gateway_protocol.Gateway.ResolveIncident:input_type -> gateway_protocol.ResolveIncidentRequest + 48, // 37: gateway_protocol.Gateway.SetVariables:input_type -> gateway_protocol.SetVariablesRequest + 40, // 38: gateway_protocol.Gateway.Topology:input_type -> gateway_protocol.TopologyRequest + 44, // 39: gateway_protocol.Gateway.UpdateJobRetries:input_type -> gateway_protocol.UpdateJobRetriesRequest + 50, // 40: gateway_protocol.Gateway.ModifyProcessInstance:input_type -> gateway_protocol.ModifyProcessInstanceRequest + 52, // 41: gateway_protocol.Gateway.MigrateProcessInstance:input_type -> gateway_protocol.MigrateProcessInstanceRequest + 46, // 42: gateway_protocol.Gateway.UpdateJobTimeout:input_type -> gateway_protocol.UpdateJobTimeoutRequest + 54, // 43: gateway_protocol.Gateway.DeleteResource:input_type -> gateway_protocol.DeleteResourceRequest + 56, // 44: gateway_protocol.Gateway.BroadcastSignal:input_type -> gateway_protocol.BroadcastSignalRequest + 4, // 45: gateway_protocol.Gateway.ActivateJobs:output_type -> gateway_protocol.ActivateJobsResponse + 5, // 46: gateway_protocol.Gateway.StreamActivatedJobs:output_type -> gateway_protocol.ActivatedJob + 7, // 47: gateway_protocol.Gateway.CancelProcessInstance:output_type -> gateway_protocol.CancelProcessInstanceResponse + 9, // 48: gateway_protocol.Gateway.CompleteJob:output_type -> gateway_protocol.CompleteJobResponse + 12, // 49: gateway_protocol.Gateway.CreateProcessInstance:output_type -> gateway_protocol.CreateProcessInstanceResponse + 14, // 50: gateway_protocol.Gateway.CreateProcessInstanceWithResult:output_type -> gateway_protocol.CreateProcessInstanceWithResultResponse + 16, // 51: gateway_protocol.Gateway.EvaluateDecision:output_type -> gateway_protocol.EvaluateDecisionResponse + 23, // 52: gateway_protocol.Gateway.DeployProcess:output_type -> gateway_protocol.DeployProcessResponse + 26, // 53: gateway_protocol.Gateway.DeployResource:output_type -> gateway_protocol.DeployResourceResponse + 33, // 54: gateway_protocol.Gateway.FailJob:output_type -> gateway_protocol.FailJobResponse + 35, // 55: gateway_protocol.Gateway.ThrowError:output_type -> gateway_protocol.ThrowErrorResponse + 37, // 56: gateway_protocol.Gateway.PublishMessage:output_type -> gateway_protocol.PublishMessageResponse + 39, // 57: gateway_protocol.Gateway.ResolveIncident:output_type -> gateway_protocol.ResolveIncidentResponse + 49, // 58: gateway_protocol.Gateway.SetVariables:output_type -> gateway_protocol.SetVariablesResponse + 41, // 59: gateway_protocol.Gateway.Topology:output_type -> gateway_protocol.TopologyResponse + 45, // 60: gateway_protocol.Gateway.UpdateJobRetries:output_type -> gateway_protocol.UpdateJobRetriesResponse + 51, // 61: gateway_protocol.Gateway.ModifyProcessInstance:output_type -> gateway_protocol.ModifyProcessInstanceResponse + 53, // 62: gateway_protocol.Gateway.MigrateProcessInstance:output_type -> gateway_protocol.MigrateProcessInstanceResponse + 47, // 63: gateway_protocol.Gateway.UpdateJobTimeout:output_type -> gateway_protocol.UpdateJobTimeoutResponse + 55, // 64: gateway_protocol.Gateway.DeleteResource:output_type -> gateway_protocol.DeleteResourceResponse + 57, // 65: gateway_protocol.Gateway.BroadcastSignal:output_type -> gateway_protocol.BroadcastSignalResponse + 45, // [45:66] is the sub-list for method output_type + 24, // [24:45] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_gateway_proto_init() } @@ -4366,7 +5142,7 @@ func file_gateway_proto_init() { } if !protoimpl.UnsafeEnabled { file_gateway_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateJobsRequest); i { + switch v := v.(*StreamActivatedJobsRequest); i { case 0: return &v.state case 1: @@ -4378,7 +5154,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateJobsResponse); i { + switch v := v.(*ActivateJobsRequest); i { case 0: return &v.state case 1: @@ -4390,7 +5166,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivatedJob); i { + switch v := v.(*ActivateJobsResponse); i { case 0: return &v.state case 1: @@ -4402,7 +5178,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelProcessInstanceRequest); i { + switch v := v.(*ActivatedJob); i { case 0: return &v.state case 1: @@ -4414,7 +5190,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelProcessInstanceResponse); i { + switch v := v.(*CancelProcessInstanceRequest); i { case 0: return &v.state case 1: @@ -4426,7 +5202,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteJobRequest); i { + switch v := v.(*CancelProcessInstanceResponse); i { case 0: return &v.state case 1: @@ -4438,7 +5214,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteJobResponse); i { + switch v := v.(*CompleteJobRequest); i { case 0: return &v.state case 1: @@ -4450,7 +5226,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProcessInstanceRequest); i { + switch v := v.(*CompleteJobResponse); i { case 0: return &v.state case 1: @@ -4462,7 +5238,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessInstanceCreationStartInstruction); i { + switch v := v.(*CreateProcessInstanceRequest); i { case 0: return &v.state case 1: @@ -4474,7 +5250,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProcessInstanceResponse); i { + switch v := v.(*ProcessInstanceCreationStartInstruction); i { case 0: return &v.state case 1: @@ -4486,7 +5262,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProcessInstanceWithResultRequest); i { + switch v := v.(*CreateProcessInstanceResponse); i { case 0: return &v.state case 1: @@ -4498,7 +5274,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProcessInstanceWithResultResponse); i { + switch v := v.(*CreateProcessInstanceWithResultRequest); i { case 0: return &v.state case 1: @@ -4510,7 +5286,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvaluateDecisionRequest); i { + switch v := v.(*CreateProcessInstanceWithResultResponse); i { case 0: return &v.state case 1: @@ -4522,7 +5298,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvaluateDecisionResponse); i { + switch v := v.(*EvaluateDecisionRequest); i { case 0: return &v.state case 1: @@ -4534,7 +5310,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvaluatedDecision); i { + switch v := v.(*EvaluateDecisionResponse); i { case 0: return &v.state case 1: @@ -4546,7 +5322,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvaluatedDecisionInput); i { + switch v := v.(*EvaluatedDecision); i { case 0: return &v.state case 1: @@ -4558,7 +5334,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvaluatedDecisionOutput); i { + switch v := v.(*EvaluatedDecisionInput); i { case 0: return &v.state case 1: @@ -4570,7 +5346,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchedDecisionRule); i { + switch v := v.(*EvaluatedDecisionOutput); i { case 0: return &v.state case 1: @@ -4582,7 +5358,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployProcessRequest); i { + switch v := v.(*MatchedDecisionRule); i { case 0: return &v.state case 1: @@ -4594,7 +5370,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessRequestObject); i { + switch v := v.(*DeployProcessRequest); i { case 0: return &v.state case 1: @@ -4606,7 +5382,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployProcessResponse); i { + switch v := v.(*ProcessRequestObject); i { case 0: return &v.state case 1: @@ -4618,7 +5394,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployResourceRequest); i { + switch v := v.(*DeployProcessResponse); i { case 0: return &v.state case 1: @@ -4630,7 +5406,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { + switch v := v.(*DeployResourceRequest); i { case 0: return &v.state case 1: @@ -4642,7 +5418,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployResourceResponse); i { + switch v := v.(*Resource); i { case 0: return &v.state case 1: @@ -4654,7 +5430,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Deployment); i { + switch v := v.(*DeployResourceResponse); i { case 0: return &v.state case 1: @@ -4666,7 +5442,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessMetadata); i { + switch v := v.(*Deployment); i { case 0: return &v.state case 1: @@ -4678,7 +5454,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecisionMetadata); i { + switch v := v.(*ProcessMetadata); i { case 0: return &v.state case 1: @@ -4690,7 +5466,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecisionRequirementsMetadata); i { + switch v := v.(*DecisionMetadata); i { case 0: return &v.state case 1: @@ -4702,7 +5478,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailJobRequest); i { + switch v := v.(*DecisionRequirementsMetadata); i { case 0: return &v.state case 1: @@ -4714,7 +5490,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailJobResponse); i { + switch v := v.(*FormMetadata); i { case 0: return &v.state case 1: @@ -4726,7 +5502,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThrowErrorRequest); i { + switch v := v.(*FailJobRequest); i { case 0: return &v.state case 1: @@ -4738,7 +5514,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThrowErrorResponse); i { + switch v := v.(*FailJobResponse); i { case 0: return &v.state case 1: @@ -4750,7 +5526,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublishMessageRequest); i { + switch v := v.(*ThrowErrorRequest); i { case 0: return &v.state case 1: @@ -4762,7 +5538,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublishMessageResponse); i { + switch v := v.(*ThrowErrorResponse); i { case 0: return &v.state case 1: @@ -4774,7 +5550,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveIncidentRequest); i { + switch v := v.(*PublishMessageRequest); i { case 0: return &v.state case 1: @@ -4786,7 +5562,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveIncidentResponse); i { + switch v := v.(*PublishMessageResponse); i { case 0: return &v.state case 1: @@ -4798,7 +5574,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TopologyRequest); i { + switch v := v.(*ResolveIncidentRequest); i { case 0: return &v.state case 1: @@ -4810,7 +5586,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TopologyResponse); i { + switch v := v.(*ResolveIncidentResponse); i { case 0: return &v.state case 1: @@ -4822,7 +5598,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BrokerInfo); i { + switch v := v.(*TopologyRequest); i { case 0: return &v.state case 1: @@ -4834,7 +5610,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Partition); i { + switch v := v.(*TopologyResponse); i { case 0: return &v.state case 1: @@ -4846,7 +5622,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateJobRetriesRequest); i { + switch v := v.(*BrokerInfo); i { case 0: return &v.state case 1: @@ -4858,7 +5634,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateJobRetriesResponse); i { + switch v := v.(*Partition); i { case 0: return &v.state case 1: @@ -4870,7 +5646,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetVariablesRequest); i { + switch v := v.(*UpdateJobRetriesRequest); i { case 0: return &v.state case 1: @@ -4882,7 +5658,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetVariablesResponse); i { + switch v := v.(*UpdateJobRetriesResponse); i { case 0: return &v.state case 1: @@ -4894,7 +5670,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyProcessInstanceRequest); i { + switch v := v.(*UpdateJobTimeoutRequest); i { case 0: return &v.state case 1: @@ -4906,7 +5682,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyProcessInstanceResponse); i { + switch v := v.(*UpdateJobTimeoutResponse); i { case 0: return &v.state case 1: @@ -4918,7 +5694,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceRequest); i { + switch v := v.(*SetVariablesRequest); i { case 0: return &v.state case 1: @@ -4930,7 +5706,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceResponse); i { + switch v := v.(*SetVariablesResponse); i { case 0: return &v.state case 1: @@ -4942,7 +5718,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastSignalRequest); i { + switch v := v.(*ModifyProcessInstanceRequest); i { case 0: return &v.state case 1: @@ -4954,7 +5730,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastSignalResponse); i { + switch v := v.(*ModifyProcessInstanceResponse); i { case 0: return &v.state case 1: @@ -4966,7 +5742,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyProcessInstanceRequest_ActivateInstruction); i { + switch v := v.(*MigrateProcessInstanceRequest); i { case 0: return &v.state case 1: @@ -4978,7 +5754,7 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyProcessInstanceRequest_VariableInstruction); i { + switch v := v.(*MigrateProcessInstanceResponse); i { case 0: return &v.state case 1: @@ -4990,6 +5766,78 @@ func file_gateway_proto_init() { } } file_gateway_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BroadcastSignalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BroadcastSignalResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyProcessInstanceRequest_ActivateInstruction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyProcessInstanceRequest_VariableInstruction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ModifyProcessInstanceRequest_TerminateInstruction); i { case 0: return &v.state @@ -5001,11 +5849,36 @@ func file_gateway_proto_init() { return nil } } + file_gateway_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MigrateProcessInstanceRequest_MigrationPlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gateway_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MigrateProcessInstanceRequest_MappingInstruction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_gateway_proto_msgTypes[24].OneofWrappers = []interface{}{ + file_gateway_proto_msgTypes[25].OneofWrappers = []interface{}{ (*Deployment_Process)(nil), (*Deployment_Decision)(nil), (*Deployment_DecisionRequirements)(nil), + (*Deployment_Form)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -5013,7 +5886,7 @@ func file_gateway_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gateway_proto_rawDesc, NumEnums: 2, - NumMessages: 53, + NumMessages: 61, NumExtensions: 0, NumServices: 1, }, @@ -5040,199 +5913,224 @@ const _ = grpc.SupportPackageIsVersion6 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type GatewayClient interface { + // Iterates through all known partitions round-robin and activates up to the requested + // maximum and streams them back to the client as they are activated. // - //Iterates through all known partitions round-robin and activates up to the requested - //maximum and streams them back to the client as they are activated. - // - //Errors: - //INVALID_ARGUMENT: - //- type is blank (empty string, null) - //- worker is blank (empty string, null) - //- timeout less than 1 - //- maxJobsToActivate is less than 1 + // Errors: + // INVALID_ARGUMENT: + // - type is blank (empty string, null) + // - worker is blank (empty string, null) + // - timeout less than 1 + // - maxJobsToActivate is less than 1 ActivateJobs(ctx context.Context, in *ActivateJobsRequest, opts ...grpc.CallOption) (Gateway_ActivateJobsClient, error) + // Registers client to a job stream that will stream jobs back to the client as + // they become activatable. // - //Cancels a running process instance + // Errors: + // INVALID_ARGUMENT: + // - type is blank (empty string, null) + // - timeout less than 1 + StreamActivatedJobs(ctx context.Context, in *StreamActivatedJobsRequest, opts ...grpc.CallOption) (Gateway_StreamActivatedJobsClient, error) + // Cancels a running process instance // - //Errors: - //NOT_FOUND: - //- no process instance exists with the given key + // Errors: + // NOT_FOUND: + // - no process instance exists with the given key CancelProcessInstance(ctx context.Context, in *CancelProcessInstanceRequest, opts ...grpc.CallOption) (*CancelProcessInstanceResponse, error) + // Completes a job with the given variables, which allows completing the associated service task. // - //Completes a job with the given variables, which allows completing the associated service task. + // Errors: + // NOT_FOUND: + // - no job exists with the given job key. Note that since jobs are removed once completed, + // it could be that this job did exist at some point. // - //Errors: - //NOT_FOUND: - //- no job exists with the given job key. Note that since jobs are removed once completed, - //it could be that this job did exist at some point. - // - //FAILED_PRECONDITION: - //- the job was marked as failed. In that case, the related incident must be resolved before - //the job can be activated again and completed. + // FAILED_PRECONDITION: + // - the job was marked as failed. In that case, the related incident must be resolved before + // the job can be activated again and completed. CompleteJob(ctx context.Context, in *CompleteJobRequest, opts ...grpc.CallOption) (*CompleteJobResponse, error) + // Creates and starts an instance of the specified process. The process definition to use to + // create the instance can be specified either using its unique key (as returned by + // DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the + // latest deployed version. Note that only processes with none start events can be started through + // this command. // - //Creates and starts an instance of the specified process. The process definition to use to - //create the instance can be specified either using its unique key (as returned by - //DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the - //latest deployed version. Note that only processes with none start events can be started through - //this command. + // Errors: + // NOT_FOUND: + // - no process with the given key exists (if processDefinitionKey was given) + // - no process with the given process ID exists (if bpmnProcessId was given but version was -1) + // - no process with the given process ID and version exists (if both bpmnProcessId and version were given) // - //Errors: - //NOT_FOUND: - //- no process with the given key exists (if processDefinitionKey was given) - //- no process with the given process ID exists (if bpmnProcessId was given but version was -1) - //- no process with the given process ID and version exists (if both bpmnProcessId and version were given) + // FAILED_PRECONDITION: + // - the process definition does not contain a none start event; only processes with none + // start event can be started manually. // - //FAILED_PRECONDITION: - //- the process definition does not contain a none start event; only processes with none - //start event can be started manually. - // - //INVALID_ARGUMENT: - //- the given variables argument is not a valid JSON document; it is expected to be a valid - //JSON document where the root node is an object. + // INVALID_ARGUMENT: + // - the given variables argument is not a valid JSON document; it is expected to be a valid + // JSON document where the root node is an object. CreateProcessInstance(ctx context.Context, in *CreateProcessInstanceRequest, opts ...grpc.CallOption) (*CreateProcessInstanceResponse, error) - // - //Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully. + // Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully. CreateProcessInstanceWithResult(ctx context.Context, in *CreateProcessInstanceWithResultRequest, opts ...grpc.CallOption) (*CreateProcessInstanceWithResultResponse, error) + // Evaluates a decision. The decision to evaluate can be specified either by + // using its unique key (as returned by DeployResource), or using the decision + // ID. When using the decision ID, the latest deployed version of the decision + // is used. // - //Evaluates a decision. The decision to evaluate can be specified either by - //using its unique key (as returned by DeployResource), or using the decision - //ID. When using the decision ID, the latest deployed version of the decision - //is used. - // - //Errors: - //INVALID_ARGUMENT: - //- no decision with the given key exists (if decisionKey was given) - //- no decision with the given decision ID exists (if decisionId was given) - //- both decision ID and decision KEY were provided, or are missing + // Errors: + // INVALID_ARGUMENT: + // - no decision with the given key exists (if decisionKey was given) + // - no decision with the given decision ID exists (if decisionId was given) + // - both decision ID and decision KEY were provided, or are missing EvaluateDecision(ctx context.Context, in *EvaluateDecisionRequest, opts ...grpc.CallOption) (*EvaluateDecisionResponse, error) // Deprecated: Do not use. // - //Deploys one or more processes to Zeebe. Note that this is an atomic call, - //i.e. either all processes are deployed, or none of them are. + // Deploys one or more processes to Zeebe. Note that this is an atomic call, + // i.e. either all processes are deployed, or none of them are. // - //Errors: - //INVALID_ARGUMENT: - //- no resources given. - //- if at least one resource is invalid. A resource is considered invalid if: - //- the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML) - //- the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + // Errors: + // INVALID_ARGUMENT: + // - no resources given. + // - if at least one resource is invalid. A resource is considered invalid if: + // - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML) + // - the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) DeployProcess(ctx context.Context, in *DeployProcessRequest, opts ...grpc.CallOption) (*DeployProcessResponse, error) + // Deploys one or more resources (e.g. processes or decision models) to Zeebe. + // Note that this is an atomic call, i.e. either all resources are deployed, or none of them are. // - //Deploys one or more resources (e.g. processes or decision models) to Zeebe. - //Note that this is an atomic call, i.e. either all resources are deployed, or none of them are. - // - //Errors: - //INVALID_ARGUMENT: - //- no resources given. - //- if at least one resource is invalid. A resource is considered invalid if: - //- the content is not deserializable (e.g. detected as BPMN, but it's broken XML) - //- the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + // Errors: + // PERMISSION_DENIED: + // - if a deployment to an unauthorized tenant is performed + // INVALID_ARGUMENT: + // - no resources given. + // - if at least one resource is invalid. A resource is considered invalid if: + // - the content is not deserializable (e.g. detected as BPMN, but it's broken XML) + // - the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + // - if multi-tenancy is enabled, and: + // - a tenant id is not provided + // - a tenant id with an invalid format is provided + // - if multi-tenancy is disabled and a tenant id is provided DeployResource(ctx context.Context, in *DeployResourceRequest, opts ...grpc.CallOption) (*DeployResourceResponse, error) + // Marks the job as failed; if the retries argument is positive, then the job will be immediately + // activatable again, and a worker could try again to process it. If it is zero or negative however, + // an incident will be raised, tagged with the given errorMessage, and the job will not be + // activatable until the incident is resolved. // - //Marks the job as failed; if the retries argument is positive, then the job will be immediately - //activatable again, and a worker could try again to process it. If it is zero or negative however, - //an incident will be raised, tagged with the given errorMessage, and the job will not be - //activatable until the incident is resolved. + // Errors: + // NOT_FOUND: + // - no job was found with the given key // - //Errors: - //NOT_FOUND: - //- no job was found with the given key - // - //FAILED_PRECONDITION: - //- the job was not activated - //- the job is already in a failed state, i.e. ran out of retries + // FAILED_PRECONDITION: + // - the job was not activated + // - the job is already in a failed state, i.e. ran out of retries FailJob(ctx context.Context, in *FailJobRequest, opts ...grpc.CallOption) (*FailJobResponse, error) + // Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead. // - //Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead. + // Errors: + // NOT_FOUND: + // - no job was found with the given key // - //Errors: - //NOT_FOUND: - //- no job was found with the given key - // - //FAILED_PRECONDITION: - //- the job is not in an activated state + // FAILED_PRECONDITION: + // - the job is not in an activated state ThrowError(ctx context.Context, in *ThrowErrorRequest, opts ...grpc.CallOption) (*ThrowErrorResponse, error) + // Publishes a single message. Messages are published to specific partitions computed from their + // correlation keys. // - //Publishes a single message. Messages are published to specific partitions computed from their - //correlation keys. - // - //Errors: - //ALREADY_EXISTS: - //- a message with the same ID was previously published (and is still alive) + // Errors: + // ALREADY_EXISTS: + // - a message with the same ID was previously published (and is still alive) PublishMessage(ctx context.Context, in *PublishMessageRequest, opts ...grpc.CallOption) (*PublishMessageResponse, error) + // Resolves a given incident. This simply marks the incident as resolved; most likely a call to + // UpdateJobRetries or SetVariables will be necessary to actually resolve the + // problem, following by this call. // - //Resolves a given incident. This simply marks the incident as resolved; most likely a call to - //UpdateJobRetries or SetVariables will be necessary to actually resolve the - //problem, following by this call. - // - //Errors: - //NOT_FOUND: - //- no incident with the given key exists + // Errors: + // NOT_FOUND: + // - no incident with the given key exists ResolveIncident(ctx context.Context, in *ResolveIncidentRequest, opts ...grpc.CallOption) (*ResolveIncidentResponse, error) + // Updates all the variables of a particular scope (e.g. process instance, flow element instance) + // from the given JSON document. // - //Updates all the variables of a particular scope (e.g. process instance, flow element instance) - //from the given JSON document. - // - //Errors: - //NOT_FOUND: - //- no element with the given elementInstanceKey exists - //INVALID_ARGUMENT: - //- the given variables document is not a valid JSON document; valid documents are expected to - //be JSON documents where the root node is an object. + // Errors: + // NOT_FOUND: + // - no element with the given elementInstanceKey exists + // INVALID_ARGUMENT: + // - the given variables document is not a valid JSON document; valid documents are expected to + // be JSON documents where the root node is an object. SetVariables(ctx context.Context, in *SetVariablesRequest, opts ...grpc.CallOption) (*SetVariablesResponse, error) - // - //Obtains the current topology of the cluster the gateway is part of. + // Obtains the current topology of the cluster the gateway is part of. Topology(ctx context.Context, in *TopologyRequest, opts ...grpc.CallOption) (*TopologyResponse, error) + // Updates the number of retries a job has left. This is mostly useful for jobs that have run out of + // retries, should the underlying problem be solved. // - //Updates the number of retries a job has left. This is mostly useful for jobs that have run out of - //retries, should the underlying problem be solved. + // Errors: + // NOT_FOUND: + // - no job exists with the given key // - //Errors: - //NOT_FOUND: - //- no job exists with the given key - // - //INVALID_ARGUMENT: - //- retries is not greater than 0 + // INVALID_ARGUMENT: + // - retries is not greater than 0 UpdateJobRetries(ctx context.Context, in *UpdateJobRetriesRequest, opts ...grpc.CallOption) (*UpdateJobRetriesResponse, error) + // Modifies the process instance. This is done by activating and/or terminating specific elements of the instance. // - //Modifies the process instance. This is done by activating and/or terminating specific elements of the instance. + // Errors: + // NOT_FOUND: + // - no process instance exists with the given key // - //Errors: - //NOT_FOUND: - //- no process instance exists with the given key + // FAILED_PRECONDITION: + // - trying to activate element inside of a multi-instance // - //FAILED_PRECONDITION: - //- trying to activate element inside of a multi-instance - // - //INVALID_ARGUMENT: - //- activating or terminating unknown element - //- ancestor of element for activation doesn't exist - //- scope of variable is unknown + // INVALID_ARGUMENT: + // - activating or terminating unknown element + // - ancestor of element for activation doesn't exist + // - scope of variable is unknown ModifyProcessInstance(ctx context.Context, in *ModifyProcessInstanceRequest, opts ...grpc.CallOption) (*ModifyProcessInstanceResponse, error) + // Migrates the process instance to the specified process definition. + // In simple terms, this is handled by updating the active element's process. // - //Deletes a resource from the state. Once a resource has been deleted it cannot - //be recovered. If the resource needs to be available again, a new deployment - //of the resource is required. + // Errors: + // NOT_FOUND: + // - the process instance referenced by `processInstanceKey` is not active // - //Deleting a process will cancel any running instances of this process - //definition. New instances of a deleted process are created using - //the lastest version that hasn't been deleted. Creating a new - //process instance is impossible when all versions have been - //deleted. + // FAILED_PRECONDITION: + // - not all active elements in the source process instance are mapped to the elements in the target process + // - a mapping instruction changes the type of an element or event + // - a mapping instruction refers to an unsupported element (i.e. some elements will be supported later on) + // - a mapping instruction refers to element in unsupported scenarios. + // (i.e. migrating active elements with event subscriptions will be supported later on) // - //Deleting a decision requirement definitions could cause incidents in process - //instances referencing these decisions in a business rule task. A decision - //will be evaluated with the latest version that hasn't been deleted. If all - //versions of a decision have been deleted the evaluation is rejected. + // INVALID_ARGUMENT: + // - the source element id does not refer to an element in the source process definition + // - a source element id is mapped by multiple mapping instructions. + // For example, the engine cannot determine how to migrate a process instance when the instructions are: [A->B, A->C]. + MigrateProcessInstance(ctx context.Context, in *MigrateProcessInstanceRequest, opts ...grpc.CallOption) (*MigrateProcessInstanceResponse, error) + // Updates the deadline of a job using the timeout (in ms) provided. This can be used + // for extending or shortening the job deadline. // - //Errors: - //NOT_FOUND: - //- No resource exists with the given key + // Errors: + // NOT_FOUND: + // - no job exists with the given key // + // INVALID_STATE: + // - no deadline exists for the given job key + UpdateJobTimeout(ctx context.Context, in *UpdateJobTimeoutRequest, opts ...grpc.CallOption) (*UpdateJobTimeoutResponse, error) + // Deletes a resource from the state. Once a resource has been deleted it cannot + // be recovered. If the resource needs to be available again, a new deployment + // of the resource is required. + // + // Deleting a process will cancel any running instances of this process + // definition. New instances of a deleted process are created using + // the lastest version that hasn't been deleted. Creating a new + // process instance is impossible when all versions have been + // deleted. + // + // Deleting a decision requirement definitions could cause incidents in process + // instances referencing these decisions in a business rule task. A decision + // will be evaluated with the latest version that hasn't been deleted. If all + // versions of a decision have been deleted the evaluation is rejected. + // + // Errors: + // NOT_FOUND: + // - No resource exists with the given key DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) - // - //Broadcasts a signal. + // Broadcasts a signal. BroadcastSignal(ctx context.Context, in *BroadcastSignalRequest, opts ...grpc.CallOption) (*BroadcastSignalResponse, error) } @@ -5276,6 +6174,38 @@ func (x *gatewayActivateJobsClient) Recv() (*ActivateJobsResponse, error) { return m, nil } +func (c *gatewayClient) StreamActivatedJobs(ctx context.Context, in *StreamActivatedJobsRequest, opts ...grpc.CallOption) (Gateway_StreamActivatedJobsClient, error) { + stream, err := c.cc.NewStream(ctx, &_Gateway_serviceDesc.Streams[1], "/gateway_protocol.Gateway/StreamActivatedJobs", opts...) + if err != nil { + return nil, err + } + x := &gatewayStreamActivatedJobsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Gateway_StreamActivatedJobsClient interface { + Recv() (*ActivatedJob, error) + grpc.ClientStream +} + +type gatewayStreamActivatedJobsClient struct { + grpc.ClientStream +} + +func (x *gatewayStreamActivatedJobsClient) Recv() (*ActivatedJob, error) { + m := new(ActivatedJob) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *gatewayClient) CancelProcessInstance(ctx context.Context, in *CancelProcessInstanceRequest, opts ...grpc.CallOption) (*CancelProcessInstanceResponse, error) { out := new(CancelProcessInstanceResponse) err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/CancelProcessInstance", in, out, opts...) @@ -5412,6 +6342,24 @@ func (c *gatewayClient) ModifyProcessInstance(ctx context.Context, in *ModifyPro return out, nil } +func (c *gatewayClient) MigrateProcessInstance(ctx context.Context, in *MigrateProcessInstanceRequest, opts ...grpc.CallOption) (*MigrateProcessInstanceResponse, error) { + out := new(MigrateProcessInstanceResponse) + err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/MigrateProcessInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatewayClient) UpdateJobTimeout(ctx context.Context, in *UpdateJobTimeoutRequest, opts ...grpc.CallOption) (*UpdateJobTimeoutResponse, error) { + out := new(UpdateJobTimeoutResponse) + err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/UpdateJobTimeout", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gatewayClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) { out := new(DeleteResourceResponse) err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/DeleteResource", in, out, opts...) @@ -5432,199 +6380,224 @@ func (c *gatewayClient) BroadcastSignal(ctx context.Context, in *BroadcastSignal // GatewayServer is the server API for Gateway service. type GatewayServer interface { + // Iterates through all known partitions round-robin and activates up to the requested + // maximum and streams them back to the client as they are activated. // - //Iterates through all known partitions round-robin and activates up to the requested - //maximum and streams them back to the client as they are activated. - // - //Errors: - //INVALID_ARGUMENT: - //- type is blank (empty string, null) - //- worker is blank (empty string, null) - //- timeout less than 1 - //- maxJobsToActivate is less than 1 + // Errors: + // INVALID_ARGUMENT: + // - type is blank (empty string, null) + // - worker is blank (empty string, null) + // - timeout less than 1 + // - maxJobsToActivate is less than 1 ActivateJobs(*ActivateJobsRequest, Gateway_ActivateJobsServer) error + // Registers client to a job stream that will stream jobs back to the client as + // they become activatable. // - //Cancels a running process instance + // Errors: + // INVALID_ARGUMENT: + // - type is blank (empty string, null) + // - timeout less than 1 + StreamActivatedJobs(*StreamActivatedJobsRequest, Gateway_StreamActivatedJobsServer) error + // Cancels a running process instance // - //Errors: - //NOT_FOUND: - //- no process instance exists with the given key + // Errors: + // NOT_FOUND: + // - no process instance exists with the given key CancelProcessInstance(context.Context, *CancelProcessInstanceRequest) (*CancelProcessInstanceResponse, error) + // Completes a job with the given variables, which allows completing the associated service task. // - //Completes a job with the given variables, which allows completing the associated service task. + // Errors: + // NOT_FOUND: + // - no job exists with the given job key. Note that since jobs are removed once completed, + // it could be that this job did exist at some point. // - //Errors: - //NOT_FOUND: - //- no job exists with the given job key. Note that since jobs are removed once completed, - //it could be that this job did exist at some point. - // - //FAILED_PRECONDITION: - //- the job was marked as failed. In that case, the related incident must be resolved before - //the job can be activated again and completed. + // FAILED_PRECONDITION: + // - the job was marked as failed. In that case, the related incident must be resolved before + // the job can be activated again and completed. CompleteJob(context.Context, *CompleteJobRequest) (*CompleteJobResponse, error) + // Creates and starts an instance of the specified process. The process definition to use to + // create the instance can be specified either using its unique key (as returned by + // DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the + // latest deployed version. Note that only processes with none start events can be started through + // this command. // - //Creates and starts an instance of the specified process. The process definition to use to - //create the instance can be specified either using its unique key (as returned by - //DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the - //latest deployed version. Note that only processes with none start events can be started through - //this command. + // Errors: + // NOT_FOUND: + // - no process with the given key exists (if processDefinitionKey was given) + // - no process with the given process ID exists (if bpmnProcessId was given but version was -1) + // - no process with the given process ID and version exists (if both bpmnProcessId and version were given) // - //Errors: - //NOT_FOUND: - //- no process with the given key exists (if processDefinitionKey was given) - //- no process with the given process ID exists (if bpmnProcessId was given but version was -1) - //- no process with the given process ID and version exists (if both bpmnProcessId and version were given) + // FAILED_PRECONDITION: + // - the process definition does not contain a none start event; only processes with none + // start event can be started manually. // - //FAILED_PRECONDITION: - //- the process definition does not contain a none start event; only processes with none - //start event can be started manually. - // - //INVALID_ARGUMENT: - //- the given variables argument is not a valid JSON document; it is expected to be a valid - //JSON document where the root node is an object. + // INVALID_ARGUMENT: + // - the given variables argument is not a valid JSON document; it is expected to be a valid + // JSON document where the root node is an object. CreateProcessInstance(context.Context, *CreateProcessInstanceRequest) (*CreateProcessInstanceResponse, error) - // - //Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully. + // Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully. CreateProcessInstanceWithResult(context.Context, *CreateProcessInstanceWithResultRequest) (*CreateProcessInstanceWithResultResponse, error) + // Evaluates a decision. The decision to evaluate can be specified either by + // using its unique key (as returned by DeployResource), or using the decision + // ID. When using the decision ID, the latest deployed version of the decision + // is used. // - //Evaluates a decision. The decision to evaluate can be specified either by - //using its unique key (as returned by DeployResource), or using the decision - //ID. When using the decision ID, the latest deployed version of the decision - //is used. - // - //Errors: - //INVALID_ARGUMENT: - //- no decision with the given key exists (if decisionKey was given) - //- no decision with the given decision ID exists (if decisionId was given) - //- both decision ID and decision KEY were provided, or are missing + // Errors: + // INVALID_ARGUMENT: + // - no decision with the given key exists (if decisionKey was given) + // - no decision with the given decision ID exists (if decisionId was given) + // - both decision ID and decision KEY were provided, or are missing EvaluateDecision(context.Context, *EvaluateDecisionRequest) (*EvaluateDecisionResponse, error) // Deprecated: Do not use. // - //Deploys one or more processes to Zeebe. Note that this is an atomic call, - //i.e. either all processes are deployed, or none of them are. + // Deploys one or more processes to Zeebe. Note that this is an atomic call, + // i.e. either all processes are deployed, or none of them are. // - //Errors: - //INVALID_ARGUMENT: - //- no resources given. - //- if at least one resource is invalid. A resource is considered invalid if: - //- the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML) - //- the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + // Errors: + // INVALID_ARGUMENT: + // - no resources given. + // - if at least one resource is invalid. A resource is considered invalid if: + // - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML) + // - the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) DeployProcess(context.Context, *DeployProcessRequest) (*DeployProcessResponse, error) + // Deploys one or more resources (e.g. processes or decision models) to Zeebe. + // Note that this is an atomic call, i.e. either all resources are deployed, or none of them are. // - //Deploys one or more resources (e.g. processes or decision models) to Zeebe. - //Note that this is an atomic call, i.e. either all resources are deployed, or none of them are. - // - //Errors: - //INVALID_ARGUMENT: - //- no resources given. - //- if at least one resource is invalid. A resource is considered invalid if: - //- the content is not deserializable (e.g. detected as BPMN, but it's broken XML) - //- the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + // Errors: + // PERMISSION_DENIED: + // - if a deployment to an unauthorized tenant is performed + // INVALID_ARGUMENT: + // - no resources given. + // - if at least one resource is invalid. A resource is considered invalid if: + // - the content is not deserializable (e.g. detected as BPMN, but it's broken XML) + // - the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + // - if multi-tenancy is enabled, and: + // - a tenant id is not provided + // - a tenant id with an invalid format is provided + // - if multi-tenancy is disabled and a tenant id is provided DeployResource(context.Context, *DeployResourceRequest) (*DeployResourceResponse, error) + // Marks the job as failed; if the retries argument is positive, then the job will be immediately + // activatable again, and a worker could try again to process it. If it is zero or negative however, + // an incident will be raised, tagged with the given errorMessage, and the job will not be + // activatable until the incident is resolved. // - //Marks the job as failed; if the retries argument is positive, then the job will be immediately - //activatable again, and a worker could try again to process it. If it is zero or negative however, - //an incident will be raised, tagged with the given errorMessage, and the job will not be - //activatable until the incident is resolved. + // Errors: + // NOT_FOUND: + // - no job was found with the given key // - //Errors: - //NOT_FOUND: - //- no job was found with the given key - // - //FAILED_PRECONDITION: - //- the job was not activated - //- the job is already in a failed state, i.e. ran out of retries + // FAILED_PRECONDITION: + // - the job was not activated + // - the job is already in a failed state, i.e. ran out of retries FailJob(context.Context, *FailJobRequest) (*FailJobResponse, error) + // Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead. // - //Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead. + // Errors: + // NOT_FOUND: + // - no job was found with the given key // - //Errors: - //NOT_FOUND: - //- no job was found with the given key - // - //FAILED_PRECONDITION: - //- the job is not in an activated state + // FAILED_PRECONDITION: + // - the job is not in an activated state ThrowError(context.Context, *ThrowErrorRequest) (*ThrowErrorResponse, error) + // Publishes a single message. Messages are published to specific partitions computed from their + // correlation keys. // - //Publishes a single message. Messages are published to specific partitions computed from their - //correlation keys. - // - //Errors: - //ALREADY_EXISTS: - //- a message with the same ID was previously published (and is still alive) + // Errors: + // ALREADY_EXISTS: + // - a message with the same ID was previously published (and is still alive) PublishMessage(context.Context, *PublishMessageRequest) (*PublishMessageResponse, error) + // Resolves a given incident. This simply marks the incident as resolved; most likely a call to + // UpdateJobRetries or SetVariables will be necessary to actually resolve the + // problem, following by this call. // - //Resolves a given incident. This simply marks the incident as resolved; most likely a call to - //UpdateJobRetries or SetVariables will be necessary to actually resolve the - //problem, following by this call. - // - //Errors: - //NOT_FOUND: - //- no incident with the given key exists + // Errors: + // NOT_FOUND: + // - no incident with the given key exists ResolveIncident(context.Context, *ResolveIncidentRequest) (*ResolveIncidentResponse, error) + // Updates all the variables of a particular scope (e.g. process instance, flow element instance) + // from the given JSON document. // - //Updates all the variables of a particular scope (e.g. process instance, flow element instance) - //from the given JSON document. - // - //Errors: - //NOT_FOUND: - //- no element with the given elementInstanceKey exists - //INVALID_ARGUMENT: - //- the given variables document is not a valid JSON document; valid documents are expected to - //be JSON documents where the root node is an object. + // Errors: + // NOT_FOUND: + // - no element with the given elementInstanceKey exists + // INVALID_ARGUMENT: + // - the given variables document is not a valid JSON document; valid documents are expected to + // be JSON documents where the root node is an object. SetVariables(context.Context, *SetVariablesRequest) (*SetVariablesResponse, error) - // - //Obtains the current topology of the cluster the gateway is part of. + // Obtains the current topology of the cluster the gateway is part of. Topology(context.Context, *TopologyRequest) (*TopologyResponse, error) + // Updates the number of retries a job has left. This is mostly useful for jobs that have run out of + // retries, should the underlying problem be solved. // - //Updates the number of retries a job has left. This is mostly useful for jobs that have run out of - //retries, should the underlying problem be solved. + // Errors: + // NOT_FOUND: + // - no job exists with the given key // - //Errors: - //NOT_FOUND: - //- no job exists with the given key - // - //INVALID_ARGUMENT: - //- retries is not greater than 0 + // INVALID_ARGUMENT: + // - retries is not greater than 0 UpdateJobRetries(context.Context, *UpdateJobRetriesRequest) (*UpdateJobRetriesResponse, error) + // Modifies the process instance. This is done by activating and/or terminating specific elements of the instance. // - //Modifies the process instance. This is done by activating and/or terminating specific elements of the instance. + // Errors: + // NOT_FOUND: + // - no process instance exists with the given key // - //Errors: - //NOT_FOUND: - //- no process instance exists with the given key + // FAILED_PRECONDITION: + // - trying to activate element inside of a multi-instance // - //FAILED_PRECONDITION: - //- trying to activate element inside of a multi-instance - // - //INVALID_ARGUMENT: - //- activating or terminating unknown element - //- ancestor of element for activation doesn't exist - //- scope of variable is unknown + // INVALID_ARGUMENT: + // - activating or terminating unknown element + // - ancestor of element for activation doesn't exist + // - scope of variable is unknown ModifyProcessInstance(context.Context, *ModifyProcessInstanceRequest) (*ModifyProcessInstanceResponse, error) + // Migrates the process instance to the specified process definition. + // In simple terms, this is handled by updating the active element's process. // - //Deletes a resource from the state. Once a resource has been deleted it cannot - //be recovered. If the resource needs to be available again, a new deployment - //of the resource is required. + // Errors: + // NOT_FOUND: + // - the process instance referenced by `processInstanceKey` is not active // - //Deleting a process will cancel any running instances of this process - //definition. New instances of a deleted process are created using - //the lastest version that hasn't been deleted. Creating a new - //process instance is impossible when all versions have been - //deleted. + // FAILED_PRECONDITION: + // - not all active elements in the source process instance are mapped to the elements in the target process + // - a mapping instruction changes the type of an element or event + // - a mapping instruction refers to an unsupported element (i.e. some elements will be supported later on) + // - a mapping instruction refers to element in unsupported scenarios. + // (i.e. migrating active elements with event subscriptions will be supported later on) // - //Deleting a decision requirement definitions could cause incidents in process - //instances referencing these decisions in a business rule task. A decision - //will be evaluated with the latest version that hasn't been deleted. If all - //versions of a decision have been deleted the evaluation is rejected. + // INVALID_ARGUMENT: + // - the source element id does not refer to an element in the source process definition + // - a source element id is mapped by multiple mapping instructions. + // For example, the engine cannot determine how to migrate a process instance when the instructions are: [A->B, A->C]. + MigrateProcessInstance(context.Context, *MigrateProcessInstanceRequest) (*MigrateProcessInstanceResponse, error) + // Updates the deadline of a job using the timeout (in ms) provided. This can be used + // for extending or shortening the job deadline. // - //Errors: - //NOT_FOUND: - //- No resource exists with the given key + // Errors: + // NOT_FOUND: + // - no job exists with the given key // + // INVALID_STATE: + // - no deadline exists for the given job key + UpdateJobTimeout(context.Context, *UpdateJobTimeoutRequest) (*UpdateJobTimeoutResponse, error) + // Deletes a resource from the state. Once a resource has been deleted it cannot + // be recovered. If the resource needs to be available again, a new deployment + // of the resource is required. + // + // Deleting a process will cancel any running instances of this process + // definition. New instances of a deleted process are created using + // the lastest version that hasn't been deleted. Creating a new + // process instance is impossible when all versions have been + // deleted. + // + // Deleting a decision requirement definitions could cause incidents in process + // instances referencing these decisions in a business rule task. A decision + // will be evaluated with the latest version that hasn't been deleted. If all + // versions of a decision have been deleted the evaluation is rejected. + // + // Errors: + // NOT_FOUND: + // - No resource exists with the given key DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) - // - //Broadcasts a signal. + // Broadcasts a signal. BroadcastSignal(context.Context, *BroadcastSignalRequest) (*BroadcastSignalResponse, error) } @@ -5635,6 +6608,9 @@ type UnimplementedGatewayServer struct { func (*UnimplementedGatewayServer) ActivateJobs(*ActivateJobsRequest, Gateway_ActivateJobsServer) error { return status.Errorf(codes.Unimplemented, "method ActivateJobs not implemented") } +func (*UnimplementedGatewayServer) StreamActivatedJobs(*StreamActivatedJobsRequest, Gateway_StreamActivatedJobsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamActivatedJobs not implemented") +} func (*UnimplementedGatewayServer) CancelProcessInstance(context.Context, *CancelProcessInstanceRequest) (*CancelProcessInstanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelProcessInstance not implemented") } @@ -5680,6 +6656,12 @@ func (*UnimplementedGatewayServer) UpdateJobRetries(context.Context, *UpdateJobR func (*UnimplementedGatewayServer) ModifyProcessInstance(context.Context, *ModifyProcessInstanceRequest) (*ModifyProcessInstanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModifyProcessInstance not implemented") } +func (*UnimplementedGatewayServer) MigrateProcessInstance(context.Context, *MigrateProcessInstanceRequest) (*MigrateProcessInstanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MigrateProcessInstance not implemented") +} +func (*UnimplementedGatewayServer) UpdateJobTimeout(context.Context, *UpdateJobTimeoutRequest) (*UpdateJobTimeoutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateJobTimeout not implemented") +} func (*UnimplementedGatewayServer) DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteResource not implemented") } @@ -5712,6 +6694,27 @@ func (x *gatewayActivateJobsServer) Send(m *ActivateJobsResponse) error { return x.ServerStream.SendMsg(m) } +func _Gateway_StreamActivatedJobs_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamActivatedJobsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(GatewayServer).StreamActivatedJobs(m, &gatewayStreamActivatedJobsServer{stream}) +} + +type Gateway_StreamActivatedJobsServer interface { + Send(*ActivatedJob) error + grpc.ServerStream +} + +type gatewayStreamActivatedJobsServer struct { + grpc.ServerStream +} + +func (x *gatewayStreamActivatedJobsServer) Send(m *ActivatedJob) error { + return x.ServerStream.SendMsg(m) +} + func _Gateway_CancelProcessInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CancelProcessInstanceRequest) if err := dec(in); err != nil { @@ -5982,6 +6985,42 @@ func _Gateway_ModifyProcessInstance_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _Gateway_MigrateProcessInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MigrateProcessInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayServer).MigrateProcessInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gateway_protocol.Gateway/MigrateProcessInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayServer).MigrateProcessInstance(ctx, req.(*MigrateProcessInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Gateway_UpdateJobTimeout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateJobTimeoutRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayServer).UpdateJobTimeout(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gateway_protocol.Gateway/UpdateJobTimeout", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayServer).UpdateJobTimeout(ctx, req.(*UpdateJobTimeoutRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Gateway_DeleteResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteResourceRequest) if err := dec(in); err != nil { @@ -6082,6 +7121,14 @@ var _Gateway_serviceDesc = grpc.ServiceDesc{ MethodName: "ModifyProcessInstance", Handler: _Gateway_ModifyProcessInstance_Handler, }, + { + MethodName: "MigrateProcessInstance", + Handler: _Gateway_MigrateProcessInstance_Handler, + }, + { + MethodName: "UpdateJobTimeout", + Handler: _Gateway_UpdateJobTimeout_Handler, + }, { MethodName: "DeleteResource", Handler: _Gateway_DeleteResource_Handler, @@ -6097,6 +7144,11 @@ var _Gateway_serviceDesc = grpc.ServiceDesc{ Handler: _Gateway_ActivateJobs_Handler, ServerStreams: true, }, + { + StreamName: "StreamActivatedJobs", + Handler: _Gateway_StreamActivatedJobs_Handler, + ServerStreams: true, + }, }, Metadata: "gateway.proto", } diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/backoffSupplier.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/backoffSupplier.go new file mode 100644 index 00000000..66b5c1ad --- /dev/null +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/backoffSupplier.go @@ -0,0 +1,21 @@ +// Copyright © 2018 Camunda Services GmbH (info@camunda.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package worker + +import "time" + +type BackoffSupplier interface { + SupplyRetryDelay(currentRetryDelay time.Duration) time.Duration +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/exponentialBackoffSupplier.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/exponentialBackoffSupplier.go new file mode 100644 index 00000000..13fcc518 --- /dev/null +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/exponentialBackoffSupplier.go @@ -0,0 +1,96 @@ +// Copyright © 2018 Camunda Services GmbH (info@camunda.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package worker + +import ( + "math" + "math/rand" + "time" +) + +type ExponentialBackoffBuilder interface { + MaxDelay(time.Duration) ExponentialBackoffBuilder + MinDelay(time.Duration) ExponentialBackoffBuilder + BackoffFactor(float64) ExponentialBackoffBuilder + JitterFactor(float64) ExponentialBackoffBuilder + Random(*rand.Rand) ExponentialBackoffBuilder + Build() BackoffSupplier +} + +func NewExponentialBackoffBuilder() ExponentialBackoff { + return ExponentialBackoff{ + maxDelay: time.Second * 5, + minDelay: time.Millisecond * 50, + backoffFactor: 1.6, + jitterFactor: 0.1, + random: rand.New(rand.NewSource(time.Now().Unix())), //nolint G404, we dont need a secure random number generator + } +} + +func (e ExponentialBackoff) MaxDelay(maxDelay time.Duration) ExponentialBackoffBuilder { + e.maxDelay = maxDelay + return e +} + +func (e ExponentialBackoff) MinDelay(minDelay time.Duration) ExponentialBackoffBuilder { + e.minDelay = minDelay + return e +} + +func (e ExponentialBackoff) BackoffFactor(backoffFactor float64) ExponentialBackoffBuilder { + e.backoffFactor = backoffFactor + return e +} + +func (e ExponentialBackoff) JitterFactor(jitterFactor float64) ExponentialBackoffBuilder { + e.jitterFactor = jitterFactor + return e +} + +func (e ExponentialBackoff) Random(random *rand.Rand) ExponentialBackoffBuilder { + e.random = random + return e +} + +func (e ExponentialBackoff) Build() BackoffSupplier { + return ExponentialBackoff{ + minDelay: e.minDelay, + maxDelay: e.maxDelay, + backoffFactor: e.backoffFactor, + jitterFactor: e.jitterFactor, + random: e.random, + } +} + +type ExponentialBackoff struct { + minDelay, maxDelay time.Duration + backoffFactor, jitterFactor float64 + random *rand.Rand +} + +func (e ExponentialBackoff) SupplyRetryDelay(currentRetryDelay time.Duration) time.Duration { + y := float64(currentRetryDelay.Milliseconds()) * e.backoffFactor + delay := math.Max(math.Min(float64(e.maxDelay.Milliseconds()), y), float64(e.minDelay.Milliseconds())) + jitter := e.computeJitter(delay) + retryDelay := math.Round(delay + jitter) + return time.Duration(retryDelay * float64(time.Millisecond)) +} + +func (e ExponentialBackoff) computeJitter(value float64) float64 { + minFactor := value * -e.jitterFactor + maxFactor := value * e.jitterFactor + + return (e.random.Float64() * (maxFactor - minFactor)) + minFactor +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobDispatcher.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobDispatcher.go index 51561a2a..dacde9f2 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobDispatcher.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobDispatcher.go @@ -15,8 +15,9 @@ package worker import ( - "github.com/camunda/zeebe/clients/go/v8/pkg/entities" "sync" + + "github.com/camunda/zeebe/clients/go/v8/pkg/entities" ) type jobDispatcher struct { diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobPoller.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobPoller.go index 12affab2..49da4a5a 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobPoller.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobPoller.go @@ -18,22 +18,24 @@ package worker import ( "context" "fmt" - "github.com/camunda/zeebe/clients/go/v8/pkg/entities" - "github.com/camunda/zeebe/clients/go/v8/pkg/pb" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "io" "log" "sync" "time" + + "github.com/camunda/zeebe/clients/go/v8/pkg/entities" + "github.com/camunda/zeebe/clients/go/v8/pkg/pb" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type jobPoller struct { - client pb.GatewayClient - request *pb.ActivateJobsRequest - requestTimeout time.Duration - maxJobsActive int - pollInterval time.Duration + client pb.GatewayClient + request *pb.ActivateJobsRequest + requestTimeout time.Duration + maxJobsActive int + initialPollInterval time.Duration + pollInterval time.Duration jobQueue chan entities.Job workerFinished chan bool @@ -42,6 +44,8 @@ type jobPoller struct { threshold int metrics JobWorkerMetrics shouldRetry func(context.Context, error) bool + + backoffSupplier BackoffSupplier } func (poller *jobPoller) poll(closeWait *sync.WaitGroup) { @@ -56,6 +60,7 @@ func (poller *jobPoller) poll(closeWait *sync.WaitGroup) { case <-poller.workerFinished: poller.remaining-- poller.setJobsRemainingCountMetric(poller.remaining) + poller.pollInterval = poller.initialPollInterval // or the poll interval exceeded case <-time.After(poller.pollInterval): // or poller should stop @@ -88,6 +93,11 @@ func (poller *jobPoller) activateJobs() { for { response, err := stream.Recv() if err != nil { + // no need to retry if the error was simply that we reached the end of the stream + if err == io.EOF { + break + } + if poller.shouldRetry(ctx, err) { // the headers are outdated and need to be rebuilt stream, err = poller.openStream(ctx) @@ -102,6 +112,11 @@ func (poller *jobPoller) activateJobs() { log.Printf("Failed to activate jobs for worker '%s': %v\n", poller.request.Worker, err) } + switch status.Code(err) { + case codes.ResourceExhausted, codes.Unavailable, codes.Internal: + poller.backoff() + } + break } @@ -130,3 +145,8 @@ func (poller *jobPoller) setJobsRemainingCountMetric(count int) { poller.metrics.SetJobsRemainingCount(poller.request.GetType(), count) } } + +func (poller *jobPoller) backoff() { + prevInterval := poller.pollInterval + poller.pollInterval = poller.backoffSupplier.SupplyRetryDelay(prevInterval) +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobStreamer.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobStreamer.go new file mode 100644 index 00000000..cb1f1f9d --- /dev/null +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobStreamer.go @@ -0,0 +1,116 @@ +// Copyright © 2018 Camunda Services GmbH (info@camunda.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package worker + +import ( + "context" + "sync" + "time" + + "github.com/camunda/zeebe/clients/go/v8/pkg/commands" +) + +type jobStreamer struct { + request commands.DispatchStreamJobsCommand + workerFinished chan bool + closeSignal chan struct{} + backoffSupplier BackoffSupplier + retryDelay time.Duration + + closedMutex sync.Mutex + closed bool + + streamMutex sync.Mutex +} + +func (streamer *jobStreamer) stream(closeWait *sync.WaitGroup) { + defer closeWait.Done() + + streamCtx, streamCancel := context.WithCancel(context.Background()) + defer streamCancel() + + streamClosed := make(chan error, 1) + go streamer.openStream(streamCtx, streamClosed) + + var timer *time.Timer + retryDelay := time.Duration(0) + + for { + select { + // stream was closed, check if we need to recreate it + case err := <-streamClosed: + if streamer.isClosed() { + return + } + + if err != nil { + prevDelay := retryDelay + retryDelay = streamer.backoffSupplier.SupplyRetryDelay(prevDelay) + + streamClosed = make(chan error, 1) + timer = time.AfterFunc(retryDelay, func() { streamer.openStream(streamCtx, streamClosed) }) + } else { + // if completed successfully just immediately recreate it, no need to back off + streamClosed = make(chan error, 1) + go streamer.openStream(streamCtx, streamClosed) + } + // TODO: increment job handled worker metric + case <-streamer.workerFinished: + // streamer was closed, most likely the worker is closing too + case <-streamer.closeSignal: + streamer.close() + + streamCancel() + if timer != nil { + timer.Stop() + } + + return + } + } +} + +func (streamer *jobStreamer) openStream(ctx context.Context, onClose chan<- error) { + // only keep one open stream at a time + var err error + streamer.streamMutex.Lock() + + defer func() { + streamer.streamMutex.Unlock() + onClose <- err + close(onClose) + }() + + if streamer.isClosed() { + return + } + + err = streamer.request.Send(ctx) +} + +func (streamer *jobStreamer) isClosed() bool { + streamer.closedMutex.Lock() + defer streamer.closedMutex.Unlock() + + return streamer.closed +} + +func (streamer *jobStreamer) close() { + streamer.closedMutex.Lock() + defer streamer.closedMutex.Unlock() + + streamer.closed = true +} diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker.go index cfb4dfe5..5087be53 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker.go @@ -16,9 +16,10 @@ package worker import ( + "sync" + "github.com/camunda/zeebe/clients/go/v8/pkg/commands" "github.com/camunda/zeebe/clients/go/v8/pkg/entities" - "sync" ) type JobClient interface { @@ -39,11 +40,13 @@ type JobWorker interface { type jobWorkerController struct { closePoller chan struct{} closeDispatcher chan struct{} + closeStreamer chan struct{} closeWait *sync.WaitGroup } func (controller jobWorkerController) Close() { close(controller.closePoller) + close(controller.closeStreamer) close(controller.closeDispatcher) controller.AwaitClose() } diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker_builder.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker_builder.go index 6609d09a..b3eaaa10 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker_builder.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/worker/jobWorker_builder.go @@ -17,13 +17,14 @@ package worker import ( "context" - "github.com/camunda/zeebe/clients/go/v8/pkg/commands" - "github.com/camunda/zeebe/clients/go/v8/pkg/entities" - "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "log" "math" "sync" "time" + + "github.com/camunda/zeebe/clients/go/v8/pkg/commands" + "github.com/camunda/zeebe/clients/go/v8/pkg/entities" + "github.com/camunda/zeebe/clients/go/v8/pkg/pb" ) const ( @@ -33,54 +34,66 @@ const ( DefaultJobWorkerPollThreshold = 0.3 RequestTimeoutOffset = 10 * time.Second DefaultRequestTimeout = 10 * time.Second + DefaultStreamEnabled = false ) +var defaultBackoffSupplier = NewExponentialBackoffBuilder().Build() + type JobWorkerBuilder struct { gatewayClient pb.GatewayClient jobClient JobClient request *pb.ActivateJobsRequest requestTimeout time.Duration - handler JobHandler - maxJobsActive int - concurrency int - pollInterval time.Duration - pollThreshold float64 - metrics JobWorkerMetrics - shouldRetry func(context.Context, error) bool + handler JobHandler + maxJobsActive int + concurrency int + pollInterval time.Duration + pollThreshold float64 + metrics JobWorkerMetrics + shouldRetry func(context.Context, error) bool + backoffSupplier BackoffSupplier + streamEnabled bool + streamRequestTimeout time.Duration } type JobWorkerBuilderStep1 interface { - // Set the type of jobs to work on + // JobType Set the type of jobs to work on JobType(string) JobWorkerBuilderStep2 } type JobWorkerBuilderStep2 interface { - // Set the handler to process jobs. The worker should complete or fail the job. The handler implementation + // Handler Set the handler to process jobs. The worker should complete or fail the job. The handler implementation // must be thread-safe. Handler(JobHandler) JobWorkerBuilderStep3 } type JobWorkerBuilderStep3 interface { - // Set the name of the worker owner + // Name Set the name of the worker owner Name(string) JobWorkerBuilderStep3 - // Set the duration no other worker should work on job activated by this worker + // Timeout Set the duration no other worker should work on job activated by this worker Timeout(time.Duration) JobWorkerBuilderStep3 - // Set the timeout for the request + // RequestTimeout Set the timeout for the request RequestTimeout(time.Duration) JobWorkerBuilderStep3 - // Set the maximum number of jobs which will be activated for this worker at the + // MaxJobsActive Set the maximum number of jobs which will be activated for this worker at the // same time. MaxJobsActive(int) JobWorkerBuilderStep3 - // Set the maximum number of concurrent spawned goroutines to complete jobs + // Concurrency Set the maximum number of concurrent spawned goroutines to complete jobs Concurrency(int) JobWorkerBuilderStep3 - // Set the maximal interval between polling for new jobs + // PollInterval Set the maximal interval between polling for new jobs PollInterval(time.Duration) JobWorkerBuilderStep3 - // Set the threshold of buffered activated jobs before polling for new jobs, i.e. threshold * MaxJobsActive(int) + // PollThreshold Set the threshold of buffered activated jobs before polling for new jobs, i.e. threshold * MaxJobsActive(int) PollThreshold(float64) JobWorkerBuilderStep3 - // Set list of variable names which should be fetched on job activation + // FetchVariables Set list of variable names which should be fetched on job activation FetchVariables(...string) JobWorkerBuilderStep3 - // Set implementation for metrics reporting + // Metrics Set implementation for metrics reporting Metrics(metrics JobWorkerMetrics) JobWorkerBuilderStep3 + // BackoffSupplier Set the backoffSupplier to back off polling on errors + BackoffSupplier(supplier BackoffSupplier) JobWorkerBuilderStep3 + // StreamEnabled Enables the job worker to stream jobs. It will still poll for older jobs, but streaming is favored. + StreamEnabled(bool) JobWorkerBuilderStep3 + // StreamRequestTimeout If streaming is enabled, this sets the timeout on the underlying job stream. It's useful to set a few hours to load-balance your streams over time. + StreamRequestTimeout(time.Duration) JobWorkerBuilderStep3 // Open the job worker and start polling and handling jobs Open() JobWorker } @@ -153,28 +166,46 @@ func (builder *JobWorkerBuilder) Metrics(metrics JobWorkerMetrics) JobWorkerBuil return builder } +func (builder *JobWorkerBuilder) BackoffSupplier(backoffSupplier BackoffSupplier) JobWorkerBuilderStep3 { + builder.backoffSupplier = backoffSupplier + return builder +} + +func (builder *JobWorkerBuilder) StreamEnabled(streamEnabled bool) JobWorkerBuilderStep3 { + builder.streamEnabled = streamEnabled + return builder +} + +func (builder *JobWorkerBuilder) StreamRequestTimeout(requestTimeout time.Duration) JobWorkerBuilderStep3 { + builder.streamRequestTimeout = requestTimeout + return builder +} + func (builder *JobWorkerBuilder) Open() JobWorker { jobQueue := make(chan entities.Job, builder.maxJobsActive) workerFinished := make(chan bool, builder.maxJobsActive) closePoller := make(chan struct{}) closeDispatcher := make(chan struct{}) + closeStreamer := make(chan struct{}) var closeWait sync.WaitGroup - closeWait.Add(2) + closeWait.Add(3) poller := jobPoller{ - client: builder.gatewayClient, - maxJobsActive: builder.maxJobsActive, - pollInterval: builder.pollInterval, - request: builder.request, - requestTimeout: builder.requestTimeout, + client: builder.gatewayClient, + maxJobsActive: builder.maxJobsActive, + pollInterval: builder.pollInterval, + initialPollInterval: builder.pollInterval, + request: builder.request, + requestTimeout: builder.requestTimeout, - jobQueue: jobQueue, - workerFinished: workerFinished, - closeSignal: closePoller, - remaining: 0, - threshold: int(math.Round(float64(builder.maxJobsActive) * builder.pollThreshold)), - metrics: builder.metrics, - shouldRetry: builder.shouldRetry, + jobQueue: jobQueue, + workerFinished: workerFinished, + closeSignal: closePoller, + remaining: 0, + threshold: int(math.Round(float64(builder.maxJobsActive) * builder.pollThreshold)), + metrics: builder.metrics, + shouldRetry: builder.shouldRetry, + backoffSupplier: builder.backoffSupplier, } dispatcher := jobDispatcher{ @@ -183,12 +214,36 @@ func (builder *JobWorkerBuilder) Open() JobWorker { closeSignal: closeDispatcher, } - go poller.poll(&closeWait) go dispatcher.run(builder.jobClient, builder.handler, builder.concurrency, &closeWait) + go poller.poll(&closeWait) + + if builder.streamEnabled { + streamRequest := commands.NewStreamJobsCommand(builder.gatewayClient, builder.shouldRetry). + JobType(builder.request.Type). + Consumer(jobQueue). + Timeout(time.Duration(builder.request.Timeout) * time.Millisecond). + FetchVariables(builder.request.FetchVariable...). + TenantIds(builder.request.TenantIds...). + WorkerName(builder.request.Worker). + RequestTimeout(builder.streamRequestTimeout) + streamer := jobStreamer{ + workerFinished: workerFinished, + closeSignal: closeStreamer, + request: streamRequest, + backoffSupplier: builder.backoffSupplier, + retryDelay: 0, + } + + go streamer.stream(&closeWait) + } else { + // simulate streamer is already closed + closeWait.Done() + } return jobWorkerController{ closePoller: closePoller, closeDispatcher: closeDispatcher, + closeStreamer: closeStreamer, closeWait: &closeWait, } } @@ -210,8 +265,9 @@ func NewJobWorkerBuilder(gatewayClient pb.GatewayClient, jobClient JobClient, re Worker: commands.DefaultJobWorkerName, RequestTimeout: DefaultRequestTimeout.Milliseconds(), }, - requestTimeout: DefaultRequestTimeout + RequestTimeoutOffset, - shouldRetry: retryPred, + requestTimeout: DefaultRequestTimeout + RequestTimeoutOffset, + shouldRetry: retryPred, + backoffSupplier: defaultBackoffSupplier, } } diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/api.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/api.go index b9fa2a14..fd41768d 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/api.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/api.go @@ -38,9 +38,11 @@ type Client interface { NewBroadcastSignalCommand() commands.BroadcastSignalCommandStep1 NewActivateJobsCommand() commands.ActivateJobsCommandStep1 + NewStreamJobsCommand() commands.StreamJobsCommandStep1 NewCompleteJobCommand() commands.CompleteJobCommandStep1 NewFailJobCommand() commands.FailJobCommandStep1 NewUpdateJobRetriesCommand() commands.UpdateJobRetriesCommandStep1 + NewUpdateJobTimeoutCommand() commands.UpdateJobTimeoutCommandStep1 NewThrowErrorCommand() commands.ThrowErrorCommandStep1 NewDeleteResourceCommand() commands.DeleteResourceCommandStep1 diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/client.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/client.go index 5d9bb56b..38abd788 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/client.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/client.go @@ -18,14 +18,15 @@ import ( "crypto/tls" "errors" "fmt" - "github.com/camunda/zeebe/clients/go/v8/internal/embedded" - "google.golang.org/grpc/credentials/insecure" "log" "os" "strconv" "strings" "time" + "github.com/camunda/zeebe/clients/go/v8/internal/embedded" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/credentials" "google.golang.org/grpc/keepalive" @@ -131,6 +132,10 @@ func (c *ClientImpl) NewUpdateJobRetriesCommand() commands.UpdateJobRetriesComma return commands.NewUpdateJobRetriesCommand(c.gateway, c.credentialsProvider.ShouldRetryRequest) } +func (c *ClientImpl) NewUpdateJobTimeoutCommand() commands.UpdateJobTimeoutCommandStep1 { + return commands.NewUpdateJobTimeoutCommand(c.gateway, c.credentialsProvider.ShouldRetryRequest) +} + func (c *ClientImpl) NewSetVariablesCommand() commands.SetVariablesCommandStep1 { return commands.NewSetVariablesCommand(c.gateway, c.credentialsProvider.ShouldRetryRequest) } @@ -147,6 +152,10 @@ func (c *ClientImpl) NewDeleteResourceCommand() commands.DeleteResourceCommandSt return commands.NewDeleteResourceCommand(c.gateway, c.credentialsProvider.ShouldRetryRequest) } +func (c *ClientImpl) NewStreamJobsCommand() commands.StreamJobsCommandStep1 { + return commands.NewStreamJobsCommand(c.gateway, c.credentialsProvider.ShouldRetryRequest) +} + func (c *ClientImpl) NewJobWorker() worker.JobWorkerBuilderStep1 { return worker.NewJobWorkerBuilder(c.gateway, c, c.credentialsProvider.ShouldRetryRequest) } diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsCache.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsCache.go index 2c038a52..576e0c33 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsCache.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsCache.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/mitchellh/go-homedir" "golang.org/x/oauth2" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "log" "os" "path" diff --git a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsProvider.go b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsProvider.go index 715e155b..b146ba1d 100644 --- a/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsProvider.go +++ b/vendor/github.com/camunda/zeebe/clients/go/v8/pkg/zbc/oauthCredentialsProvider.go @@ -38,6 +38,9 @@ const OAuthClientSecretEnvVar = "ZEEBE_CLIENT_SECRET" // #nosec 101 const OAuthTokenAudienceEnvVar = "ZEEBE_TOKEN_AUDIENCE" +// #nosec 101 +const OAuthTokenScopeEnvVar = "ZEEBE_TOKEN_SCOPE" + //nolint:revive const OAuthAuthorizationUrlEnvVar = "ZEEBE_AUTHORIZATION_SERVER_URL" const OAuthRequestTimeoutEnvVar = "ZEEBE_AUTH_REQUEST_TIMEOUT" @@ -69,6 +72,8 @@ type OAuthProviderConfig struct { ClientSecret string // The audience to which the access token will be sent. Can be overridden with the environment variable 'ZEEBE_TOKEN_AUDIENCE'. Audience string + // The scope(s) to be included in the access token. Can be overridden with the environment variable 'ZEEBE_TOKEN_SCOPE'. + Scope string // The URL for the authorization server from which the access token will be requested. Can be overridden with // the environment variable 'ZEEBE_AUTHORIZATION_SERVER_URL'. AuthorizationServerURL string @@ -128,6 +133,7 @@ func NewOAuthCredentialsProvider(config *OAuthProviderConfig) (*OAuthCredentials TokenConfig: &clientcredentials.Config{ ClientID: config.ClientID, ClientSecret: config.ClientSecret, + Scopes: []string{config.Scope}, EndpointParams: map[string][]string{"audience": {config.Audience}}, TokenURL: config.AuthorizationServerURL, AuthStyle: oauth2.AuthStyleInParams, @@ -211,6 +217,9 @@ func applyCredentialEnvOverrides(config *OAuthProviderConfig) error { if envAudience := env.get(OAuthTokenAudienceEnvVar); envAudience != "" { config.Audience = envAudience } + if envScope := env.get(OAuthTokenScopeEnvVar); envScope != "" { + config.Scope = envScope + } if envAuthzServerURL := env.get(OAuthAuthorizationUrlEnvVar); envAuthzServerURL != "" { config.AuthorizationServerURL = envAuthzServerURL } diff --git a/vendor/github.com/emersion/go-message/.build.yml b/vendor/github.com/emersion/go-message/.build.yml index 36f961ae..cc583f26 100644 --- a/vendor/github.com/emersion/go-message/.build.yml +++ b/vendor/github.com/emersion/go-message/.build.yml @@ -1,4 +1,4 @@ -image: alpine/edge +image: alpine/latest packages: - go sources: @@ -15,3 +15,6 @@ tasks: - coverage: | cd go-message go tool cover -html=coverage.txt -o ~/coverage.html + - gofmt: | + cd go-message + test -z $(gofmt -l .) diff --git a/vendor/github.com/emersion/go-message/mail/header.go b/vendor/github.com/emersion/go-message/mail/header.go index df55f52d..a69059f0 100644 --- a/vendor/github.com/emersion/go-message/mail/header.go +++ b/vendor/github.com/emersion/go-message/mail/header.go @@ -250,14 +250,23 @@ func (h *Header) SetAddressList(key string, addrs []*Address) { } } -// Date parses the Date header field. +// Date parses the Date header field. If the header field is missing, it +// returns the zero time. func (h *Header) Date() (time.Time, error) { - return mail.ParseDate(h.Get("Date")) + v := h.Get("Date") + if v == "" { + return time.Time{}, nil + } + return mail.ParseDate(v) } // SetDate formats the Date header field. func (h *Header) SetDate(t time.Time) { - h.Set("Date", t.Format(dateLayout)) + if !t.IsZero() { + h.Set("Date", t.Format(dateLayout)) + } else { + h.Del("Date") + } } // Subject parses the Subject header field. If there is an error, the raw field @@ -347,7 +356,11 @@ func base36(input uint64) string { // SetMessageID sets the Message-ID field. id is the message identifier, // without the angle brackets. func (h *Header) SetMessageID(id string) { - h.Set("Message-Id", "<"+id+">") + if id != "" { + h.Set("Message-Id", "<"+id+">") + } else { + h.Del("Message-Id") + } } // SetMsgIDList formats a list of message identifiers. Message identifiers diff --git a/vendor/github.com/gofiber/fiber/v2/app.go b/vendor/github.com/gofiber/fiber/v2/app.go index 47a01dd0..2ce88704 100644 --- a/vendor/github.com/gofiber/fiber/v2/app.go +++ b/vendor/github.com/gofiber/fiber/v2/app.go @@ -30,7 +30,7 @@ import ( ) // Version of current fiber package -const Version = "2.51.0" +const Version = "2.52.0" // Handler defines a function to serve HTTP requests. type Handler = func(*Ctx) error diff --git a/vendor/github.com/gofiber/fiber/v2/utils/ips.go b/vendor/github.com/gofiber/fiber/v2/utils/ips.go index 4886c117..54ab11b9 100644 --- a/vendor/github.com/gofiber/fiber/v2/utils/ips.go +++ b/vendor/github.com/gofiber/fiber/v2/utils/ips.go @@ -23,7 +23,7 @@ func IsIPv4(s string) bool { for ci = 0; ci < len(s) && '0' <= s[ci] && s[ci] <= '9'; ci++ { n = n*10 + int(s[ci]-'0') - if n >= 0xFF { + if n > 0xFF { return false } } diff --git a/vendor/github.com/golang-module/carbon/v2/README.cn.md b/vendor/github.com/golang-module/carbon/v2/README.cn.md index 4c4ae945..5a2b03bc 100644 --- a/vendor/github.com/golang-module/carbon/v2/README.cn.md +++ b/vendor/github.com/golang-module/carbon/v2/README.cn.md @@ -5,7 +5,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/golang-module/carbon/v2)](https://goreportcard.com/report/github.com/golang-module/carbon/v2) [![Go Coverage](https://codecov.io/gh/golang-module/carbon/branch/master/graph/badge.svg)](https://codecov.io/gh/golang-module/carbon) [![Goproxy.cn](https://goproxy.cn/stats/github.com/golang-module/carbon/badges/download-count.svg)](https://goproxy.cn) -[![Carbon Doc](https://img.shields.io/badge/go.dev-reference-brightgreen?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/golang-module/carbon) +[![Carbon Doc](https://img.shields.io/badge/go.dev-reference-brightgreen?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/golang-module/carbon/v2) [![License](https://img.shields.io/github/license/golang-module/carbon)](https://github.com/golang-module/carbon/blob/master/LICENSE) 简体中文 | [English](README.md) | [日本語](README.jp.md) @@ -50,13 +50,26 @@ import "gitee.com/golang-module/carbon" #### 用法示例 -> 默认时区为 Local,即服务器所在时区,假设当前时间为 2020-08-05 13:14:15.999999999 +0800 CST +> 假设当前时间为 2020-08-05 13:14:15.999999999 +0800 CST + +##### 设置默认值(全局生效) + +```go +carbon.SetDefault(carbon.Default{ + Layout: carbon.RFC3339Layout, + Timezone: carbon.PRC, + WeekStartsAt: carbon.Sunday, + Locale: "zh-CN", +}) +``` + +> 如果没有设置,默认布局模板是 `2006-01-02 15:04:05`, 默认时区是 `Local`, 默认一周开始日期是 `Sunday(周日)`, 默认语言是 `en` ##### 昨天、今天、明天 ```go // 今天此刻 -fmt.Sprintf("%s", carbon.Now()) // 2020-08-05 13:14:15 +fmt.Printf("%s", carbon.Now()) // 2020-08-05 13:14:15 carbon.Now().String() // 2020-08-05 13:14:15 carbon.Now().ToString() // 2020-08-05 13:14:15 +0800 CST carbon.Now().ToDateTimeString() // 2020-08-05 13:14:15 @@ -76,7 +89,7 @@ carbon.Now().TimestampMicro() // 1596604455999999 carbon.Now().TimestampNano() // 1596604455999999999 // 昨天此刻 -fmt.Sprintf("%s", carbon.Yesterday()) // 2020-08-04 13:14:15 +fmt.Printf("%s", carbon.Yesterday()) // 2020-08-04 13:14:15 carbon.Yesterday().String() // 2020-08-04 13:14:15 carbon.Yesterday().ToString() // 2020-08-04 13:14:15 +0800 CST carbon.Yesterday().ToDateTimeString() // 2020-08-04 13:14:15 @@ -98,7 +111,7 @@ carbon.Yesterday().TimestampMicro() // 1596518055999999 carbon.Yesterday().TimestampNano() // 1596518055999999999 // 明天此刻 -fmt.Sprintf("%s", carbon.Tomorrow()) // 2020-08-06 13:14:15 +fmt.Printf("%s", carbon.Tomorrow()) // 2020-08-06 13:14:15 carbon.Tomorrow().String() // 2020-08-06 13:14:15 carbon.Tomorrow().ToString() // 2020-08-06 13:14:15 +0800 CST carbon.Tomorrow().ToDateTimeString() // 2020-08-06 13:14:15 @@ -145,7 +158,7 @@ carbon.CreateFromDateTimeMicro(2020, 8, 5, 13, 14, 15, 999999).ToString() // 202 carbon.CreateFromDateTimeNano(2020, 8, 5, 13, 14, 15, 999999999).ToString() // 2020-08-05 13:14:15.999999999 +0800 CST // 从年月日创建 Carbon 实例 -carbon.CreateFromDate(2020, 8, 5).ToString() // // 2020-08-05 00:00:00 +0800 CST +carbon.CreateFromDate(2020, 8, 5).ToString() // 2020-08-05 00:00:00 +0800 CST // 从年月日创建 Carbon 实例,包含毫秒 carbon.CreateFromDateMilli(2020, 8, 5, 999).ToString() // 2020-08-05 00:00:00.999 +0800 CST // 从年月日创建 Carbon 实例,包含微秒 @@ -235,26 +248,13 @@ carbon.ParseByLayout("2020-08-05 13:14:15", "2006-01-02 15:04:05", carbon.Tokyo) ##### Carbon 和 time.Time 互转 ```go -// 将 time.Time 转换成 Carbon +// 将标准 time.Time 转换成 Carbon carbon.CreateFromStdTime(time.Now()) -// 将 Carbon 转换成 time.Time +// 将 Carbon 转换成标准 time.Time carbon.Now().ToStdTime() ``` -##### 最近和最远 - -```go -c := carbon.Parse("2023-04-01") -c1 := carbon.Parse("2023-03-28") -c2 := carbon.Parse("2023-04-16") - -// 返回最近的 Carbon 实例 -c.Closest(c1, c2) // c1 -// 返回最远的 Carbon 实例 -c.Farthest(c1, c2) // c2 -``` - -##### 开始时间、结束时间 +##### 时间边界 ```go // 本世纪开始时间 @@ -493,7 +493,7 @@ carbon.Parse("2020-08-05 13:14:15.222222222").SubNanosseconds(3).ToString() // 2 carbon.Parse("2020-08-05 13:14:15.222222222").SubNanossecond().ToString() // 2020-08-05 13:14:15.222222221 +0800 CST ``` -##### 时间差 +##### 时间差值 ```go // 相差多少年 @@ -553,6 +553,26 @@ carbon.Parse("2018-08-05 13:14:15").DiffForHumans(carbon.Now()) // 1 year after carbon.Parse("2022-08-05 13:14:15").DiffForHumans(carbon.Now()) // 2 years after ``` +##### 时间极值 + +```go +c0 := carbon.Parse("2023-04-01") +c1 := carbon.Parse("2023-03-28") +c2 := carbon.Parse("2023-04-16") +// 返回最近的 Carbon 实例 +c0.Closest(c1, c2) // c1 +// 返回最远的 Carbon 实例 +c0.Farthest(c1, c2) // c2 + +yesterday := carbon.Yesterday() +today := carbon.Now() +tomorrow := carbon.Tomorrow() +// 返回最大的 Carbon 实例 +carbon.Max(yesterday, today, tomorrow) // tomorrow +// 返回最小的 Carbon 实例 +carbon.Min(yesterday, today, tomorrow) // yesterday +``` + ##### 时间判断 ```go @@ -595,6 +615,17 @@ carbon.Parse("2020-08-05 00:00:00").IsInvalid() // false carbon.Parse("2020-08-05").IsInvalid() // false carbon.Parse("2020-08-05").SetTimezone("xxx").IsInvalid() // true +// 是否是上午 +carbon.Parse("2020-08-05 00:00:00").IsAM() // true +carbon.Parse("2020-08-05 08:00:00").IsAM() // true +carbon.Parse("2020-08-05 12:00:00").IsAM() // false +carbon.Parse("2020-08-05 13:00:00").IsAM() // false +// 是否是下午 +carbon.Parse("2020-08-05 00:00:00").IsPM() // false +carbon.Parse("2020-08-05 08:00:00").IsPM() // false +carbon.Parse("2020-08-05 12:00:00").IsPM() // true +carbon.Parse("2020-08-05 13:00:00").IsPM() // true + // 是否是当前时间 carbon.Now().IsNow() // true // 是否是未来时间 @@ -1080,7 +1111,7 @@ carbon.Parse("2020-08-05T13:14:15.999999999+08:00").ToRfc3339MicroString() // 20 carbon.Parse("2020-08-05T13:14:15.999999999+08:00").ToRfc3339NanoString() // 2020-08-05T13:14:15.999999999+08:00 // 输出日期时间字符串 -fmt.Sprintf("%s", carbon.Parse("2020-08-05 13:14:15")) // 2020-08-05 13:14:15 +fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15")) // 2020-08-05 13:14:15 // 输出"2006-01-02 15:04:05.999999999 -0700 MST"格式字符串 carbon.Parse("2020-08-05 13:14:15").ToString() // 2020-08-05 13:14:15.999999 +0800 CST @@ -1182,7 +1213,7 @@ carbon.Parse("2020-08-05 13:14:15").Lunar().LeapMonth() // 4 // 获取农历日日期 carbon.Parse("2020-08-05 13:14:15").Lunar().Day() // 16 // 获取农历 YYYY-MM-DD HH::ii::ss 格式字符串 -fmt.Sprintf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 2020-06-16 13:14:15 +fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 2020-06-16 13:14:15 // 获取农历年字符串 carbon.Parse("2020-08-05 13:14:15").Lunar().ToYearString() // 二零二零 @@ -1254,93 +1285,172 @@ carbon.Parse("2020-03-21 21:00:00").Lunar().IsTwelfthDoubleHour() // true ##### JSON -###### 定义模型 - +###### 场景一: 所有时间字段有相同的格式 ```go +carbon.SetDefault(carbon.Default{ + Layout: carbon.RFC3339Layout, +}) + type Person struct { - Name string `json:"name"` - Age int `json:"age"` - Birthday carbon.Carbon `json:"birthday" carbon:"layout:2006-01-02"` - GraduatedAt carbon.Carbon `json:"graduated_at" carbon:"layout:15:04:05"` - CreatedAt carbon.Carbon `json:"created_at" carbon:"layout:2006-01-02 15:04:05"` + Name string `json:"name"` + Age int `json:"age"` + + Field1 Carbon `json:"field1"` + Field2 Carbon `json:"field2"` + Field3 Carbon `json:"field3"` + Field4 Carbon `json:"field4"` + + Field5 Carbon `json:"field5"` + Field6 Carbon `json:"field6"` + Field7 Carbon `json:"field7"` + Field8 Carbon `json:"field8"` } -``` -或 - -```go -type Person struct { - Name string `json:"name"` - Age int `json:"age"` - Birthday carbon.Carbon `json:"birthday" carbon:"format:Y-m-d"` - GraduatedAt carbon.Carbon `json:"graduated_at" carbon:"format:H:i:s"` - CreatedAt carbon.Carbon `json:"created_at" carbon:"format:Y-m-d H:i:s"` -} -``` -###### 实例化模型 - -```go -now := Parse("2020-08-05 13:14:15", PRC) +now := carbon.Parse("2020-08-05 13:14:15", carbon.PRC) person := Person { - Name: "gouguoyin", - Age: 18, - Birthday: now, - GraduatedAt: now, - CreatedAt: now, + Name: "gouguoyin", + Age: 18, + + Field1: now, + Field2: now, + Field3: now, + Field4: now, + Field5: now, + Field6: now, + Field7: now, + Field8: now, } -``` -###### JSON 编码 - -```go -err1 := carbon.LoadTag(&person) -if err1 != nil { - // 错误处理 - log.Fatal(err1) -} -data, err2 := json.Marshal(person) -if err2 != nil { - // 错误处理 - log.Fatal(err2) +data, marshalErr := json.Marshal(person) +if marshalErr != nil { + // 错误处理 + log.Fatal(marshalErr) } fmt.Printf("%s", data) // 输出 { - "name": "gouguoyin", - "age": 18, - "birthday": "2020-08-05", - "graduated_at": "13:14:15", - "created_at": "2020-08-05 13:14:15" + "name": "gouguoyin", + "age": 18, + "field1": "2020-08-05T13:14:15+08:00", + "field2": "2020-08-05T13:14:15+08:00", + "field3": "2020-08-05T13:14:15+08:00", + "field4": "2020-08-05T13:14:15+08:00", + "field5": "2020-08-05T13:14:15+08:00", + "field6": "2020-08-05T13:14:15+08:00", + "field7": "2020-08-05T13:14:15+08:00", + "field8": "2020-08-05T13:14:15+08:00" } + +unmarshalErr := json.Unmarshal(data, &person) +if unmarshalErr != nil { + // 错误处理 + log.Fatal(unmarshalErr) +} + +fmt.Printf("%s", person.Field1) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field2) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field3) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field4) // 2020-08-05T13:14:15+08:00 + +fmt.Printf("%s", person.Field5) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field6) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field7) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field8) // 2020-08-05T13:14:15+08:00 ``` -###### JSON 解码 +###### 场景二: 不同时间字段有不同的格式 + +> 所有支持的 type 值请点击 这里 查阅。 如果 `carbon` 标签没有设置,默认是 `layout:2006-01-02 15:04:05`;如果 `tz` 标签没有设置,默认是 `Local` ```go -str := `{ - "name": "gouguoyin", - "age": 18, - "birthday": "2020-08-05", - "graduated_at": "13:14:15", - "created_at": "2020-08-05 13:14:15" -}` +type Person struct { + Name string `json:"name"` + Age int `json:"age"` + + Field1 Carbon `json:"field1"` + + Field2 Carbon `json:"field2" carbon:"type:date" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"type:time" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"type:dateTime" tz:"PRC"` + // 或者 + Field2 Carbon `json:"field2" carbon:"layout:2006-01-02" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"layout:15:04:05" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"layout:2006-01-02 15:04:05" tz:"PRC"` + // 或者 + Field2 Carbon `json:"field2" carbon:"layout:2006-01-02" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"layout:15:04:05" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"layout:2006-01-02 15:04:05" tz:"PRC"` + + Field5 Carbon `json:"field5" carbon:"type:timestamp" tz:"PRC"` + Field6 Carbon `json:"field6" carbon:"type:timestampMilli" tz:"PRC"` + Field7 Carbon `json:"field7" carbon:"type:timestampMicro" tz:"PRC"` + Field8 Carbon `json:"field8" carbon:"type:timestampNano" tz:"PRC"` +} + +now := Parse("2020-08-05 13:14:15", carbon.PRC) +person := Person { + Name: "gouguoyin", + Age: 18, + + Field1: now, + Field2: now, + Field3: now, + Field4: now, + Field5: now, + Field6: now, + Field7: now, + Field8: now, +} + +loadErr := carbon.LoadTag(&person) +if loadErr != nil { + // 错误处理 + log.Fatal(loadErr) +} +data, marshalErr := json.Marshal(person) +if marshalErr != nil { + // 错误处理 + log.Fatal(marshalErr) +} +fmt.Printf("%s", data) +// 输出 +{ + "name": "gouguoyin", + "age": 18, + "field1": "2020-08-05 13:14:15", + "field2": "2020-08-05", + "field3": "13:14:15", + "field4": "2020-08-05 13:14:15", + "field5": 1596604455, + "field6": 1596604455999, + "field7": 1596604455999999, + "field8": 1596604455999999999 +} + var person Person -err1 := carbon.LoadTag(&person) -if err1 != nil { - // 错误处理 - log.Fatal(err1) +loadErr := carbon.LoadTag(&person) +if loadErr != nil { + // 错误处理 + log.Fatal(loadErr) } -err2 := json.Unmarshal([]byte(str), &person) -if err2 != nil { - // 错误处理 - log.Fatal(err2) +unmarshalErr := json.Unmarshal(data, &person) +if unmarshalErr != nil { + // 错误处理 + log.Fatal(unmarshalErr) } -fmt.Sprintf("%s", person.Birthday) // 2002-08-05 -fmt.Sprintf("%s", person.GraduatedAt) // 13:14:15 -fmt.Sprintf("%s", person.CreatedAt) // 2002-08-05 13:14:15 +fmt.Printf("%s", person.Field1) // 2002-08-05 13:14:15 +fmt.Printf("%s", person.Field2) // 2020-08-05 +fmt.Printf("%s", person.Field3) // 13:14:15 +fmt.Printf("%s", person.Field4) // 2002-08-05 13:14:15 + +fmt.Printf("%d", person.Field5) // 1596604455 +fmt.Printf("%d", person.Field6) // 1596604455999 +fmt.Printf("%d", person.Field7) // 1596604455999999 +fmt.Printf("%d", person.Field8) // 1596604455999999999 + ``` ##### 国际化 @@ -1366,16 +1476,18 @@ fmt.Sprintf("%s", person.CreatedAt) // 2002-08-05 13:14:15 * [瑞典语(se)](./lang/se.json "瑞典语"): 由 [jwanglof](https://github.com/jwanglof "jwanglof") 翻译 * [伊朗语(fa)](./lang/fa.json "伊朗语"): 由 [erfanMomeniii](https://github.com/ErfanMomeniii "ErfanMomeniii") 翻译 * [波兰语(nl)](./lang/nl.json "波兰语"): 由 [RemcoE33](https://github.com/RemcoE33 "RemcoE33") 翻译 +* [越南语(vi)](./lang/vi.json "越南语"): 由 [culy247](https://github.com/culy247 "culy247") 翻译 +* [印地语(hi)](./lang/hi.json "印地语"): 由 [chauhan17nitin](https://github.com/chauhan17nitin "chauhan17nitin") 翻译 目前支持的方法有 -* `Constellation()`:获取星座 -* `Season()`:获取季节 -* `DiffForHumans()`:获取对人类友好的可读格式时间差 -* `ToMonthString()`:输出完整月份字符串 -* `ToShortMonthString()`:输出缩写月份字符串 -* `ToWeekString()`:输出完整星期字符串 -* `ToShortWeekString()`:输出缩写星期字符串 +* `Constellation()`:获取星座,如 `白羊座` +* `Season()`:获取季节,如 `夏季` +* `DiffForHumans()`:获取对人类友好的可读格式时间差,如 `一小时前` +* `ToMonthString()`:输出完整月份字符串,如 `一月` +* `ToShortMonthString()`:输出缩写月份字符串,如 `1月` +* `ToWeekString()`:输出完整星期字符串,如 `星期一` +* `ToShortWeekString()`:输出缩写星期字符串,如 `周一` ###### 设置区域 @@ -1385,8 +1497,8 @@ lang.SetLocale("zh-CN") c := carbon.SetLanguage(lang) if c.Error != nil { - // 错误处理 - log.Fatal(err) + // 错误处理 + log.Fatal(c.Error) } c.Now().AddHours(1).DiffForHumans() // 1 小时后 @@ -1402,17 +1514,16 @@ c.Now().AddHours(1).Season() // 夏季 ```go lang := carbon.NewLanguage() -lang.SetLocale("en") resources := map[string]string { - "hour": "%dh", + "hour": "%dh", } -lang.SetResources(resources) +lang.SetLocale("en").SetResources(resources) c := carbon.SetLanguage(lang) if c.Error != nil { - // 错误处理 - log.Fatal(err) + // 错误处理 + log.Fatal(c.Error) } c.Now().AddYears(1).DiffForHumans() // 1 year from now @@ -1430,24 +1541,24 @@ c.Now().Season() // Summer ```go lang := carbon.NewLanguage() resources := map[string]string { - "months": "january|february|march|april|may|june|july|august|september|october|november|december", - "short_months": "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", - "weeks": "sunday|monday|tuesday|wednesday|thursday|friday|saturday", - "short_weeks": "sun|mon|tue|wed|thu|fri|sat", - "seasons": "spring|summer|autumn|winter", - "constellations": "aries|taurus|gemini|cancer|leo|virgo|libra|scorpio|sagittarius|capricornus|aquarius|pisce", - "year": "1 yr|%d yrs", - "month": "1 mo|%d mos", - "week": "%dw", - "day": "%dd", - "hour": "%dh", - "minute": "%dm", - "second": "%ds", - "now": "just now", - "ago": "%s ago", - "from_now": "in %s", - "before": "%s before", - "after": "%s after", + "months": "january|february|march|april|may|june|july|august|september|october|november|december", + "short_months": "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", + "weeks": "sunday|monday|tuesday|wednesday|thursday|friday|saturday", + "short_weeks": "sun|mon|tue|wed|thu|fri|sat", + "seasons": "spring|summer|autumn|winter", + "constellations": "aries|taurus|gemini|cancer|leo|virgo|libra|scorpio|sagittarius|capricornus|aquarius|pisce", + "year": "1 yr|%d yrs", + "month": "1 mo|%d mos", + "week": "%dw", + "day": "%dd", + "hour": "%dh", + "minute": "%dm", + "second": "%ds", + "now": "just now", + "ago": "%s ago", + "from_now": "in %s", + "before": "%s before", + "after": "%s after", } lang.SetResources(resources) @@ -1462,20 +1573,21 @@ c.Now().Constellation() // leo c.Now().Season() // summer ``` -##### 测试 +##### 模拟测试 ```go -testNow := carbon.Parse("2020-08-05") +c := carbon.SetTimezone(carbon.UTC) -carbon.SetTestNow(testNow).Yesterday().ToDateString() // 2020-08-04 -carbon.SetTestNow(testNow).Now().ToDateString() // 2020-08-05 -carbon.SetTestNow(testNow).Tomorrow().ToDateString() // 2020-08-06 -carbon.SetTestNow(testNow).Parse("2000-08-05").Age() // 30 +c.Now().ToDateString() // 2023-12-27 +c.Now().IsSetTestNow() // false -carbon.Now().HasTestNow() // false -carbon.SetTestNow(testNow).HasTestNow() // true -carbon.SetTestNow(testNow).ClearTestNow().HasTestNow() // false +c.SetTestNow(carbon.Parse("2020-08-05")) +c.Now().ToDateString() // 2020-08-05 +c.Now().IsSetTestNow() // true +c.UnSetTestNow() +c.Now().ToDateString() // 2023-12-27 +c.Now().IsSetTestNow() // false ``` ##### 错误处理 @@ -1485,10 +1597,9 @@ carbon.SetTestNow(testNow).ClearTestNow().HasTestNow() // false ```go c := carbon.SetTimezone("xxx").Parse("2020-08-05") if c.Error != nil { - // 错误处理... - log.Fatal(c.Error) + // 错误处理 + log.Fatal(c.Error) } -fmt.Println(c.ToDateTimeString()) // 输出 invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for all valid timezones ``` @@ -1498,7 +1609,7 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for ##### 格式化符号表 | 符号 | 描述 | 长度 | 范围 | 示例 | -| :------------: | :------------: |:--:|:----------------:| :------------: | +| :------------: | :------------: |:--------------:|:----------------:| :------------: | | d | 月份中的第几天,有前导零 | 2 | 01-31 | 02 | | D | 缩写单词表示的周几 | 3 | Mon-Sun | Mon | | j | 月份中的第几天,没有前导零 | - | 1-31 | 2 | @@ -1518,16 +1629,19 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for | H | 小时,24 小时格式 | 2 | 00-23 | 15 | | i | 分钟 | 2 | 01-59 | 04 | | s | 秒数 | 2 | 01-59 | 05 | -| c | ISO8601 格式日期 | - | - | 2006-01-02T15:04:05-07:00 | -| r | RFC2822 格式日期 | - | - | Mon, 02 Jan 2006 15:04:05 -0700 | | O | 与格林威治时间相差的小时数 | - | - | -0700 | -| P | 与格林威治时间相差的小时数,小时和分钟之间有冒号分隔 | - | - | +07:00 | +| P | 与格林威治时间相差的小时数,小时和分钟之间有冒号分隔 | - | - | -07:00 | | T | 时区缩写 | - | - | MST | | W | ISO8601 格式数字表示的年份中的第几周 | 2 | 01-52 | 01 | | N | ISO8601 格式数字表示的星期中的第几天 | 2 | 01-07 | 02 | | L | 是否为闰年,如果是闰年为 1,否则为 0 | 1 | 0-1 | 0 | -| U | 秒级时间戳 | 10 | - | 1611818268 | -| u | 毫秒 | - | 1-999 | 999 | +| U | 秒级时间戳 | - | - | 1596604455 | +| V | 毫级时间戳 | - | - | 1596604455666 | +| X | 微级时间戳 | - | - | 1596604455666666 | +| Z | 纳级时间戳 | - | - | 1596604455666666666 | +| v | 毫秒 | - | 1-999 | 999 | +| u | 微秒 | - | 1-999999 | 999999 | +| x | 纳秒 | - | 1-999999999 | 999999999 | | w | 数字表示的周几 | 1 | 0-6 | 1 | | t | 月份中的总天数 | 2 | 28-31 | 31 | | z | 年份中的第几天 | - | 1-365 | 2 | @@ -1583,4 +1697,4 @@ COPY ./zoneinfo.zip /usr/local/go/lib/time/zoneinfo.zip `Carbon`已获取免费的 JetBrains 开源许可证,在此表示感谢 -JetBrains +JetBrains diff --git a/vendor/github.com/golang-module/carbon/v2/README.jp.md b/vendor/github.com/golang-module/carbon/v2/README.jp.md index 43afd6aa..fd848465 100644 --- a/vendor/github.com/golang-module/carbon/v2/README.jp.md +++ b/vendor/github.com/golang-module/carbon/v2/README.jp.md @@ -5,7 +5,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/golang-module/carbon/v2)](https://goreportcard.com/report/github.com/golang-module/carbon/v2) [![Go Coverage](https://codecov.io/gh/golang-module/carbon/branch/master/graph/badge.svg)](https://codecov.io/gh/golang-module/carbon) [![Goproxy.cn](https://goproxy.cn/stats/github.com/golang-module/carbon/badges/download-count.svg)](https://goproxy.cn) -[![Carbon Doc](https://img.shields.io/badge/go.dev-reference-brightgreen?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/golang-module/carbon) +[![Carbon Doc](https://img.shields.io/badge/go.dev-reference-brightgreen?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/golang-module/carbon/v2) [![License](https://img.shields.io/github/license/golang-module/carbon)](https://github.com/golang-module/carbon/blob/master/LICENSE) 日本語 | [English](README.md) | [简体中文](README.cn.md) @@ -54,13 +54,26 @@ import "gitee.com/golang-module/carbon" 人気のある問題 #### 使い方の例 -> デフォルトのタイムゾーンはLocalです。つまりサーバのタイムゾーンです, 現在の時間は 2020-08-05 13:14:15.999999999 +0800 CST CST と仮定します +> 現在時刻が 2020-08-05 13:14:15.999999999 +0800 CST であると仮定します。 + +##### デフォルト値の設定 (グローバルに有効) + +```go +carbon.SetDefault(carbon.Default{ + Layout: carbon.RFC3339Layout, + Timezone: carbon.PRC, + WeekStartsAt: carbon.Sunday, + Locale: "jp", +}) +``` + +> 設定されていない場合,デフォルトのレイアウト テンプレートは `2006-01-02 15:04:05`,デフォルトのタイムゾーンは `Local`,デフォルトの週の開始日は `日曜日`,デフォルトの言語は `en` です。 ##### 昨日、今日、明日 ```go // 今日の瞬間 -fmt.Sprintf("%s", carbon.Now()) // 2020-08-05 13:14:15 +fmt.Printf("%s", carbon.Now()) // 2020-08-05 13:14:15 carbon.Now().String() // 2020-08-05 13:14:15 carbon.Now().ToString() // 2020-08-05 13:14:15 +0800 CST carbon.Now().ToDateTimeString() // 2020-08-05 13:14:15 @@ -80,7 +93,7 @@ carbon.Now().TimestampMicro() // 1596604455999999 carbon.Now().TimestampNano() // 1596604455999999999 // 昨日の今は -fmt.Sprintf("%s", carbon.Yesterday()) // 2020-08-04 13:14:15 +fmt.Printf("%s", carbon.Yesterday()) // 2020-08-04 13:14:15 carbon.Yesterday().String() // 2020-08-04 13:14:15 carbon.Yesterday().ToString() // 2020-08-04 13:14:15 +0800 CST carbon.Yesterday().ToDateTimeString() // 2020-08-04 13:14:15 @@ -102,7 +115,7 @@ carbon.Yesterday().TimestampMicro() // 1596518055999999 carbon.Yesterday().TimestampNano() // 1596518055999999999 // 明日の今は -fmt.Sprintf("%s", carbon.Tomorrow()) // 2020-08-06 13:14:15 +fmt.Printf("%s", carbon.Tomorrow()) // 2020-08-06 13:14:15 carbon.Tomorrow().String() // 2020-08-06 13:14:15 carbon.Tomorrow().ToString() // 2020-08-06 13:14:15 +0800 CST carbon.Tomorrow().ToDateTimeString() // 2020-08-06 13:14:15 @@ -149,7 +162,7 @@ carbon.CreateFromDateTimeMicro(2020, 1, 1, 13, 14, 15, 999999).ToString() // 202 carbon.CreateFromDateTimeNano(2020, 1, 1, 13, 14, 15, 999999999).ToString() // 2020-01-01 13:14:15.999999999 +0800 CST // 年月日から Carbon オブジェクトを作成します -carbon.CreateFromDate(2020, 8, 5).ToString() // // 2020-08-05 00:00:00 +0800 CST +carbon.CreateFromDate(2020, 8, 5).ToString() // 2020-08-05 00:00:00 +0800 CST // 年月日から Carbon オブジェクトを作成します,ミリ秒を含む carbon.CreateFromDateMilli(2020, 8, 5, 999).ToString() // 2020-08-05 00:00:00.999 +0800 CST // 年月日から Carbon オブジェクトを作成します,マイクロ秒を含む @@ -235,25 +248,12 @@ carbon.ParseByLayout("2020-08-05 13:14:15", "2006-01-02 15:04:05", carbon.Tokyo) ##### Carbon と time.Time 交換 ```go -// time.Time を Carbon に変換します +// 標準の time.Time を Carbon に変換します carbon.CreateFromStdTime(time.Now()) -// Carbon を time.Time に変換します +// Carbon を標準の time.Time に変換します carbon.Now().ToStdTime() ``` -##### 最近と最も遠い - -```go -c := carbon.Parse("2023-04-01") -c1 := carbon.Parse("2023-03-28") -c2 := carbon.Parse("2023-04-16") - -// 最近のCarbonインスタンスを返す -c.Closest(c1, c2) // c1 -// 最も遠いCarbonインスタンスを返す -c.Farthest(c1, c2) // c2 -``` - ##### 始まりと終わり ```go @@ -553,6 +553,26 @@ carbon.Parse("2018-08-05 13:14:15").DiffForHumans(carbon.Now()) // 1 year after carbon.Parse("2022-08-05 13:14:15").DiffForHumans(carbon.Now()) // 2 years after ``` +##### 时间极值 + +```go +c0 := carbon.Parse("2023-04-01") +c1 := carbon.Parse("2023-03-28") +c2 := carbon.Parse("2023-04-16") +// 最近のCarbonインスタンスを返す +c0.Closest(c1, c2) // c1 +// 最も遠いCarbonインスタンスを返す +c0.Farthest(c1, c2) // c2 + +yesterday := carbon.Yesterday() +today := carbon.Now() +tomorrow := carbon.Tomorrow() +// 最大の Carbon インスタンスを返します +carbon.Max(yesterday, today, tomorrow) // tomorrow +// 最小の Carbon インスタンスを返します +carbon.Min(yesterday, today, tomorrow) // yesterday +``` + ##### 时间比較 ```go @@ -595,6 +615,17 @@ carbon.Parse("2020-08-05 00:00:00").IsInvalid() // false carbon.Parse("2020-08-05").IsInvalid() // false carbon.Parse("2020-08-05").SetTimezone("xxx").IsInvalid() // true +// 朝かどうかを判断する +carbon.Parse("2020-08-05 00:00:00").IsAM() // true +carbon.Parse("2020-08-05 08:00:00").IsAM() // true +carbon.Parse("2020-08-05 12:00:00").IsAM() // false +carbon.Parse("2020-08-05 13:00:00").IsAM() // false +// 午後かどうかを判断します +carbon.Parse("2020-08-05 00:00:00").IsPM() // false +carbon.Parse("2020-08-05 08:00:00").IsPM() // false +carbon.Parse("2020-08-05 12:00:00").IsPM() // true +carbon.Parse("2020-08-05 13:00:00").IsPM() // true + // 現在かどうか carbon.Now().IsNow() // true // 未来かどうか @@ -1080,7 +1111,7 @@ carbon.Parse("2020-08-05T13:14:15.999999999+08:00").ToRfc3339MicroString() // 20 carbon.Parse("2020-08-05T13:14:15.999999999+08:00").ToRfc3339NanoString() // 2020-08-05T13:14:15.999999999+08:00 // 日付時間文字列を出力 -fmt.Sprintf("%s", carbon.Parse("2020-08-05 13:14:15")) // 2020-08-05 13:14:15 +fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15")) // 2020-08-05 13:14:15 // "2006-01-02 15:04:05.999999999 -0700 MST" フォーマット文字列を出力 carbon.Parse("2020-08-05 13:14:15").ToString() // 2020-08-05 13:14:15.999999 +0800 CST @@ -1182,7 +1213,7 @@ carbon.Parse("2020-08-05 13:14:15").Lunar().LeapMonth() // 4 // 中国のああを取得する carbon.Parse("2020-08-05 13:14:15").Lunar().Day() // 16 // 中国の旧正月 YYYY-MM-DD HH::ii::ss フォーマット文字列を取得します -fmt.Sprintf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 2020-06-16 13:14:15 +fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 2020-06-16 13:14:15 // 中国の旧正月文字列を取得します carbon.Parse("2020-08-05 13:14:15").Lunar().ToYearString() // 二零二零 @@ -1254,93 +1285,172 @@ carbon.Parse("2020-03-21 21:00:00").Lunar().IsTwelfthDoubleHour() // true ##### JSON -###### 定義モデル - +###### シナリオ 1: すべての時刻フィールドが同じ形式である ```go +carbon.SetDefault(carbon.Default{ + Layout: carbon.RFC3339Layout, +}) + type Person struct { - Name string `json:"name"` - Age int `json:"age"` - Birthday carbon.Carbon `json:"birthday" carbon:"layout:2006-01-02"` - GraduatedAt carbon.Carbon `json:"graduated_at" carbon:"layout:15:04:05"` - CreatedAt carbon.Carbon `json:"created_at" carbon:"layout:2006-01-02 15:04:05"` + Name string `json:"name"` + Age int `json:"age"` + + Field1 Carbon `json:"field1"` + Field2 Carbon `json:"field2"` + Field3 Carbon `json:"field3"` + Field4 Carbon `json:"field4"` + + Field5 Carbon `json:"field5"` + Field6 Carbon `json:"field6"` + Field7 Carbon `json:"field7"` + Field8 Carbon `json:"field8"` } -``` -または - -```go -type Person struct { - Name string `json:"name"` - Age int `json:"age"` - Birthday carbon.Carbon `json:"birthday" carbon:"format:Y-m-d"` - GraduatedAt carbon.Carbon `json:"graduated_at" carbon:"format:H:i:s"` - CreatedAt carbon.Carbon `json:"created_at" carbon:"format:Y-m-d H:i:s"` -} -``` - -###### 初期化モデル -```go -now := Parse("2020-08-05 13:14:15", PRC) +now := carbon.Parse("2020-08-05 13:14:15", carbon.PRC) person := Person { - Name: "gouguoyin", - Age: 18, - Birthday: now, - GraduatedAt: now, - CreatedAt: now, + Name: "gouguoyin", + Age: 18, + + Field1: now, + Field2: now, + Field3: now, + Field4: now, + Field5: now, + Field6: now, + Field7: now, + Field8: now, } -``` -###### JSON コーディング - -```go -err1 := carbon.LoadTag(&person) -if err1 != nil { - // エラー処理... - log.Fatal(err1) -} -data, err2 := json.Marshal(person) -if err2 != nil { - // エラー処理... - log.Fatal(err2) +data, marshalErr := json.Marshal(person) +if marshalErr != nil { + // エラー処理... + log.Fatal(marshalErr) } fmt.Printf("%s", data) // 出力 { - "name": "gouguoyin", - "age": 18, - "birthday": "2020-08-05", - "graduated_at": "13:14:15", - "created_at": "2020-08-05 13:14:15" + "name": "gouguoyin", + "age": 18, + "field1": "2020-08-05T13:14:15+08:00", + "field2": "2020-08-05T13:14:15+08:00", + "field3": "2020-08-05T13:14:15+08:00", + "field4": "2020-08-05T13:14:15+08:00", + "field5": "2020-08-05T13:14:15+08:00", + "field6": "2020-08-05T13:14:15+08:00", + "field7": "2020-08-05T13:14:15+08:00", + "field8": "2020-08-05T13:14:15+08:00", } + +unmarshalErr := json.Unmarshal(data, &person) +if unmarshalErr != nil { + // エラー処理... + log.Fatal(unmarshalErr) +} + +fmt.Printf("%s", person.Field1) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field2) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field3) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field4) // 2020-08-05T13:14:15+08:00 + +fmt.Printf("%s", person.Field5) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field6) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field7) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field8) // 2020-08-05T13:14:15+08:00 ``` -###### JSON 復号 +###### シナリオ 2: 異なる時刻フィールドは異なる形式を持つ + +> サポートされているすべての type 値については、ここをクリックしてご覧ください。「carbon」タグが設定されていない場合、デフォルトは「layout:2006-01-02 15:04:05」です。「tz」タグが設定されていない場合、デフォルトは「Local」です。 ```go -str := `{ - "name": "gouguoyin", - "age": 18, - "birthday": "2020-08-05", - "graduated_at": "13:14:15", - "created_at": "2020-08-05 13:14:15" -}` +type Person struct { + Name string `json:"name"` + Age int `json:"age"` + + Field1 Carbon `json:"field1"` + + Field2 Carbon `json:"field2" carbon:"type:date" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"type:time" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"type:dateTime" tz:"PRC"` + // または + Field2 Carbon `json:"field2" carbon:"layout:2006-01-02" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"layout:15:04:05" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"layout:2006-01-02 15:04:05" tz:"PRC"` + // または + Field2 Carbon `json:"field2" carbon:"layout:2006-01-02" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"layout:15:04:05" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"layout:2006-01-02 15:04:05" tz:"PRC"` + + Field5 Carbon `json:"field5" carbon:"type:timestamp" tz:"PRC"` + Field6 Carbon `json:"field6" carbon:"type:timestampMilli" tz:"PRC"` + Field7 Carbon `json:"field7" carbon:"type:timestampMicro" tz:"PRC"` + Field8 Carbon `json:"field8" carbon:"type:timestampNano" tz:"PRC"` +} + +now := Parse("2020-08-05 13:14:15", carbon.PRC) +person := Person { + Name: "gouguoyin", + Age: 18, + + Field1: now, + Field2: now, + Field3: now, + Field4: now, + Field5: now, + Field6: now, + Field7: now, + Field8: now, +} + +loadErr := carbon.LoadTag(&person) +if loadErr != nil { + // エラー処理... + log.Fatal(loadErr) +} +data, marshalErr := json.Marshal(person) +if marshalErr != nil { + // エラー処理... + log.Fatal(marshalErr) +} +fmt.Printf("%s", data) +// 出力 +{ + "name": "gouguoyin", + "age": 18, + "field1": "2020-08-05 13:14:15", + "field2": "2020-08-05", + "field3": "13:14:15", + "field4": "2020-08-05 13:14:15", + "field5": 1596604455, + "field6": 1596604455999, + "field7": 1596604455999999, + "field8": 1596604455999999999 +} + var person Person -err1 := carbon.LoadTag(&person) -if err1 != nil { - // エラー処理... - log.Fatal(err1) +loadErr := carbon.LoadTag(&person) +if loadErr != nil { + // エラー処理... + log.Fatal(loadErr) } -err2 := json.Unmarshal([]byte(str), &person) -if err2 != nil { - // エラー処理... - log.Fatal(err2) +unmarshalErr := json.Unmarshal(data, &person) +if unmarshalErr != nil { + // エラー処理... + log.Fatal(unmarshalErr) } -fmt.Sprintf("%s", person.Birthday) // 2002-08-05 -fmt.Sprintf("%s", person.GraduatedAt) // 13:14:15 -fmt.Sprintf("%s", person.CreatedAt) // 2002-08-05 13:14:15 +fmt.Printf("%s", person.Field1) // 2002-08-05 13:14:15 +fmt.Printf("%s", person.Field2) // 2020-08-05 +fmt.Printf("%s", person.Field3) // 13:14:15 +fmt.Printf("%s", person.Field4) // 2002-08-05 13:14:15 + +fmt.Printf("%d", person.Field5) // 1596604455 +fmt.Printf("%d", person.Field6) // 1596604455999 +fmt.Printf("%d", person.Field7) // 1596604455999999 +fmt.Printf("%d", person.Field8) // 1596604455999999999 + ``` ##### 国際化 @@ -1365,17 +1475,19 @@ fmt.Sprintf("%s", person.CreatedAt) // 2002-08-05 13:14:15 * [タイ語(th)](./lang/th.json "タイ語"): [izcream](https://github.com/izcream "izcream") から翻訳されます * [スウェーデン語(se)](./lang/se.json "スウェーデン語"): [jwanglof](https://github.com/jwanglof "jwanglof") から翻訳されます * [イラン語(fa)](./lang/fa.json "イラン語"): [Iranian](https://github.com/Iranian "Iranian") から翻訳されます -* [ポーランド語(nl)](./lang/nl.json "ポーランド語"): [RemcoE33](https://github.com/RemcoE33 "RemcoE33") から翻訳されます +* [ポーランド語(nl)](./lang/nl.json "ポーランド語"): [RemcoE33](https://github.com/RemcoE33 "RemcoE33") から翻訳されます +* [ベトナム語(vi)](./lang/vi.json "ベトナム語"): [culy247](https://github.com/culy247 "culy247") から翻訳されます +* [ヒンディー語(hi)](./lang/hi.json "ヒンディー語"): [chauhan17nitin](https://github.com/chauhan17nitin "chauhan17nitin") から翻訳されます 現在サポートされている方法 -* `Constellation()`:星座を取得 -* `Season()`:シーズンを取得 -* `DiffForHumans()`:人間に優しい読み取り可能なフォーマットの時間差を取得します -* `ToMonthString()`:月文字列を出力 -* `ToShortMonthString()`:略語月文字列を出力 -* `ToWeekString()`:週文字列を出力 -* `ToShortWeekString()`:略語週文字列を出力 +* `Constellation()`:星座を取得,例えば `おひつじ座` +* `Season()`:シーズンを取得,例えば `春` +* `DiffForHumans()`:人間に優しい読み取り可能なフォーマットの時間差を取得します,例えば `一時間前` +* `ToMonthString()`:月文字列を出力,例えば `いちがつ` +* `ToShortMonthString()`:略語月文字列を出力,例えば `1がつ` +* `ToWeekString()`:週文字列を出力,例えば `日曜日` +* `ToShortWeekString()`:略語週文字列を出力,例えば `日` ###### エリアの設定 @@ -1385,8 +1497,8 @@ lang.SetLocale("jp") c := carbon.SetLanguage(lang) if c.Error != nil { - // エラー処理 - log.Fatal(err) + // エラー処理 + log.Fatal(c.Error) } c.Now().AddHours(1).DiffForHumans() // 1 時間後 @@ -1402,17 +1514,16 @@ c.Now().AddHours(1).Season() // なつ ```go lang := carbon.NewLanguage() -lang.SetLocale("en") resources := map[string]string { - "hour": "%dh", + "hour": "%dh", } -lang.SetResources(resources) +lang.SetLocale("en").SetResources(resources) c := carbon.SetLanguage(lang) if c.Error != nil { - // エラー処理 - log.Fatal(err) + // エラー処理 + log.Fatal(c.Error) } c.Now().AddYears(1).DiffForHumans() // 1 year from now @@ -1430,24 +1541,24 @@ c.Now().Season() // Summer ```go lang := carbon.NewLanguage() resources := map[string]string { - "months": "january|february|march|april|may|june|july|august|september|october|november|december", - "short_months": "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", - "weeks": "sunday|monday|tuesday|wednesday|thursday|friday|saturday", - "short_weeks": "sun|mon|tue|wed|thu|fri|sat", - "seasons": "spring|summer|autumn|winter", - "constellations": "aries|taurus|gemini|cancer|leo|virgo|libra|scorpio|sagittarius|capricornus|aquarius|pisce", - "year": "1 yr|%d yrs", - "month": "1 mo|%d mos", - "week": "%dw", - "day": "%dd", - "hour": "%dh", - "minute": "%dm", - "second": "%ds", - "now": "just now", - "ago": "%s ago", - "from_now": "in %s", - "before": "%s before", - "after": "%s after", + "months": "january|february|march|april|may|june|july|august|september|october|november|december", + "short_months": "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", + "weeks": "sunday|monday|tuesday|wednesday|thursday|friday|saturday", + "short_weeks": "sun|mon|tue|wed|thu|fri|sat", + "seasons": "spring|summer|autumn|winter", + "constellations": "aries|taurus|gemini|cancer|leo|virgo|libra|scorpio|sagittarius|capricornus|aquarius|pisce", + "year": "1 yr|%d yrs", + "month": "1 mo|%d mos", + "week": "%dw", + "day": "%dd", + "hour": "%dh", + "minute": "%dm", + "second": "%ds", + "now": "just now", + "ago": "%s ago", + "from_now": "in %s", + "before": "%s before", + "after": "%s after", } lang.SetResources(resources) @@ -1462,20 +1573,21 @@ c.Now().Constellation() // leo c.Now().Season() // summer ``` -##### テスト +##### 模擬テスト ```go -testNow := carbon.Parse("2020-08-05") +c := carbon.SetTimezone(carbon.UTC) -carbon.SetTestNow(testNow).Yesterday().ToDateString() // 2020-08-04 -carbon.SetTestNow(testNow).Now().ToDateString() // 2020-08-05 -carbon.SetTestNow(testNow).Tomorrow().ToDateString() // 2020-08-06 -carbon.SetTestNow(testNow).Parse("2000-08-05").Age() // 30 +c.Now().ToDateString() // 2023-12-27 +c.Now().IsSetTestNow() // false -carbon.Now().HasTestNow() // false -carbon.SetTestNow(testNow).HasTestNow() // true -carbon.SetTestNow(testNow).ClearTestNow().HasTestNow() // false +c.SetTestNow(carbon.Parse("2020-08-05")) +c.Now().ToDateString() // 2020-08-05 +c.Now().IsSetTestNow() // true +c.UnSetTestNow() +c.Now().ToDateString() // 2023-12-27 +c.Now().IsSetTestNow() // false ``` ##### エラー処理 @@ -1485,10 +1597,9 @@ carbon.SetTestNow(testNow).ClearTestNow().HasTestNow() // false ```go c := carbon.SetTimezone("xxx").Parse("2020-08-05") if c.Error != nil { - // エラー処理... - log.Fatal(c.Error) + // エラー処理... + log.Fatal(c.Error) } -fmt.Println(c.ToDateTimeString()) // 出力 invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for all valid timezones ``` @@ -1497,8 +1608,8 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for ##### 書式設定記号表 -| 記号 | 説明 | 長さ | 範囲 | 例 | -| :------------: | :------------: |:--:|:----------------:| :------------: | +| 記号 | 説明 | 長さ | 範囲 | 例 | +| :------------: | :------------: |:------:|:----------------:| :------------: | | d | 月の中の何日目ですか | 2 | 01-31 | 02 | | D | 略語は何曜日を表しますか | 3 | Mon-Sun | Mon | | j | 月の中の何日目ですか | - | 1-31 | 2 | @@ -1518,16 +1629,19 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for | H | 時間, 24時間のフォーマット | 2 | 00-23 | 15 | | i | 分 | 2 | 01-59 | 04 | | s | 秒 | 2 | 01-59 | 05 | -| c | ISO8601 フォーマットの日付 | - | - | 2006-01-02T15:04:05-07:00 | -| r | RFC2822 フォーマットの日付 | - | - | Mon, 02 Jan 2006 15:04:05 -0700 | -| O | グリニッジとの時間差の時間数 | - | - | +0700 | -| P | グリニッジと時間の差の時間数, 時間と分の間にコロンがあります | - | - | +07:00 | +| O | グリニッジとの時間差の時間数 | - | - | -0700 | +| P | グリニッジと時間の差の時間数, 時間と分の間にコロンがあります | - | - | -07:00 | | T | タイムゾーンの略語 | - | - | MST | | W | ISO8601 フォーマットの数字は年の中の第数週を表します | 2 | 1-52 | 01 | | N | ISO8601 フォーマットの数字は曜日の中の何日目を表しますか | 2 | 01-07 | 02 | | L | うるう年かどうか, うるう年が1であれば, 0です | 1 | 0-1 | 0 | -| U | 秒タイムスタンプ | 10 | - | 1611818268 | -| u | ミリ秒 | - | 1-999 | 999 | +| U | 秒タイムスタンプを | - | - | 1596604455 | +| V | ミリ秒のタイムスタンプを | - | - | 1596604455666 | +| X | マイクロ秒タイムスタンプを | - | - | 1596604455666666 | +| Z | ナノ秒タイムスタンプを | - | - | 1596604455666666666 | +| v | ミリ秒 | - | 1-999 | 999 | +| u | マイクロ秒| - | 1-999999 | 999999 | +| x | ナノ秒 | - | 1-999999999 | 999999999 | | w | 数字の表示の曜日 | 1 | 0-6 | 1 | | t | 月の総日数 | 2 | 28-31 | 31 | | z | 年の中の何日目 | - | 1-365 | 2 | @@ -1565,4 +1679,4 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for `Carbon` は無料の JetBrains オープンソースライセンスを取得しました,これに感謝します -JetBrains +JetBrains diff --git a/vendor/github.com/golang-module/carbon/v2/README.md b/vendor/github.com/golang-module/carbon/v2/README.md index 20d3f4b8..8b9dbd0a 100644 --- a/vendor/github.com/golang-module/carbon/v2/README.md +++ b/vendor/github.com/golang-module/carbon/v2/README.md @@ -5,14 +5,14 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/golang-module/carbon/v2)](https://goreportcard.com/report/github.com/golang-module/carbon/v2) [![Go Coverage](https://codecov.io/gh/golang-module/carbon/branch/master/graph/badge.svg)](https://codecov.io/gh/golang-module/carbon) [![Goproxy.cn](https://goproxy.cn/stats/github.com/golang-module/carbon/badges/download-count.svg)](https://goproxy.cn) -[![Carbon Doc](https://img.shields.io/badge/go.dev-reference-brightgreen?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/golang-module/carbon) +[![Carbon Doc](https://img.shields.io/badge/go.dev-reference-brightgreen?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/golang-module/carbon/v2) [![License](https://img.shields.io/github/license/golang-module/carbon)](https://github.com/golang-module/carbon/blob/master/LICENSE) English | [简体中文](README.cn.md) | [日本語](README.jp.md) #### Introduction -A simple, semantic and developer-friendly golang package for datetime, has been included +A simple, semantic and developer-friendly golang package for time, has been included by [awesome-go](https://github.com/avelino/awesome-go#date-and-time "awesome-go") [github.com/golang-module/carbon](https://github.com/golang-module/carbon "github.com/golang-module/carbon") @@ -53,13 +53,26 @@ import "gitee.com/golang-module/carbon" #### Usage and example -> The default timezone is Local, assuming the current time is 2020-08-05 13:14:15.999999999 +0800 CST +> Assuming the current time is 2020-08-05 13:14:15.999999999 +0800 CST + +##### Set default values (globally effective) + +```go +carbon.SetDefault(carbon.Default{ + Layout: carbon.DateTimeLayout, + Timezone: carbon.Local, + WeekStartsAt: carbon.Sunday, + Locale: "en", +}) +``` + +> If not set, the default layout is `2006-01-02 15:04:05`, the default timezone is `Local`, the default week start date is `Sunday` and the default language locale is `en` ##### Yesterday, today and tomorrow ```go // Return datetime of today -fmt.Sprintf("%s", carbon.Now()) // 2020-08-05 13:14:15 +fmt.Printf("%s", carbon.Now()) // 2020-08-05 13:14:15 carbon.Now().String() // 2020-08-05 13:14:15 carbon.Now().ToString() // 2020-08-05 13:14:15 +0800 CST carbon.Now().ToDateTimeString() // 2020-08-05 13:14:15 @@ -79,7 +92,7 @@ carbon.Now().TimestampMicro() // 1596604455999999 carbon.Now().TimestampNano() // 1596604455999999999 // Return datetime of yesterday -fmt.Sprintf("%s", carbon.Yesterday()) // 2020-08-04 13:14:15 +fmt.Printf("%s", carbon.Yesterday()) // 2020-08-04 13:14:15 carbon.Yesterday().String() // 2020-08-04 13:14:15 carbon.Yesterday().ToString() // 2020-08-04 13:14:15 +0800 CST carbon.Yesterday().ToDateTimeString() // 2020-08-04 13:14:15 @@ -101,7 +114,7 @@ carbon.Yesterday().TimestampMicro() // 1596518055999999 carbon.Yesterday().TimestampNano() // 1596518055999999999 // Return datetime of tomorrow -fmt.Sprintf("%s", carbon.Tomorrow()) // 2020-08-06 13:14:15 +fmt.Printf("%s", carbon.Tomorrow()) // 2020-08-06 13:14:15 carbon.Tomorrow().String() // 2020-08-06 13:14:15 carbon.Tomorrow().ToString() // 2020-08-06 13:14:15 +0800 CST carbon.Tomorrow().ToDateTimeString() // 2020-08-06 13:14:15 @@ -148,7 +161,7 @@ carbon.CreateFromDateTimeMicro(2020, 8, 5, 13, 14, 15, 999999).ToString() // 202 carbon.CreateFromDateTimeNano(2020, 8, 5, 13, 14, 15, 999999999).ToString() // 2020-08-05 13:14:15.999999999 +0800 CST // Create a Carbon instance from a given year, month and day -carbon.CreateFromDate(2020, 8, 5).ToString() // // 2020-08-05 00:00:00 +0800 CST +carbon.CreateFromDate(2020, 8, 5).ToString() // 2020-08-05 00:00:00 +0800 CST // Create a Carbon instance from a given year, month and day with millisecond carbon.CreateFromDateMilli(2020, 8, 5, 999).ToString() // 2020-08-05 00:00:00.999 +0800 CST // Create a Carbon instance from a given year, month and day with microsecond @@ -233,26 +246,13 @@ carbon.ParseByLayout("今天是 2020年08月05日13时14分15秒", "今天是 20 ##### Convert between Carbon and Time ```go -// Convert Time.time into Carbon +// Convert standard Time.time into Carbon carbon.CreateFromStdTime(time.Now()) -// Convert Carbon into Time.time +// Convert Carbon into standard Time.time carbon.Now().ToStdTime() ``` -##### Closest and farthest - -```go -c := carbon.Parse("2023-04-01") -c1 := carbon.Parse("2023-03-28") -c2 := carbon.Parse("2023-04-16") - -// Return the closest Carbon instance -c.Closest(c1, c2) // c1 -// Return the farthest Carbon instance -c.Farthest(c1, c2) // c2 -``` - -##### Start and end +##### Boundary ```go // Start of the century @@ -314,7 +314,7 @@ carbon.Parse("2020-08-05 13:14:15").StartOfSecond().ToString() // 2020-08-05 13: carbon.Parse("2020-08-05 13:14:15").EndOfSecond().ToString() // 2020-08-05 13:14:15.999999999 +0800 CST ``` -##### Addition and subtraction +##### Traveler ```go // Add three centuries @@ -550,10 +550,30 @@ carbon.Parse("2018-08-05 13:14:15").DiffForHumans(carbon.Now()) // 1 year after carbon.Parse("2022-08-05 13:14:15").DiffForHumans(carbon.Now()) // 2 years after ``` +##### Extremum + +```go +c0 := carbon.Parse("2023-04-01") +c1 := carbon.Parse("2023-03-28") +c2 := carbon.Parse("2023-04-16") +// Return the closest Carbon instance +c0.Closest(c1, c2) // c1 +// Return the farthest Carbon instance +c0.Farthest(c1, c2) // c2 + +yesterday := carbon.Yesterday() +today := carbon.Now() +tomorrow := carbon.Tomorrow() +// Return the maximum Carbon instance +carbon.Max(yesterday, today, tomorrow) // tomorrow +// Return the minimum Carbon instance +carbon.Min(yesterday, today, tomorrow) // yesterday +``` + ##### Comparison ```go -// whether is daylight saving time +// Whether is daylight saving time carbon.Parse("").IsDST() // false carbon.Parse("0").IsDST() // false carbon.Parse("0000-00-00 00:00:00").IsDST() // false @@ -592,6 +612,17 @@ carbon.Parse("2020-08-05 00:00:00").IsInvalid() // false carbon.Parse("2020-08-05").IsInvalid() // false carbon.Parse("2020-08-05").SetTimezone("xxx").IsInvalid() // true +// Whether is before noon +carbon.Parse("2020-08-05 00:00:00").IsAM() // true +carbon.Parse("2020-08-05 08:00:00").IsAM() // true +carbon.Parse("2020-08-05 12:00:00").IsAM() // false +carbon.Parse("2020-08-05 13:00:00").IsAM() // false +// Whether is after noon +carbon.Parse("2020-08-05 00:00:00").IsPM() // false +carbon.Parse("2020-08-05 08:00:00").IsPM() // false +carbon.Parse("2020-08-05 12:00:00").IsPM() // true +carbon.Parse("2020-08-05 13:00:00").IsPM() // true + // Whether is now time carbon.Now().IsNow() // true // Whether is future time @@ -1075,7 +1106,7 @@ carbon.Parse("2020-08-05T13:14:15.999999999+08:00").ToRfc3339MicroString() // 20 carbon.Parse("2020-08-05T13:14:15.999999999+08:00").ToRfc3339NanoString() // 2020-08-05T13:14:15.999999999+08:00 // Output datetime format string -fmt.Sprintf("%s", carbon.Parse("2020-08-05 13:14:15")) // 2020-08-05 13:14:15 +fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15")) // 2020-08-05 13:14:15 // Output "2006-01-02 15:04:05.999999999 -0700 MST" format string carbon.Parse("2020-08-05 13:14:15").ToString() // 2020-08-05 13:14:15.999999 +0800 CST @@ -1150,7 +1181,7 @@ carbon.Parse("2020-08-05 13:14:15").IsAutumn() // false carbon.Parse("2020-08-05 13:14:15").IsWinter() // false ``` -##### Chinese Lunar +##### Lunar > Currently only `200` years from `1900` to `2100` are supported @@ -1177,7 +1208,7 @@ carbon.Parse("2020-08-05 13:14:15").Lunar().LeapMonth() // 4 // Get Chinese lunar day carbon.Parse("2020-08-05 13:14:15").Lunar().Day() // 16 // Get Chinese lunar date as YYYY-MM-DD HH::ii::ss format string -fmt.Sprintf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 2020-06-16 13:14:15 +fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 2020-06-16 13:14:15 // Get Chinese lunar year as string carbon.Parse("2020-08-05 13:14:15").Lunar().ToYearString() // 二零二零 @@ -1247,95 +1278,174 @@ carbon.Parse("2020-03-21 19:00:00").Lunar().IsEleventhDoubleHour() // true carbon.Parse("2020-03-21 21:00:00").Lunar().IsTwelfthDoubleHour() // true ``` -##### JSON handling - -###### Define model +##### JSON +###### Scene one: all time fields have the same format ```go +carbon.SetDefault(carbon.Default{ + Layout: carbon.RFC3339Layout, +}) + type Person struct { Name string `json:"name"` - Age int `json:"age"` - Birthday carbon.Carbon `json:"birthday" carbon:"layout:2006-01-02"` - GraduatedAt carbon.Carbon `json:"graduated_at" carbon:"layout:15:04:05"` - CreatedAt carbon.Carbon `json:"created_at" carbon:"layout:2006-01-02 15:04:05"` + Age int `json:"age"` + + Field1 Carbon `json:"field1"` + Field2 Carbon `json:"field2"` + Field3 Carbon `json:"field3"` + Field4 Carbon `json:"field4"` + + Field5 Carbon `json:"field5"` + Field6 Carbon `json:"field6"` + Field7 Carbon `json:"field7"` + Field8 Carbon `json:"field8"` } -``` -or - -```go -type Person struct { - Name string `json:"name"` - Age int `json:"age"` - Birthday carbon.Carbon `json:"birthday" carbon:"format:Y-m-d"` - GraduatedAt carbon.Carbon `json:"graduated_at" carbon:"format:H:i:s"` - CreatedAt carbon.Carbon `json:"created_at" carbon:"format:Y-m-d H:i:s"` -} -``` - -###### Instantiate model -```go -now := Parse("2020-08-05 13:14:15", PRC) +now := carbon.Parse("2020-08-05 13:14:15", carbon.PRC) person := Person { - Name: "gouguoyin", - Age: 18, - Birthday: now, - GraduatedAt: now, - CreatedAt: now, + Name: "gouguoyin", + Age: 18, + + Field1: now, + Field2: now, + Field3: now, + Field4: now, + Field5: now, + Field6: now, + Field7: now, + Field8: now, } -``` -###### JSON encode - -```go -err1 := carbon.LoadTag(&person) -if err1 != nil { +data, marshalErr := json.Marshal(person) +if marshalErr != nil { // Error handle... - log.Fatal(err1) -} -data, err2 := json.Marshal(person) -if err2 != nil { - // Error handle... - log.Fatal(err2) + log.Fatal(marshalErr) } fmt.Printf("%s", data) // Output { "name": "gouguoyin", "age": 18, - "birthday": "2020-08-05", - "graduated_at": "13:14:15", - "created_at": "2020-08-05 13:14:15" + "field1": "2020-08-05T13:14:15+08:00", + "field2": "2020-08-05T13:14:15+08:00", + "field3": "2020-08-05T13:14:15+08:00", + "field4": "2020-08-05T13:14:15+08:00", + "field5": "2020-08-05T13:14:15+08:00", + "field6": "2020-08-05T13:14:15+08:00", + "field7": "2020-08-05T13:14:15+08:00", + "field8": "2020-08-05T13:14:15+08:00" } + +var person Person +unmarshalErr := json.Unmarshal(data, &person) +if unmarshalErr != nil { + // Error handle... + log.Fatal(unmarshalErr) +} + +fmt.Printf("%s", person.Field1) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field2) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field3) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field4) // 2020-08-05T13:14:15+08:00 + +fmt.Printf("%s", person.Field5) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field6) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field7) // 2020-08-05T13:14:15+08:00 +fmt.Printf("%s", person.Field8) // 2020-08-05T13:14:15+08:00 ``` -###### JSON decode +###### Scene two: different time fields have different formats +> Please refer to here for all supported type values. If the `carbon` tag is not set, the default is `layout:2006-01-02 15:04:05`, if the `tz` tag is not set, the default is `Local` ```go -str := `{ +type Person struct { + Name string `json:"name"` + Age int `json:"age"` + + Field1 Carbon `json:"field1"` + + Field2 Carbon `json:"field2" carbon:"type:date" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"type:time" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"type:dateTime" tz:"PRC"` + // or + Field2 Carbon `json:"field2" carbon:"layout:2006-01-02" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"layout:15:04:05" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"layout:2006-01-02 15:04:05" tz:"PRC"` + // or + Field2 Carbon `json:"field2" carbon:"layout:2006-01-02" tz:"PRC"` + Field3 Carbon `json:"field3" carbon:"layout:15:04:05" tz:"PRC"` + Field4 Carbon `json:"field4" carbon:"layout:2006-01-02 15:04:05" tz:"PRC"` + + Field5 Carbon `json:"field5" carbon:"type:timestamp" tz:"PRC"` + Field6 Carbon `json:"field6" carbon:"type:timestampMilli" tz:"PRC"` + Field7 Carbon `json:"field7" carbon:"type:timestampMicro" tz:"PRC"` + Field8 Carbon `json:"field8" carbon:"type:timestampNano" tz:"PRC"` +} + +now := Parse("2020-08-05 13:14:15", carbon.PRC) +person := Person { + Name: "gouguoyin", + Age: 18, + + Field1: now, + Field2: now, + Field3: now, + Field4: now, + Field5: now, + Field6: now, + Field7: now, + Field8: now, +} + +loadErr := carbon.LoadTag(&person) +if loadErr != nil { + // Error handle... + log.Fatal(loadErr) +} +data, marshalErr := json.Marshal(person) +if marshalErr != nil { + // Error handle... + log.Fatal(marshalErr) +} +fmt.Printf("%s", data) +// Output +{ "name": "gouguoyin", "age": 18, - "birthday": "2020-08-05", - "graduated_at": "13:14:15", - "created_at": "2020-08-05 13:14:15" -}` + "field1": "2020-08-05 13:14:15", + "field2": "2020-08-05", + "field3": "13:14:15", + "field4": "2020-08-05 13:14:15", + "field5": 1596604455, + "field6": 1596604455999, + "field7": 1596604455999999, + "field8": 1596604455999999999 +} + var person Person -err1 := carbon.LoadTag(&person) -if err1 != nil { +loadErr := carbon.LoadTag(&person) +if loadErr != nil { // Error handle... - log.Fatal(err1) + log.Fatal(loadErr) } -err2 := json.Unmarshal([]byte(str), &person) -if err2 != nil { +unmarshalErr := json.Unmarshal(data, &person) +if unmarshalErr != nil { // Error handle... - log.Fatal(err2) + log.Fatal(unmarshalErr) } -fmt.Sprintf("%s", person.Birthday) // 2002-08-05 -fmt.Sprintf("%s", person.GraduatedAt) // 13:14:15 -fmt.Sprintf("%s", person.CreatedAt) // 2002-08-05 13:14:15 +fmt.Printf("%s", person.Field1) // 2002-08-05 13:14:15 +fmt.Printf("%s", person.Field2) // 2020-08-05 +fmt.Printf("%s", person.Field3) // 13:14:15 +fmt.Printf("%s", person.Field4) // 2002-08-05 13:14:15 + +fmt.Printf("%d", person.Field5) // 1596604455 +fmt.Printf("%d", person.Field6) // 1596604455999 +fmt.Printf("%d", person.Field7) // 1596604455999999 +fmt.Printf("%d", person.Field8) // 1596604455999999999 + ``` ##### I18n @@ -1367,16 +1477,18 @@ The following languages are supported * [Swedish(se)](./lang/se.json "Swedish"): translated by [jwanglof](https://github.com/jwanglof "jwanglof") * [Iranian(fa)](./lang/fa.json "Iranian"): translated by [erfanMomeniii](https://github.com/erfanMomeniii "erfanMomeniii") * [Dutch(nl)](./lang/nl.json "Dutch"): translated by [RemcoE33](https://github.com/RemcoE33 "RemcoE33") +* [VietNamese(vi)](./lang/vi.json "VietNam"): translated by [culy247](https://github.com/culy247 "culy247") +* [Hindi(hi)](./lang/hi.json "India"): translated by [chauhan17nitin](https://github.com/chauhan17nitin "chauhan17nitin") The following methods are supported -* `Constellation()`:get constellation name -* `Season()`:get season name -* `DiffForHumans()`:get the difference with human-readable format -* `ToMonthString()`:output month format string -* `ToShortMonthString()`:output short month format string -* `ToWeekString()`:output week format string -* `ToShortWeekString()`:output short week format string +* `Constellation()`:get constellation name, like `Aries` +* `Season()`:get season name, like `Spring` +* `DiffForHumans()`:get the difference with human-readable format string, like `1 year from now` +* `ToMonthString()`:output month format string, like `January` +* `ToShortMonthString()`:output short month format string, like `Jan` +* `ToWeekString()`:output week format string, like `Sunday` +* `ToShortWeekString()`:output short week format string, like `Sun` ###### Set locale @@ -1386,8 +1498,8 @@ lang.SetLocale("en") c := carbon.SetLanguage(lang) if c.Error != nil { - // Error handle... - log.Fatal(err) + // Error handle... + log.Fatal(c.Error) } c.Now().AddHours(1).DiffForHumans() // 1 hour from now @@ -1403,17 +1515,16 @@ c.Now().AddHours(1).Season() // Summer ```go lang := carbon.NewLanguage() -lang.SetLocale("en") resources := map[string]string { - "hour": "%dh", + "hour": "%dh", } -lang.SetResources(resources) +lang.SetLocale("en").SetResources(resources) c := carbon.SetLanguage(lang) if c.Error != nil { - // Error handle... - log.Fatal(err) + // Error handle... + log.Fatal(c.Error) } c.Now().AddYears(1).DiffForHumans() // 1 year from now @@ -1431,24 +1542,24 @@ c.Now().Season() // Summer ```go lang := carbon.NewLanguage() resources := map[string]string { - "months": "january|february|march|april|may|june|july|august|september|october|november|december", - "short_months": "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", - "weeks": "sunday|monday|tuesday|wednesday|thursday|friday|saturday", - "short_weeks": "sun|mon|tue|wed|thu|fri|sat", - "seasons": "spring|summer|autumn|winter", - "constellations": "aries|taurus|gemini|cancer|leo|virgo|libra|scorpio|sagittarius|capricornus|aquarius|pisce", - "year": "1 yr|%d yrs", - "month": "1 mo|%d mos", - "week": "%dw", - "day": "%dd", - "hour": "%dh", - "minute": "%dm", - "second": "%ds", - "now": "just now", - "ago": "%s ago", - "from_now": "in %s", - "before": "%s before", - "after": "%s after", + "months": "january|february|march|april|may|june|july|august|september|october|november|december", + "short_months": "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", + "weeks": "sunday|monday|tuesday|wednesday|thursday|friday|saturday", + "short_weeks": "sun|mon|tue|wed|thu|fri|sat", + "seasons": "spring|summer|autumn|winter", + "constellations": "aries|taurus|gemini|cancer|leo|virgo|libra|scorpio|sagittarius|capricornus|aquarius|pisce", + "year": "1 yr|%d yrs", + "month": "1 mo|%d mos", + "week": "%dw", + "day": "%dd", + "hour": "%dh", + "minute": "%dm", + "second": "%ds", + "now": "just now", + "ago": "%s ago", + "from_now": "in %s", + "before": "%s before", + "after": "%s after", } lang.SetResources(resources) @@ -1466,30 +1577,30 @@ c.Now().Season() // summer ##### Testing ```go -testNow := carbon.Parse("2020-08-05") +c := carbon.SetTimezone(carbon.UTC) -carbon.SetTestNow(testNow).Yesterday().ToDateString() // 2020-08-04 -carbon.SetTestNow(testNow).Now().ToDateString() // 2020-08-05 -carbon.SetTestNow(testNow).Tomorrow().ToDateString() // 2020-08-06 -carbon.SetTestNow(testNow).Parse("2000-08-05").Age() // 30 +c.Now().ToDateString() // 2023-12-27 +c.Now().IsSetTestNow() // false -carbon.Now().HasTestNow() // false -carbon.SetTestNow(testNow).HasTestNow() // true -carbon.SetTestNow(testNow).ClearTestNow().HasTestNow() // false +c.SetTestNow(carbon.Parse("2020-08-05")) +c.Now().ToDateString() // 2020-08-05 +c.Now().IsSetTestNow() // true +c.UnSetTestNow() +c.Now().ToDateString() // 2023-12-27 +c.Now().IsSetTestNow() // false ``` -##### Error handling +##### Error > If more than one error occurs, only the first error is returned ```go c := carbon.SetTimezone("xxx").Parse("2020-08-05") if c.Error != nil { - // Error handle... - log.Fatal(c.Error) + // Error handle... + log.Fatal(c.Error) } -fmt.Println(c.ToDateTimeString()) // Output invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for all valid timezones ``` @@ -1498,43 +1609,46 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for ##### Format sign table -| sign | desc | length | range | example | -| :------------: |:------------------------------------------------------------------------------------------------------------------:|:------:|:----------------:|:-------------------------------:| -| d | Day of the month, padded to 2 | 2 | 01-31 | 02 | -| D | Day of the week, as an abbreviate localized string | 3 | Mon-Sun | Mon | -| j | Day of the month, no padding | - | 1-31 | 2 | -| S | English ordinal suffix for the day of the month, 2 characters. Eg: st, nd, rd or th. Works well with j | 2 | st/nd/rd/th | th | -| l | Day of the week, as an unabbreviated localized string | - | Monday-Sunday | Monday | -| F | Month as an unabbreviated localized string | - | January-December | January | -| m | Month, padded to 2 | 2 | 01-12 | 01 | -| M | Month as an abbreviated localized string | 3 | Jan-Dec | Jan | -| n | Month, no padding | - | 1-12 | 1 | -| Y | Four-digit year | 4 | 0000-9999 | 2006 | -| y | Two-digit year | 2 | 00-99 | 06 | -| a | Lowercase morning or afternoon sign | 2 | am/pm | pm | -| A | Uppercase morning or afternoon sign | 2 | AM/PM | PM | -| g | Hour in 12-hour format, no padding | - | 1-12 | 3 | -| G | Hour in 24-hour format, no padding | - | 0-23 | 15 | -| h | Hour in 12-hour format, padded to 2 | 2 | 00-11 | 03 | -| H | Hour in 24-hour format, padded to 2 | 2 | 00-23 | 15 | -| i | Minute, padded to 2 | 2 | 01-59 | 04 | -| s | Second, padded to 2 | 2 | 01-59 | 05 | -| c | ISO8601 date | - | - | 2006-01-02T15:04:05-07:00 | -| r | RFC2822 date | - | - | Mon, 02 Jan 2006 15:04:05 -0700 | -| O | Difference to Greenwich time (GMT) without colon between hours and minutes | - | - | +0700 | -| P | Difference to Greenwich time (GMT) with colon between hours and minutes | - | - | +07:00 | -| T | Abbreviated timezone | - | - | MST | -| W | week of the year, padded to 2 | 2 | 01-52 | 01 | -| N | day of the week, padded to 2 | 2 | 01-07 | 02 | -| L | Whether it's a leap year | 1 | 0-1 | 0 | -| U | Unix timestamp with seconds | 10 | - | 1611818268 | -| u | Millisecond | - | 1-999 | 999 | -| w | Day of the week | 1 | 0-6 | 1 | -| t | Total days of the month | 2 | 28-31 | 31 | -| z | Day of the year | - | 1-365 | 2 | -| e | Location | - | - | America/New_York | -| Q | Quarter | 1 | 1-4 | 1 | -| C | Century | - | 0-99 | 21 | +| sign | desc | length | range | example | +|:----:|:------------------------------------------------------------------------------------------------------:|:------:|:----------------:|:-------------------------------:| +| d | Day of the month, padded to 2 | 2 | 01-31 | 02 | +| D | Day of the week, as an abbreviate localized string | 3 | Mon-Sun | Mon | +| j | Day of the month, no padding | - | 1-31 | 2 | +| S | English ordinal suffix for the day of the month, 2 characters. Eg: st, nd, rd or th. Works well with j | 2 | st/nd/rd/th | th | +| l | Day of the week, as an unabbreviated localized string | - | Monday-Sunday | Monday | +| F | Month as an unabbreviated localized string | - | January-December | January | +| m | Month, padded to 2 | 2 | 01-12 | 01 | +| M | Month as an abbreviated localized string | 3 | Jan-Dec | Jan | +| n | Month, no padding | - | 1-12 | 1 | +| Y | Four-digit year | 4 | 0000-9999 | 2006 | +| y | Two-digit year | 2 | 00-99 | 06 | +| a | Lowercase morning or afternoon sign | 2 | am/pm | pm | +| A | Uppercase morning or afternoon sign | 2 | AM/PM | PM | +| g | Hour in 12-hour format, no padding | - | 1-12 | 3 | +| G | Hour in 24-hour format, no padding | - | 0-23 | 15 | +| h | Hour in 12-hour format, padded to 2 | 2 | 00-11 | 03 | +| H | Hour in 24-hour format, padded to 2 | 2 | 00-23 | 15 | +| i | Minute, padded to 2 | 2 | 01-59 | 04 | +| s | Second, padded to 2 | 2 | 01-59 | 05 | +| O | Difference to Greenwich time (GMT) without colon between hours and minutes | - | - | -0700 | +| P | Difference to Greenwich time (GMT) with colon between hours and minutes | - | - | -07:00 | +| T | Abbreviated timezone | - | - | MST | +| W | week of the year, padded to 2 | 2 | 01-52 | 01 | +| N | day of the week, padded to 2 | 2 | 01-07 | 02 | +| L | Whether it's a leap year | 1 | 0-1 | 0 | +| U | Unix timestamp with seconds | - | - | 1596604455 | +| V | Unix timestamp with millisecond | - | - | 1596604455666 | +| X | Unix timestamp with microsecond | - | - | 1596604455666666 | +| Z | Unix timestamp with nanoseconds | - | - | 1596604455666666666 | +| v | Millisecond | - | 1-999 | 999 | +| u | Microsecond | - | 1-999999 | 999999 | +| x | Nanosecond | - | 1-999999999 | 999999999 | +| w | Day of the week | 1 | 0-6 | 1 | +| t | Total days of the month | 2 | 28-31 | 31 | +| z | Day of the year | - | 1-365 | 2 | +| e | Location | - | - | America/New_York | +| Q | Quarter | 1 | 1-4 | 1 | +| C | Century | - | 0-99 | 21 | #### FAQ @@ -1565,4 +1679,4 @@ Thanks to all of the following who contributed to `Carbon`: `Carbon` had been being developed with GoLand under the free JetBrains Open Source license, I would like to express my thanks here. -JetBrains +JetBrains diff --git a/vendor/github.com/golang-module/carbon/v2/carbon.go b/vendor/github.com/golang-module/carbon/v2/carbon.go index 0ae90b0a..99dd8382 100644 --- a/vendor/github.com/golang-module/carbon/v2/carbon.go +++ b/vendor/github.com/golang-module/carbon/v2/carbon.go @@ -14,7 +14,7 @@ import ( // Version current version // 当前版本号 -const Version = "2.3.0" +const Version = "2.3.5" // timezone constants // 时区常量 @@ -53,13 +53,22 @@ const ( Macao = "Asia/Macao" // 澳门 Taipei = "Asia/Taipei" // 台北 Tokyo = "Asia/Tokyo" // 东京 + HoChiMinh = "Asia/Ho_Chi_Minh" // 胡志明 + Hanoi = "Asia/Hanoi" // 河内 Saigon = "Asia/Saigon" // 西贡 Seoul = "Asia/Seoul" // 首尔 + Pyongyang = "Asia/Pyongyang" // 平壤 Bangkok = "Asia/Bangkok" // 曼谷 Dubai = "Asia/Dubai" // 迪拜 + Qatar = "Asia/Qatar" // 卡塔尔 + Bangalore = "Asia/Bangalore" // 班加罗尔 + Kolkata = "Asia/Kolkata" // 加尔各答 + Mumbai = "Asia/Mumbai" // 孟买 + MexicoCity = "America/Mexico_City" // 墨西哥 NewYork = "America/New_York" // 纽约 LosAngeles = "America/Los_Angeles" // 洛杉矶 Chicago = "America/Chicago" // 芝加哥 + SaoPaulo = "America/Sao_Paulo" // 圣保罗 Moscow = "Europe/Moscow" // 莫斯科 London = "Europe/London" // 伦敦 Berlin = "Europe/Berlin" // 柏林 @@ -127,6 +136,7 @@ const ( // layout constants // 布局模板常量 const ( + AtomLayout = RFC3339Layout ANSICLayout = time.ANSIC CookieLayout = "Monday, 02-Jan-2006 15:04:05 MST" KitchenLayout = time.Kitchen @@ -181,13 +191,71 @@ const ( ShortTimeNanoLayout = "150405.999999999" ) +// format constants +// 格式模板常量 +const ( + AtomFormat = "Y-m-d\\TH:i:sP" + ANSICFormat = "D M j H:i:s Y" + CookieFormat = "l, d-M-Y H:i:s T" + KitchenFormat = "g:iA" + RssFormat = "D, d M Y H:i:s O" + RubyDateFormat = "D M d H:i:s O Y" + UnixDateFormat = "D M j H:i:s T Y" + + RFC1036Format = "D, d M y H:i:s O" + RFC1123Format = "D, d M Y H:i:s T" + RFC1123ZFormat = "D, d M Y H:i:s O" + RFC2822Format = "D, d M Y H:i:s O" + RFC3339Format = "Y-m-d\\TH:i:sP" + RFC3339MilliFormat = "Y-m-d\\TH:i:s.vP" + RFC3339MicroFormat = "Y-m-d\\TH:i:s.uP" + RFC3339NanoFormat = "Y-m-d\\TH:i:s.xP" + RFC7231Format = "D, d M Y H:i:s T" + RFC822Format = "d M y H:i T" + RFC822ZFormat = "d M y H:i O" + RFC850Format = "l, d-M-y H:i:s T" + + ISO8601Format = "Y-m-d\\TH:i:sP" + ISO8601MilliFormat = "Y-m-d\\TH:i:s.vP" + ISO8601MicroFormat = "Y-m-d\\TH:i:s.uP" + ISO8601NanoFormat = "Y-m-d\\TH:i:s.xP" + + DayDateTimeFormat = "D, M j, Y g:i A" + DateTimeFormat = "Y-m-d H:i:s" + DateTimeMilliFormat = "Y-m-d H:i:s.v" + DateTimeMicroFormat = "Y-m-d H:i:s.u" + DateTimeNanoFormat = "Y-m-d H:i:s.x" + ShortDateTimeFormat = "YmdHis" + ShortDateTimeMilliFormat = "YmdHis.v" + ShortDateTimeMicroFormat = "YmdHis.u" + ShortDateTimeNanoFormat = "YmdHis.x" + + DateFormat = "Y-m-d" + DateMilliFormat = "Y-m-d.v" + DateMicroFormat = "Y-m-d.u" + DateNanoFormat = "Y-m-d.x" + ShortDateFormat = "Ymd" + ShortDateMilliFormat = "Ymd.v" + ShortDateMicroFormat = "Ymd.u" + ShortDateNanoFormat = "Ymd.x" + + TimeFormat = "H:i:s" + TimeMilliFormat = "H:i:s.v" + TimeMicroFormat = "H:i:s.u" + TimeNanoFormat = "H:i:s.x" + ShortTimeFormat = "His" + ShortTimeMilliFormat = "His.v" + ShortTimeMicroFormat = "His.u" + ShortTimeNanoFormat = "His.x" +) + // Carbon defines a Carbon struct. // 定义 Carbon 结构体 type Carbon struct { time time.Time - testNow int64 // timestamp with nanosecond of test now time - tag string + testNow int64 // nanosecond timestamp of test now time weekStartsAt time.Weekday + tag *tag loc *time.Location lang *Language Error error @@ -196,8 +264,10 @@ type Carbon struct { // NewCarbon returns a new Carbon instance. // 初始化 Carbon 结构体 func NewCarbon() Carbon { - c := Carbon{testNow: 0, weekStartsAt: time.Sunday, loc: time.Local, lang: NewLanguage()} - c.lang.rw.Lock() - defer c.lang.rw.Unlock() + c := Carbon{lang: NewLanguage()} + c.loc, c.Error = getLocationByTimezone(defaultTimezone) + if weekday, ok := weekdays[defaultWeekStartsAt]; ok { + c.weekStartsAt = weekday + } return c } diff --git a/vendor/github.com/golang-module/carbon/v2/comparer.go b/vendor/github.com/golang-module/carbon/v2/comparer.go index 2530af3e..42456704 100644 --- a/vendor/github.com/golang-module/carbon/v2/comparer.go +++ b/vendor/github.com/golang-module/carbon/v2/comparer.go @@ -31,6 +31,18 @@ func (c Carbon) IsInvalid() bool { return !c.IsValid() } +// IsAM reports whether is before noon. +// 是否是上午 +func (c Carbon) IsAM() bool { + return c.Format("a") == "am" +} + +// IsPM reports whether is after noon. +// 是否是下午 +func (c Carbon) IsPM() bool { + return c.Format("a") == "pm" +} + // IsNow reports whether is now time. // 是否是当前时间 func (c Carbon) IsNow() bool { diff --git a/vendor/github.com/golang-module/carbon/v2/constellation.go b/vendor/github.com/golang-module/carbon/v2/constellation.go index 943f352f..c19b9d6a 100644 --- a/vendor/github.com/golang-module/carbon/v2/constellation.go +++ b/vendor/github.com/golang-module/carbon/v2/constellation.go @@ -43,7 +43,7 @@ func (c Carbon) Constellation() string { } if constellations, ok := c.lang.resources["constellations"]; ok { slice := strings.Split(constellations, "|") - if len(slice) == 12 { + if len(slice) == MonthsPerYear { return slice[index] } } diff --git a/vendor/github.com/golang-module/carbon/v2/creator.go b/vendor/github.com/golang-module/carbon/v2/creator.go index 27eab7f4..cc496a28 100644 --- a/vendor/github.com/golang-module/carbon/v2/creator.go +++ b/vendor/github.com/golang-module/carbon/v2/creator.go @@ -6,10 +6,13 @@ import ( // CreateFromStdTime creates a Carbon instance from standard time.Time. // 从标准的 time.Time 创建 Carbon 实例 -func CreateFromStdTime(tt time.Time) Carbon { +func CreateFromStdTime(tt time.Time, timezone ...string) Carbon { c := NewCarbon() - c.time = tt c.loc = tt.Location() + if len(timezone) > 0 { + c.loc, c.Error = getLocationByTimezone(timezone[0]) + } + c.time = tt return c } diff --git a/vendor/github.com/golang-module/carbon/v2/database.go b/vendor/github.com/golang-module/carbon/v2/database.go index 08562982..d138728c 100644 --- a/vendor/github.com/golang-module/carbon/v2/database.go +++ b/vendor/github.com/golang-module/carbon/v2/database.go @@ -8,9 +8,13 @@ import ( // Scan an interface used by Scan in package database/sql for Scanning value from database to local golang variable. func (c *Carbon) Scan(v interface{}) error { - value, ok := v.(time.Time) - if ok { + if value, ok := v.(time.Time); ok { + loc, err := getLocationByTimezone(defaultTimezone) + if c.loc != nil { + loc = c.loc + } *c = CreateFromStdTime(value) + c.loc, c.Error = loc, err return nil } return fmt.Errorf("can not convert %v to carbon", v) diff --git a/vendor/github.com/golang-module/carbon/v2/default.go b/vendor/github.com/golang-module/carbon/v2/default.go new file mode 100644 index 00000000..aab8ca60 --- /dev/null +++ b/vendor/github.com/golang-module/carbon/v2/default.go @@ -0,0 +1,45 @@ +package carbon + +var ( + // default layout + // 默认布局模板 + defaultLayout = DateTimeLayout + + // default timezone + // 默认时区 + defaultTimezone = Local + + // default week start date + // 默认一周开始日期 + defaultWeekStartsAt = Sunday + + // default language locale + // 默认语言区域 + defaultLocale = "en" +) + +// Default defines a Default struct. +// 定义 Default 结构体 +type Default struct { + Layout string + Timezone string + WeekStartsAt string + Locale string +} + +// SetDefault sets default. +// 设置全局默认值 +func SetDefault(d Default) { + if d.Layout != "" { + defaultLayout = d.Layout + } + if d.Timezone != "" { + defaultTimezone = d.Timezone + } + if d.WeekStartsAt != "" { + defaultWeekStartsAt = d.WeekStartsAt + } + if d.Locale != "" { + defaultLocale = d.Locale + } +} diff --git a/vendor/github.com/golang-module/carbon/v2/difference.go b/vendor/github.com/golang-module/carbon/v2/difference.go index 3a5c679e..84197cab 100644 --- a/vendor/github.com/golang-module/carbon/v2/difference.go +++ b/vendor/github.com/golang-module/carbon/v2/difference.go @@ -9,7 +9,7 @@ import ( // 相差多少年 func (c Carbon) DiffInYears(carbon ...Carbon) int64 { start, end := c, c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -36,7 +36,7 @@ func (c Carbon) DiffAbsInYears(carbon ...Carbon) int64 { // 相差多少月 func (c Carbon) DiffInMonths(carbon ...Carbon) int64 { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -62,7 +62,7 @@ func (c Carbon) DiffAbsInMonths(carbon ...Carbon) int64 { // 相差多少周 func (c Carbon) DiffInWeeks(carbon ...Carbon) int64 { start, end := c, c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -81,7 +81,7 @@ func (c Carbon) DiffAbsInWeeks(carbon ...Carbon) int64 { // 相差多少天 func (c Carbon) DiffInDays(carbon ...Carbon) int64 { start, end := c, c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -100,7 +100,7 @@ func (c Carbon) DiffAbsInDays(carbon ...Carbon) int64 { // 相差多少小时 func (c Carbon) DiffInHours(carbon ...Carbon) int64 { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -119,7 +119,7 @@ func (c Carbon) DiffAbsInHours(carbon ...Carbon) int64 { // 相差多少分钟 func (c Carbon) DiffInMinutes(carbon ...Carbon) int64 { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -138,7 +138,7 @@ func (c Carbon) DiffAbsInMinutes(carbon ...Carbon) int64 { // 相差多少秒 func (c Carbon) DiffInSeconds(carbon ...Carbon) int64 { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -157,7 +157,7 @@ func (c Carbon) DiffAbsInSeconds(carbon ...Carbon) int64 { // 相差字符串,支持i18n func (c Carbon) DiffInString(carbon ...Carbon) string { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -174,7 +174,7 @@ func (c Carbon) DiffInString(carbon ...Carbon) string { // 相差字符串,支持i18n(绝对值) func (c Carbon) DiffAbsInString(carbon ...Carbon) string { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { @@ -191,7 +191,7 @@ func (c Carbon) DiffAbsInString(carbon ...Carbon) string { // 获取对人类友好的可读格式时间差,支持i18n func (c Carbon) DiffForHumans(carbon ...Carbon) string { end := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { end = CreateFromTimestampNano(c.testNow, c.Location()) } if len(carbon) > 0 { diff --git a/vendor/github.com/golang-module/carbon/v2/encoding.go b/vendor/github.com/golang-module/carbon/v2/encoding.go new file mode 100644 index 00000000..b3a9b69a --- /dev/null +++ b/vendor/github.com/golang-module/carbon/v2/encoding.go @@ -0,0 +1,49 @@ +package carbon + +import ( + "bytes" + "fmt" +) + +// MarshalJSON implements the interface Marshaler for Carbon struct. +// 实现 Marshaler 接口 +func (c Carbon) MarshalJSON() ([]byte, error) { + if c.Error != nil { + return nil, c.Error + } + key, value, tz := c.parseTag() + data := "" + if key == "layout" { + data = fmt.Sprintf(`"%s"`, c.Layout(value, tz)) + } + if key == "format" { + // timestamp without double quotes in json + if value == "U" || value == "V" || value == "X" || value == "Z" { + data = fmt.Sprintf(`%s`, c.Format(value, tz)) + } else { + data = fmt.Sprintf(`"%s"`, c.Format(value, tz)) + } + } + return []byte(data), nil +} + +// UnmarshalJSON implements the interface Unmarshaler for Carbon struct. +// 实现 Unmarshaler 接口 +func (c *Carbon) UnmarshalJSON(b []byte) error { + if c.Error != nil { + return c.Error + } + key, value, tz := c.parseTag() + data := fmt.Sprintf("%s", bytes.Trim(b, `"`)) + if key == "layout" { + *c = ParseByLayout(data, value, tz) + } + if key == "format" { + *c = ParseByFormat(data, value, tz) + } + c.tag = &tag{ + carbon: fmt.Sprintf("%s:%s", key, value), + tz: tz, + } + return c.Error +} diff --git a/vendor/github.com/golang-module/carbon/v2/extremum.go b/vendor/github.com/golang-module/carbon/v2/extremum.go new file mode 100644 index 00000000..4b124ee9 --- /dev/null +++ b/vendor/github.com/golang-module/carbon/v2/extremum.go @@ -0,0 +1,55 @@ +package carbon + +// Closest returns the closest Carbon instance from the given Carbon instance. +// 返回离给定 carbon 实例最近的 Carbon 实例 +func (c Carbon) Closest(c1 Carbon, c2 Carbon) Carbon { + if c1.IsZero() || c1.IsInvalid() { + return c2 + } + if c2.IsZero() || c2.IsInvalid() { + return c1 + } + if c.DiffAbsInSeconds(c1) < c.DiffAbsInSeconds(c2) { + return c1 + } + return c2 +} + +// Farthest returns the farthest Carbon instance from the given Carbon instance. +// 返回离给定 carbon 实例最远的 Carbon 实例 +func (c Carbon) Farthest(c1 Carbon, c2 Carbon) Carbon { + if c1.IsZero() || c1.IsInvalid() { + return c2 + } + if c2.IsZero() || c2.IsInvalid() { + return c1 + } + if c.DiffAbsInSeconds(c1) > c.DiffAbsInSeconds(c2) { + return c1 + } + return c2 +} + +// Max returns the maximum Carbon instance from the given Carbon instance (second-precision). +// 返回最大的 Carbon 实例 +func Max(c1 Carbon, c2 ...Carbon) Carbon { + max := c1 + for i := range c2 { + if c2[i].Gte(max) { + max = c2[i] + } + } + return max +} + +// Min returns the minimum Carbon instance from the given Carbon instance (second-precision). +// 返回最小的 Carbon 实例 +func Min(c1 Carbon, c2 ...Carbon) Carbon { + min := c1 + for i := range c2 { + if c2[i].Lte(min) { + min = c2[i] + } + } + return min +} diff --git a/vendor/github.com/golang-module/carbon/v2/getter.go b/vendor/github.com/golang-module/carbon/v2/getter.go index bfdaa7f9..b2d7a502 100644 --- a/vendor/github.com/golang-module/carbon/v2/getter.go +++ b/vendor/github.com/golang-module/carbon/v2/getter.go @@ -402,7 +402,7 @@ func (c Carbon) Age() int { return 0 } now := c.Now() - if c.HasTestNow() { + if c.IsSetTestNow() { now = CreateFromTimestampNano(c.testNow, c.Location()) } if c.TimestampNano() > now.TimestampNano() { diff --git a/vendor/github.com/golang-module/carbon/v2/helper.go b/vendor/github.com/golang-module/carbon/v2/helper.go index adb91ee0..d98c48b8 100644 --- a/vendor/github.com/golang-module/carbon/v2/helper.go +++ b/vendor/github.com/golang-module/carbon/v2/helper.go @@ -5,31 +5,46 @@ import ( "time" ) +// week days +// 工作日 +var weekdays = map[string]time.Weekday{ + Monday: time.Monday, + Tuesday: time.Tuesday, + Wednesday: time.Wednesday, + Thursday: time.Thursday, + Friday: time.Friday, + Saturday: time.Saturday, + Sunday: time.Sunday, +} + // common formatting symbols // 常规格式化符号 var formats = map[byte]string{ - 'd': "02", // Day: Day of the month, 2 digits with leading zeros. Eg: 01 to 31. - 'D': "Mon", // Day: A textual representation of a day, three letters. Eg: Mon through Sun. - 'j': "2", // Day: Day of the month without leading zeros. Eg: 1 to 31. - 'l': "Monday", // Day: A full textual representation of the day of the week. Eg: Sunday through Saturday. - 'F': "January", // Month: A full textual representation of a month, such as January or March. Eg: January through December. - 'm': "01", // Month: Numeric representation of a month, with leading zeros. Eg: 01 through 12. - 'M': "Jan", // Month: A short textual representation of a month, three letters. Eg: Jan through Dec. - 'n': "1", // Month: Numeric representation of a month, without leading zeros. Eg: 1 through 12. - 'Y': "2006", // Year: A full numeric representation of a year, 4 digits. Eg: 1999 or 2003. - 'y': "06", // Year: A two digit representation of a year. Eg: 99 or 03. - 'a': "pm", // Time: Lowercase morning or afternoon sign. Eg: am or pm. - 'A': "PM", // Time: Uppercase morning or afternoon sign. Eg: AM or PM. - 'g': "3", // Time: 12-hour format of an hour without leading zeros. Eg: 1 through 12. - 'h': "03", // Time: 12-hour format of an hour with leading zeros. Eg: 01 through 12. - 'H': "15", // Time: 24-hour format of an hour with leading zeros. Eg: 00 through 23. - 'i': "04", // Time: Minutes with leading zeros. Eg: 00 to 59. - 's': "05", // Time: Seconds with leading zeros. Eg: 00 through 59. - 'O': "-0700", // Zone: Difference to Greenwich time (GMT) in hours. Eg: +0200. - 'P': "-07:00", // Zone: Difference to Greenwich time (GMT) with colon between hours and minutes. Eg: +02:00. - 'T': "MST", // Zone: Timezone abbreviation. Eg: UTC, EST, MDT ... - 'c': "2006-01-02T15:04:05-07:00", // Format: ISO 8601 date. Eg: 2004-02-12T15:19:21+00:00. - 'r': "Thu, 21 Dec 2000 16:01:07 +0200", // Format: RFC 2822 formatted date. Eg: Thu, 21 Dec 2000 16:01:07 +0200. + 'd': "02", // Day: Day of the month, 2 digits with leading zeros. Eg: 01 to 31. + 'D': "Mon", // Day: A textual representation of a day, three letters. Eg: Mon through Sun. + 'j': "2", // Day: Day of the month without leading zeros. Eg: 1 to 31. + 'l': "Monday", // Day: A full textual representation of the day of the week. Eg: Sunday through Saturday. + 'F': "January", // Month: A full textual representation of a month, such as January or March. Eg: January through December. + 'm': "01", // Month: Numeric representation of a month, with leading zeros. Eg: 01 through 12. + 'M': "Jan", // Month: A short textual representation of a month, three letters. Eg: Jan through Dec. + 'n': "1", // Month: Numeric representation of a month, without leading zeros. Eg: 1 through 12. + 'Y': "2006", // Year: A full numeric representation of a year, 4 digits. Eg: 1999 or 2003. + 'y': "06", // Year: A two digit representation of a year. Eg: 99 or 03. + 'a': "pm", // Time: Lowercase morning or afternoon sign. Eg: am or pm. + 'A': "PM", // Time: Uppercase morning or afternoon sign. Eg: AM or PM. + 'g': "3", // Time: 12-hour format of an hour without leading zeros. Eg: 1 through 12. + 'h': "03", // Time: 12-hour format of an hour with leading zeros. Eg: 01 through 12. + 'H': "15", // Time: 24-hour format of an hour with leading zeros. Eg: 00 through 23. + 'i': "04", // Time: Minutes with leading zeros. Eg: 00 to 59. + 's': "05", // Time: Seconds with leading zeros. Eg: 00 through 59. + 'O': "-0700", // Zone: Difference to Greenwich time (GMT) in hours. Eg: +0200. + 'P': "-07:00", // Zone: Difference to Greenwich time (GMT) with colon between hours and minutes. Eg: +02:00. + 'T': "MST", // Zone: Timezone abbreviation. Eg: UTC, EST, MDT ... + + 'U': "timestamp", // Timestamp with second. Eg: 1699677240. + 'V': "timestampMilli", // TimestampMilli with second. Eg: 1596604455666. + 'X': "timestampMicro", // TimestampMicro with second. Eg: 1596604455666666. + 'Z': "timestampNano", // TimestampNano with second. Eg: 1596604455666666666. } // common layout symbols diff --git a/vendor/github.com/golang-module/carbon/v2/json.go b/vendor/github.com/golang-module/carbon/v2/json.go deleted file mode 100644 index 1a201013..00000000 --- a/vendor/github.com/golang-module/carbon/v2/json.go +++ /dev/null @@ -1,43 +0,0 @@ -package carbon - -import ( - "bytes" - "fmt" -) - -// MarshalJSON implements the interface Marshaler for Carbon struct. -// 实现 Marshaler 接口 -func (c Carbon) MarshalJSON() ([]byte, error) { - if c.Error != nil { - return nil, c.Error - } - key, value := c.parseTag() - if key == "layout" { - return []byte(fmt.Sprintf(`"%s"`, c.Layout(value))), nil - } - if key == "format" { - return []byte(fmt.Sprintf(`"%s"`, c.Format(value))), nil - } - return []byte(fmt.Sprintf(`"%s"`, c.ToDateTimeString())), nil -} - -// UnmarshalJSON implements the interface Unmarshaler for Carbon struct. -// 实现 Unmarshaler 接口 -func (c *Carbon) UnmarshalJSON(b []byte) error { - if c.Error != nil { - return c.Error - } - key, value := c.parseTag() - if key == "layout" { - *c = ParseByLayout(string(bytes.Trim(b, `"`)), value, c.Location()) - c.tag = "layout:" + value - return c.Error - } - if key == "format" { - *c = ParseByFormat(string(bytes.Trim(b, `"`)), value, c.Location()) - c.tag = "format:" + value - return c.Error - } - *c = Parse(string(bytes.Trim(b, `"`)), c.Location()) - return c.Error -} diff --git a/vendor/github.com/golang-module/carbon/v2/lang/hi.json b/vendor/github.com/golang-module/carbon/v2/lang/hi.json new file mode 100644 index 00000000..4aa4ba70 --- /dev/null +++ b/vendor/github.com/golang-module/carbon/v2/lang/hi.json @@ -0,0 +1,20 @@ +{ + "months": "जनवरी|फ़रवरी|मार्च|अप्रैल|मई|जून|जुलाई|अगस्त|सितंबर|अक्टूबर|नवंबर|दिसंबर", + "short_months": "जन|फ़र|मार्च|अप्रैल|मई|जून|जुलाई|अगस्त|सितंबर|अक्टूबर|नवंबर|दिसंबर", + "weeks": "रविवार|सोमवार|मंगलवार|बुधवार|गुरुवार|शुक्रवार|शनिवार", + "short_weeks": "रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि", + "seasons": "वसंत|ग्रीष्म|पतझड़|शीत", + "constellations": "मेष|वृषभ|मिथुन|कर्क|सिंह|कन्या|तुला|वृश्चिक|धनु|मकर|कुंभ|मीन", + "year": "1 वर्ष|%d वर्ष", + "month": "1 महीना|%d महीने", + "week": "1 सप्ताह|%d सप्ताह", + "day": "1 दिन|%d दिन", + "hour": "1 घंटा|%d घंटे", + "minute": "1 मिनट|%d मिनट", + "second": "1 सेकंड|%d सेकंड", + "now": "अभी", + "ago": "%s पहले", + "from_now": "%s बाद", + "before": "%s पहले", + "after": "%s बाद" +} diff --git a/vendor/github.com/golang-module/carbon/v2/lang/vi.json b/vendor/github.com/golang-module/carbon/v2/lang/vi.json new file mode 100644 index 00000000..c8a1b3b0 --- /dev/null +++ b/vendor/github.com/golang-module/carbon/v2/lang/vi.json @@ -0,0 +1,20 @@ +{ + "months": "Tháng Một|Tháng Hai|Tháng Ba|Tháng Tư|Tháng Năm|Tháng Sáu|Tháng Bảy|Tháng Tám|Tháng Chín|Tháng Mười|Tháng Mười Một|Tháng Mười Hai", + "short_months": "Giêng|Hai|Ba|Bốn|Năm|Sáu|Bảy|Tám|Chìn|Mười|Một|Chạp", + "weeks": "Chủ Nhật|Thứ Hai|Thứ Ba|Thứ Tư|Thứ Năm|Thứ Sáu|Thứ Bảy", + "short_weeks": "CN|Hai|Ba|Tư|Năm|Sáu|Bảy", + "seasons": "Xuân|Hè|Thu|Đông", + "constellations": "Bạch Dương|Kim Ngưu|Song Tử|Cự Giải|Sư Tử|Xử Nữ|Thiên Bình|Bọ Cạp|Nhân Mã|Ma Kết|Bảo Bình|Song Ngư", + "year": "%d năm", + "month": "%d tháng", + "week": "%d tuần", + "day": "%d ngày", + "hour": "%d giờ", + "minute": "%d phút", + "second": "%d giây", + "now": "vừa xong", + "ago": "%s trước", + "from_now": "%s từ bây giờ", + "before": "%s trước", + "after": "%s sau" +} diff --git a/vendor/github.com/golang-module/carbon/v2/language.go b/vendor/github.com/golang-module/carbon/v2/language.go index 3c231829..e16e4522 100644 --- a/vendor/github.com/golang-module/carbon/v2/language.go +++ b/vendor/github.com/golang-module/carbon/v2/language.go @@ -13,14 +13,6 @@ import ( var fs embed.FS var ( - // default directory - // 默认目录 - defaultDir = "lang/" - - // default locale - // 默认区域 - defaultLocale = "en" - // invalid locale error // 无效的区域错误 invalidLocaleError = func(locale string) error { @@ -42,47 +34,58 @@ type Language struct { // 初始化 Language 结构体 func NewLanguage() *Language { return &Language{ - dir: defaultDir, + dir: "lang/", locale: defaultLocale, resources: make(map[string]string), rw: new(sync.RWMutex), } } +// SetLanguage sets language. +// 设置语言对象 +func SetLanguage(lang *Language) Carbon { + c := NewCarbon() + lang.SetLocale(lang.locale) + c.lang, c.Error = lang, lang.Error + return c +} + // SetLocale sets language locale. // 设置区域 -func (lang *Language) SetLocale(locale string) { +func (lang *Language) SetLocale(locale string) *Language { lang.rw.Lock() defer lang.rw.Unlock() if len(lang.resources) != 0 { - return + return lang } lang.locale = locale fileName := lang.dir + locale + ".json" bytes, err := fs.ReadFile(fileName) if err != nil { lang.Error = invalidLocaleError(fileName) - return + return lang } _ = json.Unmarshal(bytes, &lang.resources) + return lang } // SetResources sets language resources. // 设置资源 -func (lang *Language) SetResources(resources map[string]string) { +func (lang *Language) SetResources(resources map[string]string) *Language { lang.rw.Lock() defer lang.rw.Unlock() if len(lang.resources) == 0 { lang.resources = resources - return + return lang } for k, v := range resources { if _, ok := lang.resources[k]; ok { lang.resources[k] = v } } + return lang } // returns a translated string. diff --git a/vendor/github.com/golang-module/carbon/v2/outputer.go b/vendor/github.com/golang-module/carbon/v2/outputer.go index b18f809b..b3d79e44 100644 --- a/vendor/github.com/golang-module/carbon/v2/outputer.go +++ b/vendor/github.com/golang-module/carbon/v2/outputer.go @@ -11,14 +11,14 @@ import ( // String implements the interface Stringer for Carbon struct. // 实现 Stringer 接口 func (c Carbon) String() string { - key, value := c.parseTag() + key, value, tz := c.parseTag() if key == "layout" { - return c.Layout(value) + return c.Layout(value, tz) } if key == "format" { - return c.Format(value) + return c.Format(value, tz) } - return c.ToDateTimeString() + return c.ToDateTimeString(c.Location()) } // ToString outputs a string in "2006-01-02 15:04:05.999999999 -0700 MST" layout. @@ -420,7 +420,13 @@ func (c Carbon) ToShortTimeNanoString(timezone ...string) string { // ToAtomString outputs a string in "2006-01-02T15:04:05Z07:00" layout. // 输出 "2006-01-02T15:04:05Z07:00" 格式字符串 func (c Carbon) ToAtomString(timezone ...string) string { - return c.ToRfc3339String(timezone...) + if len(timezone) > 0 { + c.loc, c.Error = getLocationByTimezone(timezone[0]) + } + if c.IsInvalid() { + return "" + } + return c.ToStdTime().Format(AtomLayout) } // ToAnsicString outputs a string in "Mon Jan _2 15:04:05 2006" layout. @@ -733,6 +739,14 @@ func (c Carbon) ToFormatString(format string, timezone ...string) string { buffer.WriteString(c.ToMonthString()) case 'M': // short month, such as Jan buffer.WriteString(c.ToShortMonthString()) + case 'U': // timestamp with second, such as 1596604455 + buffer.WriteString(strconv.FormatInt(c.Timestamp(), 10)) + case 'V': // timestamp with millisecond, such as 1596604455000 + buffer.WriteString(strconv.FormatInt(c.TimestampMilli(), 10)) + case 'X': // timestamp with microsecond, such as 1596604455000000 + buffer.WriteString(strconv.FormatInt(c.TimestampMicro(), 10)) + case 'Z': // timestamp with nanoseconds, such as 1596604455000000000 + buffer.WriteString(strconv.FormatInt(c.TimestampNano(), 10)) default: // common symbols buffer.WriteString(c.ToStdTime().Format(layout)) } @@ -767,10 +781,15 @@ func (c Carbon) ToFormatString(format string, timezone ...string) string { } case 'G': // 24-hour format, no padding, ranging from 0-23 buffer.WriteString(strconv.Itoa(c.Hour())) - case 'U': // timestamp with second, such as 1611818268 - buffer.WriteString(strconv.FormatInt(c.Timestamp(), 10)) - case 'u': // current millisecond, such as 999 - buffer.WriteString(strconv.Itoa(c.Millisecond())) + case 'v': // current millisecond, such as 999 + s := c.Layout(".999") + buffer.WriteString(strings.Trim(s, ".")) + case 'u': // current microsecond, such as 999999 + s := c.Layout(".999999") + buffer.WriteString(strings.Trim(s, ".")) + case 'x': // current nanosecond, such as 999999999 + s := c.Layout(".999999999") + buffer.WriteString(strings.Trim(s, ".")) case 'w': // day of the week represented by the number, ranging from 0-6 buffer.WriteString(strconv.Itoa(c.DayOfWeek() - 1)) case 't': // number of days in the month, ranging from 28-31 diff --git a/vendor/github.com/golang-module/carbon/v2/parser.go b/vendor/github.com/golang-module/carbon/v2/parser.go index 25d98259..ec286913 100644 --- a/vendor/github.com/golang-module/carbon/v2/parser.go +++ b/vendor/github.com/golang-module/carbon/v2/parser.go @@ -1,6 +1,7 @@ package carbon import ( + "strconv" "time" ) @@ -66,6 +67,22 @@ func (c Carbon) ParseByLayout(value, layout string, timezone ...string) Carbon { if value == "" || value == "0" || value == "0000-00-00 00:00:00" || value == "0000-00-00" || value == "00:00:00" { return c } + if layout == "timestamp" { + timestamp, _ := strconv.ParseInt(value, 10, 64) + return c.CreateFromTimestamp(timestamp) + } + if layout == "timestampMilli" { + timestamp, _ := strconv.ParseInt(value, 10, 64) + return c.CreateFromTimestampMilli(timestamp) + } + if layout == "timestampMicro" { + timestamp, _ := strconv.ParseInt(value, 10, 64) + return c.CreateFromTimestampMicro(timestamp) + } + if layout == "timestampNano" { + timestamp, _ := strconv.ParseInt(value, 10, 64) + return c.CreateFromTimestampNano(timestamp) + } tt, err := time.ParseInLocation(layout, value, c.loc) if err != nil { c.Error = invalidLayoutError(value, layout) diff --git a/vendor/github.com/golang-module/carbon/v2/season.go b/vendor/github.com/golang-module/carbon/v2/season.go index cc49f8df..2c5df527 100644 --- a/vendor/github.com/golang-module/carbon/v2/season.go +++ b/vendor/github.com/golang-module/carbon/v2/season.go @@ -27,7 +27,7 @@ func (c Carbon) Season() string { } if seasons, ok := c.lang.resources["seasons"]; ok { slice := strings.Split(seasons, "|") - if len(slice) == 4 { + if len(slice) == QuartersPerYear { return slice[index] } } diff --git a/vendor/github.com/golang-module/carbon/v2/setter.go b/vendor/github.com/golang-module/carbon/v2/setter.go index 7fb0bb24..e66a94aa 100644 --- a/vendor/github.com/golang-module/carbon/v2/setter.go +++ b/vendor/github.com/golang-module/carbon/v2/setter.go @@ -4,6 +4,24 @@ import ( "time" ) +// SetWeekStartsAt sets start day of the week. +// 设置一周的开始日期 +func (c Carbon) SetWeekStartsAt(day string) Carbon { + if c.Error != nil { + return c + } + if weekday, ok := weekdays[day]; ok { + c.weekStartsAt = weekday + } + return c +} + +// SetWeekStartsAt sets start day of the week. +// 设置一周的开始日期 +func SetWeekStartsAt(day string) Carbon { + return NewCarbon().SetWeekStartsAt(day) +} + // SetTimezone sets timezone. // 设置时区 func (c Carbon) SetTimezone(name string) Carbon { @@ -59,25 +77,6 @@ func SetLocale(locale string) Carbon { return c } -// SetLanguage sets language. -// 设置语言对象 -func (c Carbon) SetLanguage(lang *Language) Carbon { - if c.Error != nil { - return c - } - c.lang, c.Error = lang, lang.Error - return c -} - -// SetLanguage sets language. -// 设置语言对象 -func SetLanguage(lang *Language) Carbon { - c := NewCarbon() - lang.SetLocale(lang.locale) - c.lang, c.Error = lang, lang.Error - return c -} - // SetDateTime sets year, month, day, hour, minute and second. // 设置年、月、日、时、分、秒 func (c Carbon) SetDateTime(year, month, day, hour, minute, second int) Carbon { @@ -232,31 +231,6 @@ func (c Carbon) SetMonthNoOverflow(month int) Carbon { return c.AddMonthsNoOverflow(month - c.Month()) } -// SetWeekStartsAt sets start day of the week. -// 设置一周的开始日期 -func (c Carbon) SetWeekStartsAt(day string) Carbon { - if c.IsInvalid() { - return c - } - switch day { - case Sunday: - c.weekStartsAt = time.Sunday - case Monday: - c.weekStartsAt = time.Monday - case Tuesday: - c.weekStartsAt = time.Tuesday - case Wednesday: - c.weekStartsAt = time.Wednesday - case Thursday: - c.weekStartsAt = time.Thursday - case Friday: - c.weekStartsAt = time.Friday - case Saturday: - c.weekStartsAt = time.Saturday - } - return c -} - // SetDay sets day. // 设置日期 func (c Carbon) SetDay(day int) Carbon { diff --git a/vendor/github.com/golang-module/carbon/v2/tag.go b/vendor/github.com/golang-module/carbon/v2/tag.go index 5276ca19..05f15cee 100644 --- a/vendor/github.com/golang-module/carbon/v2/tag.go +++ b/vendor/github.com/golang-module/carbon/v2/tag.go @@ -10,25 +10,89 @@ var ( // invalid pointer error // 无效的指针错误 invalidPtrError = func() error { - return fmt.Errorf("invalid pointer, please make sure the pointer is valid") + return fmt.Errorf("invalid struct pointer, please make sure the struct is a pointer") } // invalid tag error // 无效的标签错误 - invalidTagError = func() error { - return fmt.Errorf("invalid tag, please make sure the tag is valid") + invalidTagError = func(field string) error { + return fmt.Errorf("invalid carbon tag in %s field, please make sure the tag is valid", field) + } + + // supported types + // 支持的类型 + tagTypes = map[string]string{ + "dateTime": "layout:" + DateTimeLayout, + "dateTimeMilli": "layout:" + DateTimeMilliLayout, + "dateTimeMicro": "layout:" + DateTimeMicroLayout, + "dateTimeNano": "layout:" + DateTimeNanoLayout, + "shortDateTime": "layout:" + ShortDateTimeLayout, + "shortDateTimeMilli": "layout:" + ShortDateTimeMilliLayout, + "shortDateTimeMicro": "layout:" + ShortDateTimeMicroLayout, + "shortDateTimeNano": "layout:" + ShortDateTimeNanoLayout, + "dayDateTime": "layout:" + DayDateTimeLayout, + + "date": "layout:" + DateLayout, + "dateMilli": "layout:" + DateMilliLayout, + "dateMicro": "layout:" + DateMicroLayout, + "dateNano": "layout:" + DateNanoLayout, + "shortDate": "layout:" + ShortDateLayout, + "shortDateMilli": "layout:" + ShortDateMilliLayout, + "shortDateMicro": "layout:" + ShortDateMicroLayout, + "shortDateNano": "layout:" + ShortDateNanoLayout, + + "time": "layout:" + TimeLayout, + "timeMilli": "layout:" + TimeMilliLayout, + "timeMicro": "layout:" + TimeMicroLayout, + "timeNano": "layout:" + TimeNanoLayout, + "shortTime": "layout:" + ShortTimeLayout, + "shortTimeMilli": "layout:" + ShortTimeMilliLayout, + "shortTimeMicro": "layout:" + ShortTimeMicroLayout, + "shortTimeNano": "layout:" + ShortTimeNanoLayout, + + "atom": "layout:" + AtomLayout, + "ansic": "layout:" + ANSICLayout, + "cookie": "layout:" + CookieLayout, + "kitchen": "layout:" + KitchenLayout, + "rss": "layout:" + RssLayout, + "rubyDate": "layout:" + RubyDateLayout, + "unixDate": "layout:" + UnixDateLayout, + + "rfc1036": "layout:" + RFC1036Layout, + "rfc1123": "layout:" + RFC1123Layout, + "rfc1123Z": "layout:" + RFC1123ZLayout, + "rfc2822": "layout:" + RFC2822Layout, + "rfc3339": "layout:" + RFC3339Layout, + "rfc3339Milli": "layout:" + RFC3339MilliLayout, + "rfc3339Micro": "layout:" + RFC3339MicroLayout, + "rfc3339Nano": "layout:" + RFC3339NanoLayout, + "rfc7231": "layout:" + RFC7231Layout, + "rfc822": "layout:" + RFC822Layout, + "rfc822Z": "layout:" + RFC822ZLayout, + "rfc850": "layout:" + RFC850Layout, + + "iso8601": "layout:" + ISO8601Layout, + "iso8601Milli": "layout:" + ISO8601MilliLayout, + "iso8601Micro": "layout:" + ISO8601MicroLayout, + "iso8601Nano": "layout:" + ISO8601NanoLayout, + + "timestamp": "format:U", + "timestampMilli": "format:V", + "timestampMicro": "format:X", + "timestampNano": "format:Z", } ) -// Tag gets tag. -// 获取标签 -func (c Carbon) Tag() string { - return c.tag +// tag defines a tag struct. +// 定义 tag 结构体 +type tag struct { + carbon string + tz string } // SetTag sets tag. // 设置标签 -func (c Carbon) SetTag(tag string) Carbon { +func (c Carbon) SetTag(tag *tag) Carbon { if c.Error != nil { return c } @@ -38,37 +102,59 @@ func (c Carbon) SetTag(tag string) Carbon { // parseTag parses tag. // 解析标签 -func (c Carbon) parseTag() (key, value string) { - if c.tag == "" || len(c.tag) <= 7 { - return "", "" +func (c Carbon) parseTag() (key, value, tz string) { + if c.tag == nil { + return "layout", defaultLayout, defaultTimezone } - return strings.TrimSpace(c.tag[:6]), strings.TrimSpace(c.tag[7:]) + tz = strings.TrimSpace(c.tag.tz) + if tz == "" { + tz = defaultTimezone + } + carbon := strings.TrimSpace(c.tag.carbon) + if carbon == "" { + return "layout", defaultLayout, tz + } + if len(carbon) <= 7 { + return "", "", tz + } + key = strings.TrimSpace(carbon[:6]) + value = strings.TrimSpace(carbon[7:]) + return } // LoadTag loads tag. // 加载标签 func LoadTag(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() != reflect.Ptr { + typeObj, valueObj := reflect.TypeOf(v), reflect.ValueOf(v) + if typeObj.Kind() != reflect.Ptr { return invalidPtrError() } + typeElem, valueElem := typeObj.Elem(), valueObj.Elem() params := make([]reflect.Value, 1) - for i := 0; i < val.Elem().NumField(); i++ { - field := typ.Elem().Field(i) - value := val.Elem().Field(i) - if reflect.TypeOf(Carbon{}) != value.Type() { + for i := 0; i < valueElem.NumField(); i++ { + fieldType, fieldValue := typeElem.Field(i), valueElem.Field(i) + if reflect.TypeOf(Carbon{}) != fieldValue.Type() { continue } - tag := field.Tag.Get("carbon") - if tag == "" { - tag = "layout:" + DateTimeLayout + carbon := fieldType.Tag.Get("carbon") + if carbon == "" { + carbon = "layout:" + defaultLayout } - if !strings.Contains(tag, "layout:") && !strings.Contains(tag, "format:") { - return invalidTagError() + if strings.HasPrefix(carbon, "type:") { + carbon = tagTypes[carbon[5:]] } - params[0] = reflect.ValueOf(tag) - value.Set(value.MethodByName("SetTag").Call(params)[0]) + if !strings.HasPrefix(carbon, "layout:") && !strings.HasPrefix(carbon, "format:") { + return invalidTagError(fieldType.Name) + } + tz := fieldType.Tag.Get("tz") + if tz == "" { + tz = defaultTimezone + } + params[0] = reflect.ValueOf(&tag{ + carbon: carbon, + tz: tz, + }) + fieldValue.Set(fieldValue.MethodByName("SetTag").Call(params)[0]) } return nil } diff --git a/vendor/github.com/golang-module/carbon/v2/test.go b/vendor/github.com/golang-module/carbon/v2/test.go index f9b6bf9b..c4481d02 100644 --- a/vendor/github.com/golang-module/carbon/v2/test.go +++ b/vendor/github.com/golang-module/carbon/v2/test.go @@ -1,26 +1,19 @@ package carbon // SetTestNow sets a test Carbon instance (real or mock) to be returned when a "now" instance is created. -func SetTestNow(carbon Carbon) Carbon { - return NewCarbon().SetTestNow(carbon) +// 设置当前测试时间 +func (c *Carbon) SetTestNow(carbon Carbon) { + c.testNow, c.loc = carbon.TimestampNano(), carbon.loc } -// SetTestNow sets a test Carbon instance (real or mock) to be returned when a "now" instance is created. -func (c Carbon) SetTestNow(carbon Carbon) Carbon { - c.testNow = carbon.TimestampNano() - if carbon.loc != nil { - c.loc = carbon.loc - } - return c -} - -// ClearTestNow clears a test Carbon instance (real or mock) to be returned when a "now" instance is created. -func (c Carbon) ClearTestNow() Carbon { +// UnSetTestNow clears a test Carbon instance (real or mock) to be returned when a "now" instance is created. +// 清除当前测试时间 +func (c *Carbon) UnSetTestNow() { c.testNow = 0 - return c } -// HasTestNow report whether there is testing time now. -func (c Carbon) HasTestNow() bool { +// IsSetTestNow report whether there is testing time now. +// 是否设置过当前测试时间 +func (c Carbon) IsSetTestNow() bool { return c.testNow > 0 } diff --git a/vendor/github.com/golang-module/carbon/v2/traveler.go b/vendor/github.com/golang-module/carbon/v2/traveler.go index 58e50911..dce54510 100644 --- a/vendor/github.com/golang-module/carbon/v2/traveler.go +++ b/vendor/github.com/golang-module/carbon/v2/traveler.go @@ -13,8 +13,10 @@ func (c Carbon) Now(timezone ...string) Carbon { if c.Error != nil { return c } - if c.HasTestNow() { - return CreateFromTimestampNano(c.testNow, c.Location()) + if c.IsSetTestNow() { + now := CreateFromTimestampNano(c.testNow, c.Location()) + now.testNow = c.testNow + return now } c.time = time.Now().In(c.loc) return c @@ -35,9 +37,6 @@ func (c Carbon) Tomorrow(timezone ...string) Carbon { if c.Error != nil { return c } - if c.HasTestNow() { - return CreateFromTimestampNano(c.testNow, c.Location()).AddDay() - } if !c.IsZero() { return c.AddDay() } @@ -59,9 +58,6 @@ func (c Carbon) Yesterday(timezone ...string) Carbon { if c.Error != nil { return c } - if c.HasTestNow() { - return CreateFromTimestampNano(c.testNow, c.Location()).SubDay() - } if !c.IsZero() { return c.SubDay() } @@ -74,36 +70,6 @@ func Yesterday(timezone ...string) Carbon { return NewCarbon().Yesterday(timezone...) } -// Closest returns the closest Carbon instance from the given Carbon instance (second-precision). -// 返回离给定 carbon 实例最近的 Carbon 实例 -func (c Carbon) Closest(c1 Carbon, c2 Carbon) Carbon { - if c1.IsZero() || c1.IsInvalid() { - return c2 - } - if c2.IsZero() || c2.IsInvalid() { - return c1 - } - if c.DiffAbsInSeconds(c1) < c.DiffAbsInSeconds(c2) { - return c1 - } - return c2 -} - -// Farthest returns the farthest Carbon instance from the given Carbon instance (second-precision). -// 返回离给定 carbon 实例最远的 Carbon 实例 -func (c Carbon) Farthest(c1 Carbon, c2 Carbon) Carbon { - if c1.IsZero() || c1.IsInvalid() { - return c2 - } - if c2.IsZero() || c2.IsInvalid() { - return c1 - } - if c.DiffAbsInSeconds(c1) > c.DiffAbsInSeconds(c2) { - return c1 - } - return c2 -} - // AddDuration adds one duration. // 按照时长增加时间,支持整数/浮点数和符号ns(纳秒)、us(微妙)、ms(毫秒)、s(秒)、m(分钟)、h(小时)的组合 func (c Carbon) AddDuration(duration string) Carbon { diff --git a/vendor/github.com/gotd/td/tg/tl_handlers_gen.go b/vendor/github.com/gotd/td/tg/tl_handlers_gen.go index fd1d08ed..4f4e9399 100644 --- a/vendor/github.com/gotd/td/tg/tl_handlers_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_handlers_gen.go @@ -1325,3 +1325,23 @@ func (u UpdateDispatcher) OnBotMessageReactions(handler BotMessageReactionsHandl return handler(ctx, e, update.(*UpdateBotMessageReactions)) } } + +// SavedDialogPinnedHandler is a SavedDialogPinned event handler. +type SavedDialogPinnedHandler func(ctx context.Context, e Entities, update *UpdateSavedDialogPinned) error + +// OnSavedDialogPinned sets SavedDialogPinned handler. +func (u UpdateDispatcher) OnSavedDialogPinned(handler SavedDialogPinnedHandler) { + u.handlers[UpdateSavedDialogPinnedTypeID] = func(ctx context.Context, e Entities, update UpdateClass) error { + return handler(ctx, e, update.(*UpdateSavedDialogPinned)) + } +} + +// PinnedSavedDialogsHandler is a PinnedSavedDialogs event handler. +type PinnedSavedDialogsHandler func(ctx context.Context, e Entities, update *UpdatePinnedSavedDialogs) error + +// OnPinnedSavedDialogs sets PinnedSavedDialogs handler. +func (u UpdateDispatcher) OnPinnedSavedDialogs(handler PinnedSavedDialogsHandler) { + u.handlers[UpdatePinnedSavedDialogsTypeID] = func(ctx context.Context, e Entities, update UpdateClass) error { + return handler(ctx, e, update.(*UpdatePinnedSavedDialogs)) + } +} diff --git a/vendor/github.com/gotd/td/tg/tl_message_fwd_header_gen.go b/vendor/github.com/gotd/td/tg/tl_message_fwd_header_gen.go index d2d81b40..268fcd53 100644 --- a/vendor/github.com/gotd/td/tg/tl_message_fwd_header_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_message_fwd_header_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// MessageFwdHeader represents TL type `messageFwdHeader#5f777dce`. +// MessageFwdHeader represents TL type `messageFwdHeader#4e4df4bb`. // Info about a forwarded message // // See https://core.telegram.org/constructor/messageFwdHeader for reference. @@ -47,6 +47,8 @@ type MessageFwdHeader struct { // Links: // 1) https://core.telegram.org/api/import Imported bool + // SavedOut field of MessageFwdHeader. + SavedOut bool // The ID of the user that originally sent the message // // Use SetFromID and GetFromID helpers. @@ -75,6 +77,18 @@ type MessageFwdHeader struct { // // Use SetSavedFromMsgID and GetSavedFromMsgID helpers. SavedFromMsgID int + // SavedFromID field of MessageFwdHeader. + // + // Use SetSavedFromID and GetSavedFromID helpers. + SavedFromID PeerClass + // SavedFromName field of MessageFwdHeader. + // + // Use SetSavedFromName and GetSavedFromName helpers. + SavedFromName string + // SavedDate field of MessageFwdHeader. + // + // Use SetSavedDate and GetSavedDate helpers. + SavedDate int // PSA type // // Use SetPsaType and GetPsaType helpers. @@ -82,7 +96,7 @@ type MessageFwdHeader struct { } // MessageFwdHeaderTypeID is TL type id of MessageFwdHeader. -const MessageFwdHeaderTypeID = 0x5f777dce +const MessageFwdHeaderTypeID = 0x4e4df4bb // Ensuring interfaces in compile-time for MessageFwdHeader. var ( @@ -102,6 +116,9 @@ func (m *MessageFwdHeader) Zero() bool { if !(m.Imported == false) { return false } + if !(m.SavedOut == false) { + return false + } if !(m.FromID == nil) { return false } @@ -123,6 +140,15 @@ func (m *MessageFwdHeader) Zero() bool { if !(m.SavedFromMsgID == 0) { return false } + if !(m.SavedFromID == nil) { + return false + } + if !(m.SavedFromName == "") { + return false + } + if !(m.SavedDate == 0) { + return false + } if !(m.PsaType == "") { return false } @@ -142,6 +168,7 @@ func (m *MessageFwdHeader) String() string { // FillFrom fills MessageFwdHeader from given interface. func (m *MessageFwdHeader) FillFrom(from interface { GetImported() (value bool) + GetSavedOut() (value bool) GetFromID() (value PeerClass, ok bool) GetFromName() (value string, ok bool) GetDate() (value int) @@ -149,9 +176,13 @@ func (m *MessageFwdHeader) FillFrom(from interface { GetPostAuthor() (value string, ok bool) GetSavedFromPeer() (value PeerClass, ok bool) GetSavedFromMsgID() (value int, ok bool) + GetSavedFromID() (value PeerClass, ok bool) + GetSavedFromName() (value string, ok bool) + GetSavedDate() (value int, ok bool) GetPsaType() (value string, ok bool) }) { m.Imported = from.GetImported() + m.SavedOut = from.GetSavedOut() if val, ok := from.GetFromID(); ok { m.FromID = val } @@ -177,6 +208,18 @@ func (m *MessageFwdHeader) FillFrom(from interface { m.SavedFromMsgID = val } + if val, ok := from.GetSavedFromID(); ok { + m.SavedFromID = val + } + + if val, ok := from.GetSavedFromName(); ok { + m.SavedFromName = val + } + + if val, ok := from.GetSavedDate(); ok { + m.SavedDate = val + } + if val, ok := from.GetPsaType(); ok { m.PsaType = val } @@ -211,6 +254,11 @@ func (m *MessageFwdHeader) TypeInfo() tdp.Type { SchemaName: "imported", Null: !m.Flags.Has(7), }, + { + Name: "SavedOut", + SchemaName: "saved_out", + Null: !m.Flags.Has(11), + }, { Name: "FromID", SchemaName: "from_id", @@ -245,6 +293,21 @@ func (m *MessageFwdHeader) TypeInfo() tdp.Type { SchemaName: "saved_from_msg_id", Null: !m.Flags.Has(4), }, + { + Name: "SavedFromID", + SchemaName: "saved_from_id", + Null: !m.Flags.Has(8), + }, + { + Name: "SavedFromName", + SchemaName: "saved_from_name", + Null: !m.Flags.Has(9), + }, + { + Name: "SavedDate", + SchemaName: "saved_date", + Null: !m.Flags.Has(10), + }, { Name: "PsaType", SchemaName: "psa_type", @@ -259,6 +322,9 @@ func (m *MessageFwdHeader) SetFlags() { if !(m.Imported == false) { m.Flags.Set(7) } + if !(m.SavedOut == false) { + m.Flags.Set(11) + } if !(m.FromID == nil) { m.Flags.Set(0) } @@ -277,6 +343,15 @@ func (m *MessageFwdHeader) SetFlags() { if !(m.SavedFromMsgID == 0) { m.Flags.Set(4) } + if !(m.SavedFromID == nil) { + m.Flags.Set(8) + } + if !(m.SavedFromName == "") { + m.Flags.Set(9) + } + if !(m.SavedDate == 0) { + m.Flags.Set(10) + } if !(m.PsaType == "") { m.Flags.Set(6) } @@ -285,7 +360,7 @@ func (m *MessageFwdHeader) SetFlags() { // Encode implements bin.Encoder. func (m *MessageFwdHeader) Encode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode messageFwdHeader#5f777dce as nil") + return fmt.Errorf("can't encode messageFwdHeader#4e4df4bb as nil") } b.PutID(MessageFwdHeaderTypeID) return m.EncodeBare(b) @@ -294,18 +369,18 @@ func (m *MessageFwdHeader) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (m *MessageFwdHeader) EncodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode messageFwdHeader#5f777dce as nil") + return fmt.Errorf("can't encode messageFwdHeader#4e4df4bb as nil") } m.SetFlags() if err := m.Flags.Encode(b); err != nil { - return fmt.Errorf("unable to encode messageFwdHeader#5f777dce: field flags: %w", err) + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field flags: %w", err) } if m.Flags.Has(0) { if m.FromID == nil { - return fmt.Errorf("unable to encode messageFwdHeader#5f777dce: field from_id is nil") + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field from_id is nil") } if err := m.FromID.Encode(b); err != nil { - return fmt.Errorf("unable to encode messageFwdHeader#5f777dce: field from_id: %w", err) + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field from_id: %w", err) } } if m.Flags.Has(5) { @@ -320,15 +395,29 @@ func (m *MessageFwdHeader) EncodeBare(b *bin.Buffer) error { } if m.Flags.Has(4) { if m.SavedFromPeer == nil { - return fmt.Errorf("unable to encode messageFwdHeader#5f777dce: field saved_from_peer is nil") + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field saved_from_peer is nil") } if err := m.SavedFromPeer.Encode(b); err != nil { - return fmt.Errorf("unable to encode messageFwdHeader#5f777dce: field saved_from_peer: %w", err) + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field saved_from_peer: %w", err) } } if m.Flags.Has(4) { b.PutInt(m.SavedFromMsgID) } + if m.Flags.Has(8) { + if m.SavedFromID == nil { + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field saved_from_id is nil") + } + if err := m.SavedFromID.Encode(b); err != nil { + return fmt.Errorf("unable to encode messageFwdHeader#4e4df4bb: field saved_from_id: %w", err) + } + } + if m.Flags.Has(9) { + b.PutString(m.SavedFromName) + } + if m.Flags.Has(10) { + b.PutInt(m.SavedDate) + } if m.Flags.Has(6) { b.PutString(m.PsaType) } @@ -338,10 +427,10 @@ func (m *MessageFwdHeader) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (m *MessageFwdHeader) Decode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode messageFwdHeader#5f777dce to nil") + return fmt.Errorf("can't decode messageFwdHeader#4e4df4bb to nil") } if err := b.ConsumeID(MessageFwdHeaderTypeID); err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: %w", err) } return m.DecodeBare(b) } @@ -349,67 +438,89 @@ func (m *MessageFwdHeader) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (m *MessageFwdHeader) DecodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode messageFwdHeader#5f777dce to nil") + return fmt.Errorf("can't decode messageFwdHeader#4e4df4bb to nil") } { if err := m.Flags.Decode(b); err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field flags: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field flags: %w", err) } } m.Imported = m.Flags.Has(7) + m.SavedOut = m.Flags.Has(11) if m.Flags.Has(0) { value, err := DecodePeer(b) if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field from_id: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field from_id: %w", err) } m.FromID = value } if m.Flags.Has(5) { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field from_name: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field from_name: %w", err) } m.FromName = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field date: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field date: %w", err) } m.Date = value } if m.Flags.Has(2) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field channel_post: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field channel_post: %w", err) } m.ChannelPost = value } if m.Flags.Has(3) { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field post_author: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field post_author: %w", err) } m.PostAuthor = value } if m.Flags.Has(4) { value, err := DecodePeer(b) if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field saved_from_peer: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field saved_from_peer: %w", err) } m.SavedFromPeer = value } if m.Flags.Has(4) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field saved_from_msg_id: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field saved_from_msg_id: %w", err) } m.SavedFromMsgID = value } + if m.Flags.Has(8) { + value, err := DecodePeer(b) + if err != nil { + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field saved_from_id: %w", err) + } + m.SavedFromID = value + } + if m.Flags.Has(9) { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field saved_from_name: %w", err) + } + m.SavedFromName = value + } + if m.Flags.Has(10) { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field saved_date: %w", err) + } + m.SavedDate = value + } if m.Flags.Has(6) { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode messageFwdHeader#5f777dce: field psa_type: %w", err) + return fmt.Errorf("unable to decode messageFwdHeader#4e4df4bb: field psa_type: %w", err) } m.PsaType = value } @@ -435,6 +546,25 @@ func (m *MessageFwdHeader) GetImported() (value bool) { return m.Flags.Has(7) } +// SetSavedOut sets value of SavedOut conditional field. +func (m *MessageFwdHeader) SetSavedOut(value bool) { + if value { + m.Flags.Set(11) + m.SavedOut = true + } else { + m.Flags.Unset(11) + m.SavedOut = false + } +} + +// GetSavedOut returns value of SavedOut conditional field. +func (m *MessageFwdHeader) GetSavedOut() (value bool) { + if m == nil { + return + } + return m.Flags.Has(11) +} + // SetFromID sets value of FromID conditional field. func (m *MessageFwdHeader) SetFromID(value PeerClass) { m.Flags.Set(0) @@ -551,6 +681,60 @@ func (m *MessageFwdHeader) GetSavedFromMsgID() (value int, ok bool) { return m.SavedFromMsgID, true } +// SetSavedFromID sets value of SavedFromID conditional field. +func (m *MessageFwdHeader) SetSavedFromID(value PeerClass) { + m.Flags.Set(8) + m.SavedFromID = value +} + +// GetSavedFromID returns value of SavedFromID conditional field and +// boolean which is true if field was set. +func (m *MessageFwdHeader) GetSavedFromID() (value PeerClass, ok bool) { + if m == nil { + return + } + if !m.Flags.Has(8) { + return value, false + } + return m.SavedFromID, true +} + +// SetSavedFromName sets value of SavedFromName conditional field. +func (m *MessageFwdHeader) SetSavedFromName(value string) { + m.Flags.Set(9) + m.SavedFromName = value +} + +// GetSavedFromName returns value of SavedFromName conditional field and +// boolean which is true if field was set. +func (m *MessageFwdHeader) GetSavedFromName() (value string, ok bool) { + if m == nil { + return + } + if !m.Flags.Has(9) { + return value, false + } + return m.SavedFromName, true +} + +// SetSavedDate sets value of SavedDate conditional field. +func (m *MessageFwdHeader) SetSavedDate(value int) { + m.Flags.Set(10) + m.SavedDate = value +} + +// GetSavedDate returns value of SavedDate conditional field and +// boolean which is true if field was set. +func (m *MessageFwdHeader) GetSavedDate() (value int, ok bool) { + if m == nil { + return + } + if !m.Flags.Has(10) { + return value, false + } + return m.SavedDate, true +} + // SetPsaType sets value of PsaType conditional field. func (m *MessageFwdHeader) SetPsaType(value string) { m.Flags.Set(6) diff --git a/vendor/github.com/gotd/td/tg/tl_message_gen.go b/vendor/github.com/gotd/td/tg/tl_message_gen.go index eb30914c..bde3bec6 100644 --- a/vendor/github.com/gotd/td/tg/tl_message_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_message_gen.go @@ -240,7 +240,7 @@ func (m *MessageEmpty) GetPeerID() (value PeerClass, ok bool) { return m.PeerID, true } -// Message represents TL type `message#38116ee0`. +// Message represents TL type `message#76bec211`. // A message // // See https://core.telegram.org/constructor/message for reference. @@ -296,6 +296,10 @@ type Message struct { FromID PeerClass // Peer ID, the chat where this message was sent PeerID PeerClass + // SavedPeerID field of Message. + // + // Use SetSavedPeerID and GetSavedPeerID helpers. + SavedPeerID PeerClass // Info about forwarded messages // // Use SetFwdFrom and GetFwdFrom helpers. @@ -375,7 +379,7 @@ type Message struct { } // MessageTypeID is TL type id of Message. -const MessageTypeID = 0x38116ee0 +const MessageTypeID = 0x76bec211 // construct implements constructor of MessageClass. func (m Message) construct() MessageClass { return &m } @@ -439,6 +443,9 @@ func (m *Message) Zero() bool { if !(m.PeerID == nil) { return false } + if !(m.SavedPeerID == nil) { + return false + } if !(m.FwdFrom.Zero()) { return false } @@ -519,6 +526,7 @@ func (m *Message) FillFrom(from interface { GetID() (value int) GetFromID() (value PeerClass, ok bool) GetPeerID() (value PeerClass) + GetSavedPeerID() (value PeerClass, ok bool) GetFwdFrom() (value MessageFwdHeader, ok bool) GetViaBotID() (value int64, ok bool) GetReplyTo() (value MessageReplyHeaderClass, ok bool) @@ -554,6 +562,10 @@ func (m *Message) FillFrom(from interface { } m.PeerID = from.GetPeerID() + if val, ok := from.GetSavedPeerID(); ok { + m.SavedPeerID = val + } + if val, ok := from.GetFwdFrom(); ok { m.FwdFrom = val } @@ -709,6 +721,11 @@ func (m *Message) TypeInfo() tdp.Type { Name: "PeerID", SchemaName: "peer_id", }, + { + Name: "SavedPeerID", + SchemaName: "saved_peer_id", + Null: !m.Flags.Has(28), + }, { Name: "FwdFrom", SchemaName: "fwd_from", @@ -834,6 +851,9 @@ func (m *Message) SetFlags() { if !(m.FromID == nil) { m.Flags.Set(8) } + if !(m.SavedPeerID == nil) { + m.Flags.Set(28) + } if !(m.FwdFrom.Zero()) { m.Flags.Set(2) } @@ -884,7 +904,7 @@ func (m *Message) SetFlags() { // Encode implements bin.Encoder. func (m *Message) Encode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode message#38116ee0 as nil") + return fmt.Errorf("can't encode message#76bec211 as nil") } b.PutID(MessageTypeID) return m.EncodeBare(b) @@ -893,30 +913,38 @@ func (m *Message) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (m *Message) EncodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode message#38116ee0 as nil") + return fmt.Errorf("can't encode message#76bec211 as nil") } m.SetFlags() if err := m.Flags.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field flags: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field flags: %w", err) } b.PutInt(m.ID) if m.Flags.Has(8) { if m.FromID == nil { - return fmt.Errorf("unable to encode message#38116ee0: field from_id is nil") + return fmt.Errorf("unable to encode message#76bec211: field from_id is nil") } if err := m.FromID.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field from_id: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field from_id: %w", err) } } if m.PeerID == nil { - return fmt.Errorf("unable to encode message#38116ee0: field peer_id is nil") + return fmt.Errorf("unable to encode message#76bec211: field peer_id is nil") } if err := m.PeerID.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field peer_id: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field peer_id: %w", err) + } + if m.Flags.Has(28) { + if m.SavedPeerID == nil { + return fmt.Errorf("unable to encode message#76bec211: field saved_peer_id is nil") + } + if err := m.SavedPeerID.Encode(b); err != nil { + return fmt.Errorf("unable to encode message#76bec211: field saved_peer_id: %w", err) + } } if m.Flags.Has(2) { if err := m.FwdFrom.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field fwd_from: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field fwd_from: %w", err) } } if m.Flags.Has(11) { @@ -924,38 +952,38 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { } if m.Flags.Has(3) { if m.ReplyTo == nil { - return fmt.Errorf("unable to encode message#38116ee0: field reply_to is nil") + return fmt.Errorf("unable to encode message#76bec211: field reply_to is nil") } if err := m.ReplyTo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field reply_to: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field reply_to: %w", err) } } b.PutInt(m.Date) b.PutString(m.Message) if m.Flags.Has(9) { if m.Media == nil { - return fmt.Errorf("unable to encode message#38116ee0: field media is nil") + return fmt.Errorf("unable to encode message#76bec211: field media is nil") } if err := m.Media.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field media: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field media: %w", err) } } if m.Flags.Has(6) { if m.ReplyMarkup == nil { - return fmt.Errorf("unable to encode message#38116ee0: field reply_markup is nil") + return fmt.Errorf("unable to encode message#76bec211: field reply_markup is nil") } if err := m.ReplyMarkup.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field reply_markup: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field reply_markup: %w", err) } } if m.Flags.Has(7) { b.PutVectorHeader(len(m.Entities)) for idx, v := range m.Entities { if v == nil { - return fmt.Errorf("unable to encode message#38116ee0: field entities element with index %d is nil", idx) + return fmt.Errorf("unable to encode message#76bec211: field entities element with index %d is nil", idx) } if err := v.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field entities element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode message#76bec211: field entities element with index %d: %w", idx, err) } } } @@ -967,7 +995,7 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { } if m.Flags.Has(23) { if err := m.Replies.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field replies: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field replies: %w", err) } } if m.Flags.Has(15) { @@ -981,14 +1009,14 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { } if m.Flags.Has(20) { if err := m.Reactions.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field reactions: %w", err) + return fmt.Errorf("unable to encode message#76bec211: field reactions: %w", err) } } if m.Flags.Has(22) { b.PutVectorHeader(len(m.RestrictionReason)) for idx, v := range m.RestrictionReason { if err := v.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#38116ee0: field restriction_reason element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode message#76bec211: field restriction_reason element with index %d: %w", idx, err) } } } @@ -1001,10 +1029,10 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (m *Message) Decode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode message#38116ee0 to nil") + return fmt.Errorf("can't decode message#76bec211 to nil") } if err := b.ConsumeID(MessageTypeID); err != nil { - return fmt.Errorf("unable to decode message#38116ee0: %w", err) + return fmt.Errorf("unable to decode message#76bec211: %w", err) } return m.DecodeBare(b) } @@ -1012,11 +1040,11 @@ func (m *Message) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (m *Message) DecodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode message#38116ee0 to nil") + return fmt.Errorf("can't decode message#76bec211 to nil") } { if err := m.Flags.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field flags: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field flags: %w", err) } } m.Out = m.Flags.Has(1) @@ -1033,75 +1061,82 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field id: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field id: %w", err) } m.ID = value } if m.Flags.Has(8) { value, err := DecodePeer(b) if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field from_id: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field from_id: %w", err) } m.FromID = value } { value, err := DecodePeer(b) if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field peer_id: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field peer_id: %w", err) } m.PeerID = value } + if m.Flags.Has(28) { + value, err := DecodePeer(b) + if err != nil { + return fmt.Errorf("unable to decode message#76bec211: field saved_peer_id: %w", err) + } + m.SavedPeerID = value + } if m.Flags.Has(2) { if err := m.FwdFrom.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field fwd_from: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field fwd_from: %w", err) } } if m.Flags.Has(11) { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field via_bot_id: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field via_bot_id: %w", err) } m.ViaBotID = value } if m.Flags.Has(3) { value, err := DecodeMessageReplyHeader(b) if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field reply_to: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field reply_to: %w", err) } m.ReplyTo = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field date: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field date: %w", err) } m.Date = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field message: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field message: %w", err) } m.Message = value } if m.Flags.Has(9) { value, err := DecodeMessageMedia(b) if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field media: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field media: %w", err) } m.Media = value } if m.Flags.Has(6) { value, err := DecodeReplyMarkup(b) if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field reply_markup: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field reply_markup: %w", err) } m.ReplyMarkup = value } if m.Flags.Has(7) { headerLen, err := b.VectorHeader() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field entities: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field entities: %w", err) } if headerLen > 0 { @@ -1110,7 +1145,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := DecodeMessageEntity(b) if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field entities: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field entities: %w", err) } m.Entities = append(m.Entities, value) } @@ -1118,52 +1153,52 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { if m.Flags.Has(10) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field views: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field views: %w", err) } m.Views = value } if m.Flags.Has(10) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field forwards: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field forwards: %w", err) } m.Forwards = value } if m.Flags.Has(23) { if err := m.Replies.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field replies: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field replies: %w", err) } } if m.Flags.Has(15) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field edit_date: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field edit_date: %w", err) } m.EditDate = value } if m.Flags.Has(16) { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field post_author: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field post_author: %w", err) } m.PostAuthor = value } if m.Flags.Has(17) { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field grouped_id: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field grouped_id: %w", err) } m.GroupedID = value } if m.Flags.Has(20) { if err := m.Reactions.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field reactions: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field reactions: %w", err) } } if m.Flags.Has(22) { headerLen, err := b.VectorHeader() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field restriction_reason: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field restriction_reason: %w", err) } if headerLen > 0 { @@ -1172,7 +1207,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value RestrictionReason if err := value.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field restriction_reason: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field restriction_reason: %w", err) } m.RestrictionReason = append(m.RestrictionReason, value) } @@ -1180,7 +1215,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { if m.Flags.Has(25) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#38116ee0: field ttl_period: %w", err) + return fmt.Errorf("unable to decode message#76bec211: field ttl_period: %w", err) } m.TTLPeriod = value } @@ -1430,6 +1465,24 @@ func (m *Message) GetPeerID() (value PeerClass) { return m.PeerID } +// SetSavedPeerID sets value of SavedPeerID conditional field. +func (m *Message) SetSavedPeerID(value PeerClass) { + m.Flags.Set(28) + m.SavedPeerID = value +} + +// GetSavedPeerID returns value of SavedPeerID conditional field and +// boolean which is true if field was set. +func (m *Message) GetSavedPeerID() (value PeerClass, ok bool) { + if m == nil { + return + } + if !m.Flags.Has(28) { + return value, false + } + return m.SavedPeerID, true +} + // SetFwdFrom sets value of FwdFrom conditional field. func (m *Message) SetFwdFrom(value MessageFwdHeader) { m.Flags.Set(2) @@ -2351,7 +2404,7 @@ const MessageClassName = "Message" // } // switch v := g.(type) { // case *tg.MessageEmpty: // messageEmpty#90a6ca84 -// case *tg.Message: // message#38116ee0 +// case *tg.Message: // message#76bec211 // case *tg.MessageService: // messageService#2b085862 // default: panic(v) // } @@ -2489,7 +2542,7 @@ func DecodeMessage(buf *bin.Buffer) (MessageClass, error) { } return &v, nil case MessageTypeID: - // Decoding message#38116ee0. + // Decoding message#76bec211. v := Message{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode MessageClass: %w", err) diff --git a/vendor/github.com/gotd/td/tg/tl_message_media_gen.go b/vendor/github.com/gotd/td/tg/tl_message_media_gen.go index dc104e0f..c64a8570 100644 --- a/vendor/github.com/gotd/td/tg/tl_message_media_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_message_media_gen.go @@ -898,6 +898,12 @@ type MessageMediaDocument struct { Nopremium bool // Whether this media should be hidden behind a spoiler warning Spoiler bool + // Video field of MessageMediaDocument. + Video bool + // Round field of MessageMediaDocument. + Round bool + // Voice field of MessageMediaDocument. + Voice bool // Attached document // // Use SetDocument and GetDocument helpers. @@ -943,6 +949,15 @@ func (m *MessageMediaDocument) Zero() bool { if !(m.Spoiler == false) { return false } + if !(m.Video == false) { + return false + } + if !(m.Round == false) { + return false + } + if !(m.Voice == false) { + return false + } if !(m.Document == nil) { return false } @@ -969,12 +984,18 @@ func (m *MessageMediaDocument) String() string { func (m *MessageMediaDocument) FillFrom(from interface { GetNopremium() (value bool) GetSpoiler() (value bool) + GetVideo() (value bool) + GetRound() (value bool) + GetVoice() (value bool) GetDocument() (value DocumentClass, ok bool) GetAltDocument() (value DocumentClass, ok bool) GetTTLSeconds() (value int, ok bool) }) { m.Nopremium = from.GetNopremium() m.Spoiler = from.GetSpoiler() + m.Video = from.GetVideo() + m.Round = from.GetRound() + m.Voice = from.GetVoice() if val, ok := from.GetDocument(); ok { m.Document = val } @@ -1022,6 +1043,21 @@ func (m *MessageMediaDocument) TypeInfo() tdp.Type { SchemaName: "spoiler", Null: !m.Flags.Has(4), }, + { + Name: "Video", + SchemaName: "video", + Null: !m.Flags.Has(6), + }, + { + Name: "Round", + SchemaName: "round", + Null: !m.Flags.Has(7), + }, + { + Name: "Voice", + SchemaName: "voice", + Null: !m.Flags.Has(8), + }, { Name: "Document", SchemaName: "document", @@ -1049,6 +1085,15 @@ func (m *MessageMediaDocument) SetFlags() { if !(m.Spoiler == false) { m.Flags.Set(4) } + if !(m.Video == false) { + m.Flags.Set(6) + } + if !(m.Round == false) { + m.Flags.Set(7) + } + if !(m.Voice == false) { + m.Flags.Set(8) + } if !(m.Document == nil) { m.Flags.Set(0) } @@ -1123,6 +1168,9 @@ func (m *MessageMediaDocument) DecodeBare(b *bin.Buffer) error { } m.Nopremium = m.Flags.Has(3) m.Spoiler = m.Flags.Has(4) + m.Video = m.Flags.Has(6) + m.Round = m.Flags.Has(7) + m.Voice = m.Flags.Has(8) if m.Flags.Has(0) { value, err := DecodeDocument(b) if err != nil { @@ -1185,6 +1233,63 @@ func (m *MessageMediaDocument) GetSpoiler() (value bool) { return m.Flags.Has(4) } +// SetVideo sets value of Video conditional field. +func (m *MessageMediaDocument) SetVideo(value bool) { + if value { + m.Flags.Set(6) + m.Video = true + } else { + m.Flags.Unset(6) + m.Video = false + } +} + +// GetVideo returns value of Video conditional field. +func (m *MessageMediaDocument) GetVideo() (value bool) { + if m == nil { + return + } + return m.Flags.Has(6) +} + +// SetRound sets value of Round conditional field. +func (m *MessageMediaDocument) SetRound(value bool) { + if value { + m.Flags.Set(7) + m.Round = true + } else { + m.Flags.Unset(7) + m.Round = false + } +} + +// GetRound returns value of Round conditional field. +func (m *MessageMediaDocument) GetRound() (value bool) { + if m == nil { + return + } + return m.Flags.Has(7) +} + +// SetVoice sets value of Voice conditional field. +func (m *MessageMediaDocument) SetVoice(value bool) { + if value { + m.Flags.Set(8) + m.Voice = true + } else { + m.Flags.Unset(8) + m.Voice = false + } +} + +// GetVoice returns value of Voice conditional field. +func (m *MessageMediaDocument) GetVoice() (value bool) { + if m == nil { + return + } + return m.Flags.Has(8) +} + // SetDocument sets value of Document conditional field. func (m *MessageMediaDocument) SetDocument(value DocumentClass) { m.Flags.Set(0) diff --git a/vendor/github.com/gotd/td/tg/tl_messages_delete_saved_history_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_delete_saved_history_gen.go new file mode 100644 index 00000000..edf7e6e0 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_delete_saved_history_gen.go @@ -0,0 +1,319 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesDeleteSavedHistoryRequest represents TL type `messages.deleteSavedHistory#6e98102b`. +// +// See https://core.telegram.org/method/messages.deleteSavedHistory for reference. +type MessagesDeleteSavedHistoryRequest struct { + // Flags field of MessagesDeleteSavedHistoryRequest. + Flags bin.Fields + // Peer field of MessagesDeleteSavedHistoryRequest. + Peer InputPeerClass + // MaxID field of MessagesDeleteSavedHistoryRequest. + MaxID int + // MinDate field of MessagesDeleteSavedHistoryRequest. + // + // Use SetMinDate and GetMinDate helpers. + MinDate int + // MaxDate field of MessagesDeleteSavedHistoryRequest. + // + // Use SetMaxDate and GetMaxDate helpers. + MaxDate int +} + +// MessagesDeleteSavedHistoryRequestTypeID is TL type id of MessagesDeleteSavedHistoryRequest. +const MessagesDeleteSavedHistoryRequestTypeID = 0x6e98102b + +// Ensuring interfaces in compile-time for MessagesDeleteSavedHistoryRequest. +var ( + _ bin.Encoder = &MessagesDeleteSavedHistoryRequest{} + _ bin.Decoder = &MessagesDeleteSavedHistoryRequest{} + _ bin.BareEncoder = &MessagesDeleteSavedHistoryRequest{} + _ bin.BareDecoder = &MessagesDeleteSavedHistoryRequest{} +) + +func (d *MessagesDeleteSavedHistoryRequest) Zero() bool { + if d == nil { + return true + } + if !(d.Flags.Zero()) { + return false + } + if !(d.Peer == nil) { + return false + } + if !(d.MaxID == 0) { + return false + } + if !(d.MinDate == 0) { + return false + } + if !(d.MaxDate == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (d *MessagesDeleteSavedHistoryRequest) String() string { + if d == nil { + return "MessagesDeleteSavedHistoryRequest(nil)" + } + type Alias MessagesDeleteSavedHistoryRequest + return fmt.Sprintf("MessagesDeleteSavedHistoryRequest%+v", Alias(*d)) +} + +// FillFrom fills MessagesDeleteSavedHistoryRequest from given interface. +func (d *MessagesDeleteSavedHistoryRequest) FillFrom(from interface { + GetPeer() (value InputPeerClass) + GetMaxID() (value int) + GetMinDate() (value int, ok bool) + GetMaxDate() (value int, ok bool) +}) { + d.Peer = from.GetPeer() + d.MaxID = from.GetMaxID() + if val, ok := from.GetMinDate(); ok { + d.MinDate = val + } + + if val, ok := from.GetMaxDate(); ok { + d.MaxDate = val + } + +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesDeleteSavedHistoryRequest) TypeID() uint32 { + return MessagesDeleteSavedHistoryRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesDeleteSavedHistoryRequest) TypeName() string { + return "messages.deleteSavedHistory" +} + +// TypeInfo returns info about TL type. +func (d *MessagesDeleteSavedHistoryRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.deleteSavedHistory", + ID: MessagesDeleteSavedHistoryRequestTypeID, + } + if d == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Peer", + SchemaName: "peer", + }, + { + Name: "MaxID", + SchemaName: "max_id", + }, + { + Name: "MinDate", + SchemaName: "min_date", + Null: !d.Flags.Has(2), + }, + { + Name: "MaxDate", + SchemaName: "max_date", + Null: !d.Flags.Has(3), + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (d *MessagesDeleteSavedHistoryRequest) SetFlags() { + if !(d.MinDate == 0) { + d.Flags.Set(2) + } + if !(d.MaxDate == 0) { + d.Flags.Set(3) + } +} + +// Encode implements bin.Encoder. +func (d *MessagesDeleteSavedHistoryRequest) Encode(b *bin.Buffer) error { + if d == nil { + return fmt.Errorf("can't encode messages.deleteSavedHistory#6e98102b as nil") + } + b.PutID(MessagesDeleteSavedHistoryRequestTypeID) + return d.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (d *MessagesDeleteSavedHistoryRequest) EncodeBare(b *bin.Buffer) error { + if d == nil { + return fmt.Errorf("can't encode messages.deleteSavedHistory#6e98102b as nil") + } + d.SetFlags() + if err := d.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.deleteSavedHistory#6e98102b: field flags: %w", err) + } + if d.Peer == nil { + return fmt.Errorf("unable to encode messages.deleteSavedHistory#6e98102b: field peer is nil") + } + if err := d.Peer.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.deleteSavedHistory#6e98102b: field peer: %w", err) + } + b.PutInt(d.MaxID) + if d.Flags.Has(2) { + b.PutInt(d.MinDate) + } + if d.Flags.Has(3) { + b.PutInt(d.MaxDate) + } + return nil +} + +// Decode implements bin.Decoder. +func (d *MessagesDeleteSavedHistoryRequest) Decode(b *bin.Buffer) error { + if d == nil { + return fmt.Errorf("can't decode messages.deleteSavedHistory#6e98102b to nil") + } + if err := b.ConsumeID(MessagesDeleteSavedHistoryRequestTypeID); err != nil { + return fmt.Errorf("unable to decode messages.deleteSavedHistory#6e98102b: %w", err) + } + return d.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (d *MessagesDeleteSavedHistoryRequest) DecodeBare(b *bin.Buffer) error { + if d == nil { + return fmt.Errorf("can't decode messages.deleteSavedHistory#6e98102b to nil") + } + { + if err := d.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.deleteSavedHistory#6e98102b: field flags: %w", err) + } + } + { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.deleteSavedHistory#6e98102b: field peer: %w", err) + } + d.Peer = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.deleteSavedHistory#6e98102b: field max_id: %w", err) + } + d.MaxID = value + } + if d.Flags.Has(2) { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.deleteSavedHistory#6e98102b: field min_date: %w", err) + } + d.MinDate = value + } + if d.Flags.Has(3) { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.deleteSavedHistory#6e98102b: field max_date: %w", err) + } + d.MaxDate = value + } + return nil +} + +// GetPeer returns value of Peer field. +func (d *MessagesDeleteSavedHistoryRequest) GetPeer() (value InputPeerClass) { + if d == nil { + return + } + return d.Peer +} + +// GetMaxID returns value of MaxID field. +func (d *MessagesDeleteSavedHistoryRequest) GetMaxID() (value int) { + if d == nil { + return + } + return d.MaxID +} + +// SetMinDate sets value of MinDate conditional field. +func (d *MessagesDeleteSavedHistoryRequest) SetMinDate(value int) { + d.Flags.Set(2) + d.MinDate = value +} + +// GetMinDate returns value of MinDate conditional field and +// boolean which is true if field was set. +func (d *MessagesDeleteSavedHistoryRequest) GetMinDate() (value int, ok bool) { + if d == nil { + return + } + if !d.Flags.Has(2) { + return value, false + } + return d.MinDate, true +} + +// SetMaxDate sets value of MaxDate conditional field. +func (d *MessagesDeleteSavedHistoryRequest) SetMaxDate(value int) { + d.Flags.Set(3) + d.MaxDate = value +} + +// GetMaxDate returns value of MaxDate conditional field and +// boolean which is true if field was set. +func (d *MessagesDeleteSavedHistoryRequest) GetMaxDate() (value int, ok bool) { + if d == nil { + return + } + if !d.Flags.Has(3) { + return value, false + } + return d.MaxDate, true +} + +// MessagesDeleteSavedHistory invokes method messages.deleteSavedHistory#6e98102b returning error if any. +// +// See https://core.telegram.org/method/messages.deleteSavedHistory for reference. +func (c *Client) MessagesDeleteSavedHistory(ctx context.Context, request *MessagesDeleteSavedHistoryRequest) (*MessagesAffectedHistory, error) { + var result MessagesAffectedHistory + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_delete_saved_history_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_delete_saved_history_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_delete_saved_history_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_pinned_saved_dialogs_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_pinned_saved_dialogs_gen.go new file mode 100644 index 00000000..4aa420db --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_pinned_saved_dialogs_gen.go @@ -0,0 +1,141 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesGetPinnedSavedDialogsRequest represents TL type `messages.getPinnedSavedDialogs#d63d94e0`. +// +// See https://core.telegram.org/method/messages.getPinnedSavedDialogs for reference. +type MessagesGetPinnedSavedDialogsRequest struct { +} + +// MessagesGetPinnedSavedDialogsRequestTypeID is TL type id of MessagesGetPinnedSavedDialogsRequest. +const MessagesGetPinnedSavedDialogsRequestTypeID = 0xd63d94e0 + +// Ensuring interfaces in compile-time for MessagesGetPinnedSavedDialogsRequest. +var ( + _ bin.Encoder = &MessagesGetPinnedSavedDialogsRequest{} + _ bin.Decoder = &MessagesGetPinnedSavedDialogsRequest{} + _ bin.BareEncoder = &MessagesGetPinnedSavedDialogsRequest{} + _ bin.BareDecoder = &MessagesGetPinnedSavedDialogsRequest{} +) + +func (g *MessagesGetPinnedSavedDialogsRequest) Zero() bool { + if g == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (g *MessagesGetPinnedSavedDialogsRequest) String() string { + if g == nil { + return "MessagesGetPinnedSavedDialogsRequest(nil)" + } + type Alias MessagesGetPinnedSavedDialogsRequest + return fmt.Sprintf("MessagesGetPinnedSavedDialogsRequest%+v", Alias(*g)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesGetPinnedSavedDialogsRequest) TypeID() uint32 { + return MessagesGetPinnedSavedDialogsRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesGetPinnedSavedDialogsRequest) TypeName() string { + return "messages.getPinnedSavedDialogs" +} + +// TypeInfo returns info about TL type. +func (g *MessagesGetPinnedSavedDialogsRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.getPinnedSavedDialogs", + ID: MessagesGetPinnedSavedDialogsRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (g *MessagesGetPinnedSavedDialogsRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode messages.getPinnedSavedDialogs#d63d94e0 as nil") + } + b.PutID(MessagesGetPinnedSavedDialogsRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *MessagesGetPinnedSavedDialogsRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode messages.getPinnedSavedDialogs#d63d94e0 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (g *MessagesGetPinnedSavedDialogsRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode messages.getPinnedSavedDialogs#d63d94e0 to nil") + } + if err := b.ConsumeID(MessagesGetPinnedSavedDialogsRequestTypeID); err != nil { + return fmt.Errorf("unable to decode messages.getPinnedSavedDialogs#d63d94e0: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *MessagesGetPinnedSavedDialogsRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode messages.getPinnedSavedDialogs#d63d94e0 to nil") + } + return nil +} + +// MessagesGetPinnedSavedDialogs invokes method messages.getPinnedSavedDialogs#d63d94e0 returning error if any. +// +// See https://core.telegram.org/method/messages.getPinnedSavedDialogs for reference. +func (c *Client) MessagesGetPinnedSavedDialogs(ctx context.Context) (MessagesSavedDialogsClass, error) { + var result MessagesSavedDialogsBox + + request := &MessagesGetPinnedSavedDialogsRequest{} + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return result.SavedDialogs, nil +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_pinned_saved_dialogs_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_pinned_saved_dialogs_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_pinned_saved_dialogs_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_saved_dialogs_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_dialogs_gen.go new file mode 100644 index 00000000..80d0e127 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_dialogs_gen.go @@ -0,0 +1,339 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesGetSavedDialogsRequest represents TL type `messages.getSavedDialogs#5381d21a`. +// +// See https://core.telegram.org/method/messages.getSavedDialogs for reference. +type MessagesGetSavedDialogsRequest struct { + // Flags field of MessagesGetSavedDialogsRequest. + Flags bin.Fields + // ExcludePinned field of MessagesGetSavedDialogsRequest. + ExcludePinned bool + // OffsetDate field of MessagesGetSavedDialogsRequest. + OffsetDate int + // OffsetID field of MessagesGetSavedDialogsRequest. + OffsetID int + // OffsetPeer field of MessagesGetSavedDialogsRequest. + OffsetPeer InputPeerClass + // Limit field of MessagesGetSavedDialogsRequest. + Limit int + // Hash field of MessagesGetSavedDialogsRequest. + Hash int64 +} + +// MessagesGetSavedDialogsRequestTypeID is TL type id of MessagesGetSavedDialogsRequest. +const MessagesGetSavedDialogsRequestTypeID = 0x5381d21a + +// Ensuring interfaces in compile-time for MessagesGetSavedDialogsRequest. +var ( + _ bin.Encoder = &MessagesGetSavedDialogsRequest{} + _ bin.Decoder = &MessagesGetSavedDialogsRequest{} + _ bin.BareEncoder = &MessagesGetSavedDialogsRequest{} + _ bin.BareDecoder = &MessagesGetSavedDialogsRequest{} +) + +func (g *MessagesGetSavedDialogsRequest) Zero() bool { + if g == nil { + return true + } + if !(g.Flags.Zero()) { + return false + } + if !(g.ExcludePinned == false) { + return false + } + if !(g.OffsetDate == 0) { + return false + } + if !(g.OffsetID == 0) { + return false + } + if !(g.OffsetPeer == nil) { + return false + } + if !(g.Limit == 0) { + return false + } + if !(g.Hash == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (g *MessagesGetSavedDialogsRequest) String() string { + if g == nil { + return "MessagesGetSavedDialogsRequest(nil)" + } + type Alias MessagesGetSavedDialogsRequest + return fmt.Sprintf("MessagesGetSavedDialogsRequest%+v", Alias(*g)) +} + +// FillFrom fills MessagesGetSavedDialogsRequest from given interface. +func (g *MessagesGetSavedDialogsRequest) FillFrom(from interface { + GetExcludePinned() (value bool) + GetOffsetDate() (value int) + GetOffsetID() (value int) + GetOffsetPeer() (value InputPeerClass) + GetLimit() (value int) + GetHash() (value int64) +}) { + g.ExcludePinned = from.GetExcludePinned() + g.OffsetDate = from.GetOffsetDate() + g.OffsetID = from.GetOffsetID() + g.OffsetPeer = from.GetOffsetPeer() + g.Limit = from.GetLimit() + g.Hash = from.GetHash() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesGetSavedDialogsRequest) TypeID() uint32 { + return MessagesGetSavedDialogsRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesGetSavedDialogsRequest) TypeName() string { + return "messages.getSavedDialogs" +} + +// TypeInfo returns info about TL type. +func (g *MessagesGetSavedDialogsRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.getSavedDialogs", + ID: MessagesGetSavedDialogsRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ExcludePinned", + SchemaName: "exclude_pinned", + Null: !g.Flags.Has(0), + }, + { + Name: "OffsetDate", + SchemaName: "offset_date", + }, + { + Name: "OffsetID", + SchemaName: "offset_id", + }, + { + Name: "OffsetPeer", + SchemaName: "offset_peer", + }, + { + Name: "Limit", + SchemaName: "limit", + }, + { + Name: "Hash", + SchemaName: "hash", + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (g *MessagesGetSavedDialogsRequest) SetFlags() { + if !(g.ExcludePinned == false) { + g.Flags.Set(0) + } +} + +// Encode implements bin.Encoder. +func (g *MessagesGetSavedDialogsRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode messages.getSavedDialogs#5381d21a as nil") + } + b.PutID(MessagesGetSavedDialogsRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *MessagesGetSavedDialogsRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode messages.getSavedDialogs#5381d21a as nil") + } + g.SetFlags() + if err := g.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSavedDialogs#5381d21a: field flags: %w", err) + } + b.PutInt(g.OffsetDate) + b.PutInt(g.OffsetID) + if g.OffsetPeer == nil { + return fmt.Errorf("unable to encode messages.getSavedDialogs#5381d21a: field offset_peer is nil") + } + if err := g.OffsetPeer.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSavedDialogs#5381d21a: field offset_peer: %w", err) + } + b.PutInt(g.Limit) + b.PutLong(g.Hash) + return nil +} + +// Decode implements bin.Decoder. +func (g *MessagesGetSavedDialogsRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode messages.getSavedDialogs#5381d21a to nil") + } + if err := b.ConsumeID(MessagesGetSavedDialogsRequestTypeID); err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *MessagesGetSavedDialogsRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode messages.getSavedDialogs#5381d21a to nil") + } + { + if err := g.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: field flags: %w", err) + } + } + g.ExcludePinned = g.Flags.Has(0) + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: field offset_date: %w", err) + } + g.OffsetDate = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: field offset_id: %w", err) + } + g.OffsetID = value + } + { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: field offset_peer: %w", err) + } + g.OffsetPeer = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: field limit: %w", err) + } + g.Limit = value + } + { + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedDialogs#5381d21a: field hash: %w", err) + } + g.Hash = value + } + return nil +} + +// SetExcludePinned sets value of ExcludePinned conditional field. +func (g *MessagesGetSavedDialogsRequest) SetExcludePinned(value bool) { + if value { + g.Flags.Set(0) + g.ExcludePinned = true + } else { + g.Flags.Unset(0) + g.ExcludePinned = false + } +} + +// GetExcludePinned returns value of ExcludePinned conditional field. +func (g *MessagesGetSavedDialogsRequest) GetExcludePinned() (value bool) { + if g == nil { + return + } + return g.Flags.Has(0) +} + +// GetOffsetDate returns value of OffsetDate field. +func (g *MessagesGetSavedDialogsRequest) GetOffsetDate() (value int) { + if g == nil { + return + } + return g.OffsetDate +} + +// GetOffsetID returns value of OffsetID field. +func (g *MessagesGetSavedDialogsRequest) GetOffsetID() (value int) { + if g == nil { + return + } + return g.OffsetID +} + +// GetOffsetPeer returns value of OffsetPeer field. +func (g *MessagesGetSavedDialogsRequest) GetOffsetPeer() (value InputPeerClass) { + if g == nil { + return + } + return g.OffsetPeer +} + +// GetLimit returns value of Limit field. +func (g *MessagesGetSavedDialogsRequest) GetLimit() (value int) { + if g == nil { + return + } + return g.Limit +} + +// GetHash returns value of Hash field. +func (g *MessagesGetSavedDialogsRequest) GetHash() (value int64) { + if g == nil { + return + } + return g.Hash +} + +// MessagesGetSavedDialogs invokes method messages.getSavedDialogs#5381d21a returning error if any. +// +// See https://core.telegram.org/method/messages.getSavedDialogs for reference. +func (c *Client) MessagesGetSavedDialogs(ctx context.Context, request *MessagesGetSavedDialogsRequest) (MessagesSavedDialogsClass, error) { + var result MessagesSavedDialogsBox + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return result.SavedDialogs, nil +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_saved_dialogs_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_dialogs_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_dialogs_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_saved_history_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_history_gen.go new file mode 100644 index 00000000..741ea16a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_history_gen.go @@ -0,0 +1,367 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesGetSavedHistoryRequest represents TL type `messages.getSavedHistory#3d9a414d`. +// +// See https://core.telegram.org/method/messages.getSavedHistory for reference. +type MessagesGetSavedHistoryRequest struct { + // Peer field of MessagesGetSavedHistoryRequest. + Peer InputPeerClass + // OffsetID field of MessagesGetSavedHistoryRequest. + OffsetID int + // OffsetDate field of MessagesGetSavedHistoryRequest. + OffsetDate int + // AddOffset field of MessagesGetSavedHistoryRequest. + AddOffset int + // Limit field of MessagesGetSavedHistoryRequest. + Limit int + // MaxID field of MessagesGetSavedHistoryRequest. + MaxID int + // MinID field of MessagesGetSavedHistoryRequest. + MinID int + // Hash field of MessagesGetSavedHistoryRequest. + Hash int64 +} + +// MessagesGetSavedHistoryRequestTypeID is TL type id of MessagesGetSavedHistoryRequest. +const MessagesGetSavedHistoryRequestTypeID = 0x3d9a414d + +// Ensuring interfaces in compile-time for MessagesGetSavedHistoryRequest. +var ( + _ bin.Encoder = &MessagesGetSavedHistoryRequest{} + _ bin.Decoder = &MessagesGetSavedHistoryRequest{} + _ bin.BareEncoder = &MessagesGetSavedHistoryRequest{} + _ bin.BareDecoder = &MessagesGetSavedHistoryRequest{} +) + +func (g *MessagesGetSavedHistoryRequest) Zero() bool { + if g == nil { + return true + } + if !(g.Peer == nil) { + return false + } + if !(g.OffsetID == 0) { + return false + } + if !(g.OffsetDate == 0) { + return false + } + if !(g.AddOffset == 0) { + return false + } + if !(g.Limit == 0) { + return false + } + if !(g.MaxID == 0) { + return false + } + if !(g.MinID == 0) { + return false + } + if !(g.Hash == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (g *MessagesGetSavedHistoryRequest) String() string { + if g == nil { + return "MessagesGetSavedHistoryRequest(nil)" + } + type Alias MessagesGetSavedHistoryRequest + return fmt.Sprintf("MessagesGetSavedHistoryRequest%+v", Alias(*g)) +} + +// FillFrom fills MessagesGetSavedHistoryRequest from given interface. +func (g *MessagesGetSavedHistoryRequest) FillFrom(from interface { + GetPeer() (value InputPeerClass) + GetOffsetID() (value int) + GetOffsetDate() (value int) + GetAddOffset() (value int) + GetLimit() (value int) + GetMaxID() (value int) + GetMinID() (value int) + GetHash() (value int64) +}) { + g.Peer = from.GetPeer() + g.OffsetID = from.GetOffsetID() + g.OffsetDate = from.GetOffsetDate() + g.AddOffset = from.GetAddOffset() + g.Limit = from.GetLimit() + g.MaxID = from.GetMaxID() + g.MinID = from.GetMinID() + g.Hash = from.GetHash() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesGetSavedHistoryRequest) TypeID() uint32 { + return MessagesGetSavedHistoryRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesGetSavedHistoryRequest) TypeName() string { + return "messages.getSavedHistory" +} + +// TypeInfo returns info about TL type. +func (g *MessagesGetSavedHistoryRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.getSavedHistory", + ID: MessagesGetSavedHistoryRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Peer", + SchemaName: "peer", + }, + { + Name: "OffsetID", + SchemaName: "offset_id", + }, + { + Name: "OffsetDate", + SchemaName: "offset_date", + }, + { + Name: "AddOffset", + SchemaName: "add_offset", + }, + { + Name: "Limit", + SchemaName: "limit", + }, + { + Name: "MaxID", + SchemaName: "max_id", + }, + { + Name: "MinID", + SchemaName: "min_id", + }, + { + Name: "Hash", + SchemaName: "hash", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (g *MessagesGetSavedHistoryRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode messages.getSavedHistory#3d9a414d as nil") + } + b.PutID(MessagesGetSavedHistoryRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *MessagesGetSavedHistoryRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode messages.getSavedHistory#3d9a414d as nil") + } + if g.Peer == nil { + return fmt.Errorf("unable to encode messages.getSavedHistory#3d9a414d: field peer is nil") + } + if err := g.Peer.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSavedHistory#3d9a414d: field peer: %w", err) + } + b.PutInt(g.OffsetID) + b.PutInt(g.OffsetDate) + b.PutInt(g.AddOffset) + b.PutInt(g.Limit) + b.PutInt(g.MaxID) + b.PutInt(g.MinID) + b.PutLong(g.Hash) + return nil +} + +// Decode implements bin.Decoder. +func (g *MessagesGetSavedHistoryRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode messages.getSavedHistory#3d9a414d to nil") + } + if err := b.ConsumeID(MessagesGetSavedHistoryRequestTypeID); err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *MessagesGetSavedHistoryRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode messages.getSavedHistory#3d9a414d to nil") + } + { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field peer: %w", err) + } + g.Peer = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field offset_id: %w", err) + } + g.OffsetID = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field offset_date: %w", err) + } + g.OffsetDate = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field add_offset: %w", err) + } + g.AddOffset = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field limit: %w", err) + } + g.Limit = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field max_id: %w", err) + } + g.MaxID = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field min_id: %w", err) + } + g.MinID = value + } + { + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode messages.getSavedHistory#3d9a414d: field hash: %w", err) + } + g.Hash = value + } + return nil +} + +// GetPeer returns value of Peer field. +func (g *MessagesGetSavedHistoryRequest) GetPeer() (value InputPeerClass) { + if g == nil { + return + } + return g.Peer +} + +// GetOffsetID returns value of OffsetID field. +func (g *MessagesGetSavedHistoryRequest) GetOffsetID() (value int) { + if g == nil { + return + } + return g.OffsetID +} + +// GetOffsetDate returns value of OffsetDate field. +func (g *MessagesGetSavedHistoryRequest) GetOffsetDate() (value int) { + if g == nil { + return + } + return g.OffsetDate +} + +// GetAddOffset returns value of AddOffset field. +func (g *MessagesGetSavedHistoryRequest) GetAddOffset() (value int) { + if g == nil { + return + } + return g.AddOffset +} + +// GetLimit returns value of Limit field. +func (g *MessagesGetSavedHistoryRequest) GetLimit() (value int) { + if g == nil { + return + } + return g.Limit +} + +// GetMaxID returns value of MaxID field. +func (g *MessagesGetSavedHistoryRequest) GetMaxID() (value int) { + if g == nil { + return + } + return g.MaxID +} + +// GetMinID returns value of MinID field. +func (g *MessagesGetSavedHistoryRequest) GetMinID() (value int) { + if g == nil { + return + } + return g.MinID +} + +// GetHash returns value of Hash field. +func (g *MessagesGetSavedHistoryRequest) GetHash() (value int64) { + if g == nil { + return + } + return g.Hash +} + +// MessagesGetSavedHistory invokes method messages.getSavedHistory#3d9a414d returning error if any. +// +// See https://core.telegram.org/method/messages.getSavedHistory for reference. +func (c *Client) MessagesGetSavedHistory(ctx context.Context, request *MessagesGetSavedHistoryRequest) (MessagesMessagesClass, error) { + var result MessagesMessagesBox + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return result.Messages, nil +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_saved_history_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_history_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_saved_history_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_search_counters_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_search_counters_gen.go index 80e256b8..1a56b17d 100644 --- a/vendor/github.com/gotd/td/tg/tl_messages_get_search_counters_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_search_counters_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// MessagesGetSearchCountersRequest represents TL type `messages.getSearchCounters#ae7cc1`. +// MessagesGetSearchCountersRequest represents TL type `messages.getSearchCounters#1bbcf300`. // Get the number of results that would be found by a messages.search¹ call with the // same parameters // @@ -47,6 +47,10 @@ type MessagesGetSearchCountersRequest struct { Flags bin.Fields // Peer where to search Peer InputPeerClass + // SavedPeerID field of MessagesGetSearchCountersRequest. + // + // Use SetSavedPeerID and GetSavedPeerID helpers. + SavedPeerID InputPeerClass // If set, consider only messages within the specified forum topic¹ // // Links: @@ -59,7 +63,7 @@ type MessagesGetSearchCountersRequest struct { } // MessagesGetSearchCountersRequestTypeID is TL type id of MessagesGetSearchCountersRequest. -const MessagesGetSearchCountersRequestTypeID = 0xae7cc1 +const MessagesGetSearchCountersRequestTypeID = 0x1bbcf300 // Ensuring interfaces in compile-time for MessagesGetSearchCountersRequest. var ( @@ -79,6 +83,9 @@ func (g *MessagesGetSearchCountersRequest) Zero() bool { if !(g.Peer == nil) { return false } + if !(g.SavedPeerID == nil) { + return false + } if !(g.TopMsgID == 0) { return false } @@ -101,10 +108,15 @@ func (g *MessagesGetSearchCountersRequest) String() string { // FillFrom fills MessagesGetSearchCountersRequest from given interface. func (g *MessagesGetSearchCountersRequest) FillFrom(from interface { GetPeer() (value InputPeerClass) + GetSavedPeerID() (value InputPeerClass, ok bool) GetTopMsgID() (value int, ok bool) GetFilters() (value []MessagesFilterClass) }) { g.Peer = from.GetPeer() + if val, ok := from.GetSavedPeerID(); ok { + g.SavedPeerID = val + } + if val, ok := from.GetTopMsgID(); ok { g.TopMsgID = val } @@ -139,6 +151,11 @@ func (g *MessagesGetSearchCountersRequest) TypeInfo() tdp.Type { Name: "Peer", SchemaName: "peer", }, + { + Name: "SavedPeerID", + SchemaName: "saved_peer_id", + Null: !g.Flags.Has(2), + }, { Name: "TopMsgID", SchemaName: "top_msg_id", @@ -154,6 +171,9 @@ func (g *MessagesGetSearchCountersRequest) TypeInfo() tdp.Type { // SetFlags sets flags for non-zero fields. func (g *MessagesGetSearchCountersRequest) SetFlags() { + if !(g.SavedPeerID == nil) { + g.Flags.Set(2) + } if !(g.TopMsgID == 0) { g.Flags.Set(0) } @@ -162,7 +182,7 @@ func (g *MessagesGetSearchCountersRequest) SetFlags() { // Encode implements bin.Encoder. func (g *MessagesGetSearchCountersRequest) Encode(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't encode messages.getSearchCounters#ae7cc1 as nil") + return fmt.Errorf("can't encode messages.getSearchCounters#1bbcf300 as nil") } b.PutID(MessagesGetSearchCountersRequestTypeID) return g.EncodeBare(b) @@ -171,17 +191,25 @@ func (g *MessagesGetSearchCountersRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (g *MessagesGetSearchCountersRequest) EncodeBare(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't encode messages.getSearchCounters#ae7cc1 as nil") + return fmt.Errorf("can't encode messages.getSearchCounters#1bbcf300 as nil") } g.SetFlags() if err := g.Flags.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchCounters#ae7cc1: field flags: %w", err) + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field flags: %w", err) } if g.Peer == nil { - return fmt.Errorf("unable to encode messages.getSearchCounters#ae7cc1: field peer is nil") + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field peer is nil") } if err := g.Peer.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchCounters#ae7cc1: field peer: %w", err) + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field peer: %w", err) + } + if g.Flags.Has(2) { + if g.SavedPeerID == nil { + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field saved_peer_id is nil") + } + if err := g.SavedPeerID.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field saved_peer_id: %w", err) + } } if g.Flags.Has(0) { b.PutInt(g.TopMsgID) @@ -189,10 +217,10 @@ func (g *MessagesGetSearchCountersRequest) EncodeBare(b *bin.Buffer) error { b.PutVectorHeader(len(g.Filters)) for idx, v := range g.Filters { if v == nil { - return fmt.Errorf("unable to encode messages.getSearchCounters#ae7cc1: field filters element with index %d is nil", idx) + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field filters element with index %d is nil", idx) } if err := v.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchCounters#ae7cc1: field filters element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode messages.getSearchCounters#1bbcf300: field filters element with index %d: %w", idx, err) } } return nil @@ -201,10 +229,10 @@ func (g *MessagesGetSearchCountersRequest) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (g *MessagesGetSearchCountersRequest) Decode(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't decode messages.getSearchCounters#ae7cc1 to nil") + return fmt.Errorf("can't decode messages.getSearchCounters#1bbcf300 to nil") } if err := b.ConsumeID(MessagesGetSearchCountersRequestTypeID); err != nil { - return fmt.Errorf("unable to decode messages.getSearchCounters#ae7cc1: %w", err) + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: %w", err) } return g.DecodeBare(b) } @@ -212,31 +240,38 @@ func (g *MessagesGetSearchCountersRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (g *MessagesGetSearchCountersRequest) DecodeBare(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't decode messages.getSearchCounters#ae7cc1 to nil") + return fmt.Errorf("can't decode messages.getSearchCounters#1bbcf300 to nil") } { if err := g.Flags.Decode(b); err != nil { - return fmt.Errorf("unable to decode messages.getSearchCounters#ae7cc1: field flags: %w", err) + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: field flags: %w", err) } } { value, err := DecodeInputPeer(b) if err != nil { - return fmt.Errorf("unable to decode messages.getSearchCounters#ae7cc1: field peer: %w", err) + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: field peer: %w", err) } g.Peer = value } + if g.Flags.Has(2) { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: field saved_peer_id: %w", err) + } + g.SavedPeerID = value + } if g.Flags.Has(0) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.getSearchCounters#ae7cc1: field top_msg_id: %w", err) + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: field top_msg_id: %w", err) } g.TopMsgID = value } { headerLen, err := b.VectorHeader() if err != nil { - return fmt.Errorf("unable to decode messages.getSearchCounters#ae7cc1: field filters: %w", err) + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: field filters: %w", err) } if headerLen > 0 { @@ -245,7 +280,7 @@ func (g *MessagesGetSearchCountersRequest) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := DecodeMessagesFilter(b) if err != nil { - return fmt.Errorf("unable to decode messages.getSearchCounters#ae7cc1: field filters: %w", err) + return fmt.Errorf("unable to decode messages.getSearchCounters#1bbcf300: field filters: %w", err) } g.Filters = append(g.Filters, value) } @@ -261,6 +296,24 @@ func (g *MessagesGetSearchCountersRequest) GetPeer() (value InputPeerClass) { return g.Peer } +// SetSavedPeerID sets value of SavedPeerID conditional field. +func (g *MessagesGetSearchCountersRequest) SetSavedPeerID(value InputPeerClass) { + g.Flags.Set(2) + g.SavedPeerID = value +} + +// GetSavedPeerID returns value of SavedPeerID conditional field and +// boolean which is true if field was set. +func (g *MessagesGetSearchCountersRequest) GetSavedPeerID() (value InputPeerClass, ok bool) { + if g == nil { + return + } + if !g.Flags.Has(2) { + return value, false + } + return g.SavedPeerID, true +} + // SetTopMsgID sets value of TopMsgID conditional field. func (g *MessagesGetSearchCountersRequest) SetTopMsgID(value int) { g.Flags.Set(0) @@ -292,7 +345,7 @@ func (g *MessagesGetSearchCountersRequest) MapFilters() (value MessagesFilterCla return MessagesFilterClassArray(g.Filters) } -// MessagesGetSearchCounters invokes method messages.getSearchCounters#ae7cc1 returning error if any. +// MessagesGetSearchCounters invokes method messages.getSearchCounters#1bbcf300 returning error if any. // Get the number of results that would be found by a messages.search¹ call with the // same parameters // diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_calendar_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_calendar_gen.go index 0542dd48..9c577605 100644 --- a/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_calendar_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_calendar_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// MessagesGetSearchResultsCalendarRequest represents TL type `messages.getSearchResultsCalendar#49f0bde9`. +// MessagesGetSearchResultsCalendarRequest represents TL type `messages.getSearchResultsCalendar#6aa3f6bd`. // Returns information about the next messages of the specified type in the chat split by // days. // Returns the results in reverse chronological order. @@ -39,8 +39,14 @@ var ( // // See https://core.telegram.org/method/messages.getSearchResultsCalendar for reference. type MessagesGetSearchResultsCalendarRequest struct { + // Flags field of MessagesGetSearchResultsCalendarRequest. + Flags bin.Fields // Peer where to search Peer InputPeerClass + // SavedPeerID field of MessagesGetSearchResultsCalendarRequest. + // + // Use SetSavedPeerID and GetSavedPeerID helpers. + SavedPeerID InputPeerClass // Message filter, inputMessagesFilterEmpty¹, inputMessagesFilterMyMentions² filters // are not supported by this method. // @@ -61,7 +67,7 @@ type MessagesGetSearchResultsCalendarRequest struct { } // MessagesGetSearchResultsCalendarRequestTypeID is TL type id of MessagesGetSearchResultsCalendarRequest. -const MessagesGetSearchResultsCalendarRequestTypeID = 0x49f0bde9 +const MessagesGetSearchResultsCalendarRequestTypeID = 0x6aa3f6bd // Ensuring interfaces in compile-time for MessagesGetSearchResultsCalendarRequest. var ( @@ -75,9 +81,15 @@ func (g *MessagesGetSearchResultsCalendarRequest) Zero() bool { if g == nil { return true } + if !(g.Flags.Zero()) { + return false + } if !(g.Peer == nil) { return false } + if !(g.SavedPeerID == nil) { + return false + } if !(g.Filter == nil) { return false } @@ -103,11 +115,16 @@ func (g *MessagesGetSearchResultsCalendarRequest) String() string { // FillFrom fills MessagesGetSearchResultsCalendarRequest from given interface. func (g *MessagesGetSearchResultsCalendarRequest) FillFrom(from interface { GetPeer() (value InputPeerClass) + GetSavedPeerID() (value InputPeerClass, ok bool) GetFilter() (value MessagesFilterClass) GetOffsetID() (value int) GetOffsetDate() (value int) }) { g.Peer = from.GetPeer() + if val, ok := from.GetSavedPeerID(); ok { + g.SavedPeerID = val + } + g.Filter = from.GetFilter() g.OffsetID = from.GetOffsetID() g.OffsetDate = from.GetOffsetDate() @@ -140,6 +157,11 @@ func (g *MessagesGetSearchResultsCalendarRequest) TypeInfo() tdp.Type { Name: "Peer", SchemaName: "peer", }, + { + Name: "SavedPeerID", + SchemaName: "saved_peer_id", + Null: !g.Flags.Has(2), + }, { Name: "Filter", SchemaName: "filter", @@ -156,10 +178,17 @@ func (g *MessagesGetSearchResultsCalendarRequest) TypeInfo() tdp.Type { return typ } +// SetFlags sets flags for non-zero fields. +func (g *MessagesGetSearchResultsCalendarRequest) SetFlags() { + if !(g.SavedPeerID == nil) { + g.Flags.Set(2) + } +} + // Encode implements bin.Encoder. func (g *MessagesGetSearchResultsCalendarRequest) Encode(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't encode messages.getSearchResultsCalendar#49f0bde9 as nil") + return fmt.Errorf("can't encode messages.getSearchResultsCalendar#6aa3f6bd as nil") } b.PutID(MessagesGetSearchResultsCalendarRequestTypeID) return g.EncodeBare(b) @@ -168,19 +197,31 @@ func (g *MessagesGetSearchResultsCalendarRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (g *MessagesGetSearchResultsCalendarRequest) EncodeBare(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't encode messages.getSearchResultsCalendar#49f0bde9 as nil") + return fmt.Errorf("can't encode messages.getSearchResultsCalendar#6aa3f6bd as nil") + } + g.SetFlags() + if err := g.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field flags: %w", err) } if g.Peer == nil { - return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#49f0bde9: field peer is nil") + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field peer is nil") } if err := g.Peer.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#49f0bde9: field peer: %w", err) + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field peer: %w", err) + } + if g.Flags.Has(2) { + if g.SavedPeerID == nil { + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field saved_peer_id is nil") + } + if err := g.SavedPeerID.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field saved_peer_id: %w", err) + } } if g.Filter == nil { - return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#49f0bde9: field filter is nil") + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field filter is nil") } if err := g.Filter.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#49f0bde9: field filter: %w", err) + return fmt.Errorf("unable to encode messages.getSearchResultsCalendar#6aa3f6bd: field filter: %w", err) } b.PutInt(g.OffsetID) b.PutInt(g.OffsetDate) @@ -190,10 +231,10 @@ func (g *MessagesGetSearchResultsCalendarRequest) EncodeBare(b *bin.Buffer) erro // Decode implements bin.Decoder. func (g *MessagesGetSearchResultsCalendarRequest) Decode(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't decode messages.getSearchResultsCalendar#49f0bde9 to nil") + return fmt.Errorf("can't decode messages.getSearchResultsCalendar#6aa3f6bd to nil") } if err := b.ConsumeID(MessagesGetSearchResultsCalendarRequestTypeID); err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#49f0bde9: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: %w", err) } return g.DecodeBare(b) } @@ -201,33 +242,45 @@ func (g *MessagesGetSearchResultsCalendarRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (g *MessagesGetSearchResultsCalendarRequest) DecodeBare(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't decode messages.getSearchResultsCalendar#49f0bde9 to nil") + return fmt.Errorf("can't decode messages.getSearchResultsCalendar#6aa3f6bd to nil") + } + { + if err := g.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: field flags: %w", err) + } } { value, err := DecodeInputPeer(b) if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#49f0bde9: field peer: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: field peer: %w", err) } g.Peer = value } + if g.Flags.Has(2) { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: field saved_peer_id: %w", err) + } + g.SavedPeerID = value + } { value, err := DecodeMessagesFilter(b) if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#49f0bde9: field filter: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: field filter: %w", err) } g.Filter = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#49f0bde9: field offset_id: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: field offset_id: %w", err) } g.OffsetID = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#49f0bde9: field offset_date: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsCalendar#6aa3f6bd: field offset_date: %w", err) } g.OffsetDate = value } @@ -242,6 +295,24 @@ func (g *MessagesGetSearchResultsCalendarRequest) GetPeer() (value InputPeerClas return g.Peer } +// SetSavedPeerID sets value of SavedPeerID conditional field. +func (g *MessagesGetSearchResultsCalendarRequest) SetSavedPeerID(value InputPeerClass) { + g.Flags.Set(2) + g.SavedPeerID = value +} + +// GetSavedPeerID returns value of SavedPeerID conditional field and +// boolean which is true if field was set. +func (g *MessagesGetSearchResultsCalendarRequest) GetSavedPeerID() (value InputPeerClass, ok bool) { + if g == nil { + return + } + if !g.Flags.Has(2) { + return value, false + } + return g.SavedPeerID, true +} + // GetFilter returns value of Filter field. func (g *MessagesGetSearchResultsCalendarRequest) GetFilter() (value MessagesFilterClass) { if g == nil { @@ -266,7 +337,7 @@ func (g *MessagesGetSearchResultsCalendarRequest) GetOffsetDate() (value int) { return g.OffsetDate } -// MessagesGetSearchResultsCalendar invokes method messages.getSearchResultsCalendar#49f0bde9 returning error if any. +// MessagesGetSearchResultsCalendar invokes method messages.getSearchResultsCalendar#6aa3f6bd returning error if any. // Returns information about the next messages of the specified type in the chat split by // days. // Returns the results in reverse chronological order. diff --git a/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_positions_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_positions_gen.go index 7373bb38..00a64903 100644 --- a/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_positions_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_messages_get_search_results_positions_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// MessagesGetSearchResultsPositionsRequest represents TL type `messages.getSearchResultsPositions#6e9583a3`. +// MessagesGetSearchResultsPositionsRequest represents TL type `messages.getSearchResultsPositions#9c7f2f10`. // Returns sparse positions of messages of the specified type in the chat to be used for // shared media scroll implementation. // Returns the results in reverse chronological order (i.e., in order of decreasing @@ -39,8 +39,14 @@ var ( // // See https://core.telegram.org/method/messages.getSearchResultsPositions for reference. type MessagesGetSearchResultsPositionsRequest struct { + // Flags field of MessagesGetSearchResultsPositionsRequest. + Flags bin.Fields // Peer where to search Peer InputPeerClass + // SavedPeerID field of MessagesGetSearchResultsPositionsRequest. + // + // Use SetSavedPeerID and GetSavedPeerID helpers. + SavedPeerID InputPeerClass // Message filter, inputMessagesFilterEmpty¹, inputMessagesFilterMyMentions² filters // are not supported by this method. // @@ -61,7 +67,7 @@ type MessagesGetSearchResultsPositionsRequest struct { } // MessagesGetSearchResultsPositionsRequestTypeID is TL type id of MessagesGetSearchResultsPositionsRequest. -const MessagesGetSearchResultsPositionsRequestTypeID = 0x6e9583a3 +const MessagesGetSearchResultsPositionsRequestTypeID = 0x9c7f2f10 // Ensuring interfaces in compile-time for MessagesGetSearchResultsPositionsRequest. var ( @@ -75,9 +81,15 @@ func (g *MessagesGetSearchResultsPositionsRequest) Zero() bool { if g == nil { return true } + if !(g.Flags.Zero()) { + return false + } if !(g.Peer == nil) { return false } + if !(g.SavedPeerID == nil) { + return false + } if !(g.Filter == nil) { return false } @@ -103,11 +115,16 @@ func (g *MessagesGetSearchResultsPositionsRequest) String() string { // FillFrom fills MessagesGetSearchResultsPositionsRequest from given interface. func (g *MessagesGetSearchResultsPositionsRequest) FillFrom(from interface { GetPeer() (value InputPeerClass) + GetSavedPeerID() (value InputPeerClass, ok bool) GetFilter() (value MessagesFilterClass) GetOffsetID() (value int) GetLimit() (value int) }) { g.Peer = from.GetPeer() + if val, ok := from.GetSavedPeerID(); ok { + g.SavedPeerID = val + } + g.Filter = from.GetFilter() g.OffsetID = from.GetOffsetID() g.Limit = from.GetLimit() @@ -140,6 +157,11 @@ func (g *MessagesGetSearchResultsPositionsRequest) TypeInfo() tdp.Type { Name: "Peer", SchemaName: "peer", }, + { + Name: "SavedPeerID", + SchemaName: "saved_peer_id", + Null: !g.Flags.Has(2), + }, { Name: "Filter", SchemaName: "filter", @@ -156,10 +178,17 @@ func (g *MessagesGetSearchResultsPositionsRequest) TypeInfo() tdp.Type { return typ } +// SetFlags sets flags for non-zero fields. +func (g *MessagesGetSearchResultsPositionsRequest) SetFlags() { + if !(g.SavedPeerID == nil) { + g.Flags.Set(2) + } +} + // Encode implements bin.Encoder. func (g *MessagesGetSearchResultsPositionsRequest) Encode(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't encode messages.getSearchResultsPositions#6e9583a3 as nil") + return fmt.Errorf("can't encode messages.getSearchResultsPositions#9c7f2f10 as nil") } b.PutID(MessagesGetSearchResultsPositionsRequestTypeID) return g.EncodeBare(b) @@ -168,19 +197,31 @@ func (g *MessagesGetSearchResultsPositionsRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (g *MessagesGetSearchResultsPositionsRequest) EncodeBare(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't encode messages.getSearchResultsPositions#6e9583a3 as nil") + return fmt.Errorf("can't encode messages.getSearchResultsPositions#9c7f2f10 as nil") + } + g.SetFlags() + if err := g.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field flags: %w", err) } if g.Peer == nil { - return fmt.Errorf("unable to encode messages.getSearchResultsPositions#6e9583a3: field peer is nil") + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field peer is nil") } if err := g.Peer.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchResultsPositions#6e9583a3: field peer: %w", err) + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field peer: %w", err) + } + if g.Flags.Has(2) { + if g.SavedPeerID == nil { + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field saved_peer_id is nil") + } + if err := g.SavedPeerID.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field saved_peer_id: %w", err) + } } if g.Filter == nil { - return fmt.Errorf("unable to encode messages.getSearchResultsPositions#6e9583a3: field filter is nil") + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field filter is nil") } if err := g.Filter.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.getSearchResultsPositions#6e9583a3: field filter: %w", err) + return fmt.Errorf("unable to encode messages.getSearchResultsPositions#9c7f2f10: field filter: %w", err) } b.PutInt(g.OffsetID) b.PutInt(g.Limit) @@ -190,10 +231,10 @@ func (g *MessagesGetSearchResultsPositionsRequest) EncodeBare(b *bin.Buffer) err // Decode implements bin.Decoder. func (g *MessagesGetSearchResultsPositionsRequest) Decode(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't decode messages.getSearchResultsPositions#6e9583a3 to nil") + return fmt.Errorf("can't decode messages.getSearchResultsPositions#9c7f2f10 to nil") } if err := b.ConsumeID(MessagesGetSearchResultsPositionsRequestTypeID); err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsPositions#6e9583a3: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: %w", err) } return g.DecodeBare(b) } @@ -201,33 +242,45 @@ func (g *MessagesGetSearchResultsPositionsRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (g *MessagesGetSearchResultsPositionsRequest) DecodeBare(b *bin.Buffer) error { if g == nil { - return fmt.Errorf("can't decode messages.getSearchResultsPositions#6e9583a3 to nil") + return fmt.Errorf("can't decode messages.getSearchResultsPositions#9c7f2f10 to nil") + } + { + if err := g.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: field flags: %w", err) + } } { value, err := DecodeInputPeer(b) if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsPositions#6e9583a3: field peer: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: field peer: %w", err) } g.Peer = value } + if g.Flags.Has(2) { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: field saved_peer_id: %w", err) + } + g.SavedPeerID = value + } { value, err := DecodeMessagesFilter(b) if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsPositions#6e9583a3: field filter: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: field filter: %w", err) } g.Filter = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsPositions#6e9583a3: field offset_id: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: field offset_id: %w", err) } g.OffsetID = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.getSearchResultsPositions#6e9583a3: field limit: %w", err) + return fmt.Errorf("unable to decode messages.getSearchResultsPositions#9c7f2f10: field limit: %w", err) } g.Limit = value } @@ -242,6 +295,24 @@ func (g *MessagesGetSearchResultsPositionsRequest) GetPeer() (value InputPeerCla return g.Peer } +// SetSavedPeerID sets value of SavedPeerID conditional field. +func (g *MessagesGetSearchResultsPositionsRequest) SetSavedPeerID(value InputPeerClass) { + g.Flags.Set(2) + g.SavedPeerID = value +} + +// GetSavedPeerID returns value of SavedPeerID conditional field and +// boolean which is true if field was set. +func (g *MessagesGetSearchResultsPositionsRequest) GetSavedPeerID() (value InputPeerClass, ok bool) { + if g == nil { + return + } + if !g.Flags.Has(2) { + return value, false + } + return g.SavedPeerID, true +} + // GetFilter returns value of Filter field. func (g *MessagesGetSearchResultsPositionsRequest) GetFilter() (value MessagesFilterClass) { if g == nil { @@ -266,7 +337,7 @@ func (g *MessagesGetSearchResultsPositionsRequest) GetLimit() (value int) { return g.Limit } -// MessagesGetSearchResultsPositions invokes method messages.getSearchResultsPositions#6e9583a3 returning error if any. +// MessagesGetSearchResultsPositions invokes method messages.getSearchResultsPositions#9c7f2f10 returning error if any. // Returns sparse positions of messages of the specified type in the chat to be used for // shared media scroll implementation. // Returns the results in reverse chronological order (i.e., in order of decreasing diff --git a/vendor/github.com/gotd/td/tg/tl_messages_reorder_pinned_saved_dialogs_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_reorder_pinned_saved_dialogs_gen.go new file mode 100644 index 00000000..1e6d8eb7 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_reorder_pinned_saved_dialogs_gen.go @@ -0,0 +1,250 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesReorderPinnedSavedDialogsRequest represents TL type `messages.reorderPinnedSavedDialogs#8b716587`. +// +// See https://core.telegram.org/method/messages.reorderPinnedSavedDialogs for reference. +type MessagesReorderPinnedSavedDialogsRequest struct { + // Flags field of MessagesReorderPinnedSavedDialogsRequest. + Flags bin.Fields + // Force field of MessagesReorderPinnedSavedDialogsRequest. + Force bool + // Order field of MessagesReorderPinnedSavedDialogsRequest. + Order []InputDialogPeerClass +} + +// MessagesReorderPinnedSavedDialogsRequestTypeID is TL type id of MessagesReorderPinnedSavedDialogsRequest. +const MessagesReorderPinnedSavedDialogsRequestTypeID = 0x8b716587 + +// Ensuring interfaces in compile-time for MessagesReorderPinnedSavedDialogsRequest. +var ( + _ bin.Encoder = &MessagesReorderPinnedSavedDialogsRequest{} + _ bin.Decoder = &MessagesReorderPinnedSavedDialogsRequest{} + _ bin.BareEncoder = &MessagesReorderPinnedSavedDialogsRequest{} + _ bin.BareDecoder = &MessagesReorderPinnedSavedDialogsRequest{} +) + +func (r *MessagesReorderPinnedSavedDialogsRequest) Zero() bool { + if r == nil { + return true + } + if !(r.Flags.Zero()) { + return false + } + if !(r.Force == false) { + return false + } + if !(r.Order == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (r *MessagesReorderPinnedSavedDialogsRequest) String() string { + if r == nil { + return "MessagesReorderPinnedSavedDialogsRequest(nil)" + } + type Alias MessagesReorderPinnedSavedDialogsRequest + return fmt.Sprintf("MessagesReorderPinnedSavedDialogsRequest%+v", Alias(*r)) +} + +// FillFrom fills MessagesReorderPinnedSavedDialogsRequest from given interface. +func (r *MessagesReorderPinnedSavedDialogsRequest) FillFrom(from interface { + GetForce() (value bool) + GetOrder() (value []InputDialogPeerClass) +}) { + r.Force = from.GetForce() + r.Order = from.GetOrder() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesReorderPinnedSavedDialogsRequest) TypeID() uint32 { + return MessagesReorderPinnedSavedDialogsRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesReorderPinnedSavedDialogsRequest) TypeName() string { + return "messages.reorderPinnedSavedDialogs" +} + +// TypeInfo returns info about TL type. +func (r *MessagesReorderPinnedSavedDialogsRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.reorderPinnedSavedDialogs", + ID: MessagesReorderPinnedSavedDialogsRequestTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Force", + SchemaName: "force", + Null: !r.Flags.Has(0), + }, + { + Name: "Order", + SchemaName: "order", + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (r *MessagesReorderPinnedSavedDialogsRequest) SetFlags() { + if !(r.Force == false) { + r.Flags.Set(0) + } +} + +// Encode implements bin.Encoder. +func (r *MessagesReorderPinnedSavedDialogsRequest) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode messages.reorderPinnedSavedDialogs#8b716587 as nil") + } + b.PutID(MessagesReorderPinnedSavedDialogsRequestTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *MessagesReorderPinnedSavedDialogsRequest) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode messages.reorderPinnedSavedDialogs#8b716587 as nil") + } + r.SetFlags() + if err := r.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.reorderPinnedSavedDialogs#8b716587: field flags: %w", err) + } + b.PutVectorHeader(len(r.Order)) + for idx, v := range r.Order { + if v == nil { + return fmt.Errorf("unable to encode messages.reorderPinnedSavedDialogs#8b716587: field order element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.reorderPinnedSavedDialogs#8b716587: field order element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (r *MessagesReorderPinnedSavedDialogsRequest) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode messages.reorderPinnedSavedDialogs#8b716587 to nil") + } + if err := b.ConsumeID(MessagesReorderPinnedSavedDialogsRequestTypeID); err != nil { + return fmt.Errorf("unable to decode messages.reorderPinnedSavedDialogs#8b716587: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *MessagesReorderPinnedSavedDialogsRequest) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode messages.reorderPinnedSavedDialogs#8b716587 to nil") + } + { + if err := r.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.reorderPinnedSavedDialogs#8b716587: field flags: %w", err) + } + } + r.Force = r.Flags.Has(0) + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.reorderPinnedSavedDialogs#8b716587: field order: %w", err) + } + + if headerLen > 0 { + r.Order = make([]InputDialogPeerClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeInputDialogPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.reorderPinnedSavedDialogs#8b716587: field order: %w", err) + } + r.Order = append(r.Order, value) + } + } + return nil +} + +// SetForce sets value of Force conditional field. +func (r *MessagesReorderPinnedSavedDialogsRequest) SetForce(value bool) { + if value { + r.Flags.Set(0) + r.Force = true + } else { + r.Flags.Unset(0) + r.Force = false + } +} + +// GetForce returns value of Force conditional field. +func (r *MessagesReorderPinnedSavedDialogsRequest) GetForce() (value bool) { + if r == nil { + return + } + return r.Flags.Has(0) +} + +// GetOrder returns value of Order field. +func (r *MessagesReorderPinnedSavedDialogsRequest) GetOrder() (value []InputDialogPeerClass) { + if r == nil { + return + } + return r.Order +} + +// MapOrder returns field Order wrapped in InputDialogPeerClassArray helper. +func (r *MessagesReorderPinnedSavedDialogsRequest) MapOrder() (value InputDialogPeerClassArray) { + return InputDialogPeerClassArray(r.Order) +} + +// MessagesReorderPinnedSavedDialogs invokes method messages.reorderPinnedSavedDialogs#8b716587 returning error if any. +// +// See https://core.telegram.org/method/messages.reorderPinnedSavedDialogs for reference. +func (c *Client) MessagesReorderPinnedSavedDialogs(ctx context.Context, request *MessagesReorderPinnedSavedDialogsRequest) (bool, error) { + var result BoolBox + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return false, err + } + _, ok := result.Bool.(*BoolTrue) + return ok, nil +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_reorder_pinned_saved_dialogs_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_reorder_pinned_saved_dialogs_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_reorder_pinned_saved_dialogs_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_messages_saved_dialogs_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_saved_dialogs_gen.go new file mode 100644 index 00000000..f1d43ba1 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_saved_dialogs_gen.go @@ -0,0 +1,941 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesSavedDialogs represents TL type `messages.savedDialogs#f83ae221`. +// +// See https://core.telegram.org/constructor/messages.savedDialogs for reference. +type MessagesSavedDialogs struct { + // Dialogs field of MessagesSavedDialogs. + Dialogs []SavedDialog + // Messages field of MessagesSavedDialogs. + Messages []MessageClass + // Chats field of MessagesSavedDialogs. + Chats []ChatClass + // Users field of MessagesSavedDialogs. + Users []UserClass +} + +// MessagesSavedDialogsTypeID is TL type id of MessagesSavedDialogs. +const MessagesSavedDialogsTypeID = 0xf83ae221 + +// construct implements constructor of MessagesSavedDialogsClass. +func (s MessagesSavedDialogs) construct() MessagesSavedDialogsClass { return &s } + +// Ensuring interfaces in compile-time for MessagesSavedDialogs. +var ( + _ bin.Encoder = &MessagesSavedDialogs{} + _ bin.Decoder = &MessagesSavedDialogs{} + _ bin.BareEncoder = &MessagesSavedDialogs{} + _ bin.BareDecoder = &MessagesSavedDialogs{} + + _ MessagesSavedDialogsClass = &MessagesSavedDialogs{} +) + +func (s *MessagesSavedDialogs) Zero() bool { + if s == nil { + return true + } + if !(s.Dialogs == nil) { + return false + } + if !(s.Messages == nil) { + return false + } + if !(s.Chats == nil) { + return false + } + if !(s.Users == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *MessagesSavedDialogs) String() string { + if s == nil { + return "MessagesSavedDialogs(nil)" + } + type Alias MessagesSavedDialogs + return fmt.Sprintf("MessagesSavedDialogs%+v", Alias(*s)) +} + +// FillFrom fills MessagesSavedDialogs from given interface. +func (s *MessagesSavedDialogs) FillFrom(from interface { + GetDialogs() (value []SavedDialog) + GetMessages() (value []MessageClass) + GetChats() (value []ChatClass) + GetUsers() (value []UserClass) +}) { + s.Dialogs = from.GetDialogs() + s.Messages = from.GetMessages() + s.Chats = from.GetChats() + s.Users = from.GetUsers() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesSavedDialogs) TypeID() uint32 { + return MessagesSavedDialogsTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesSavedDialogs) TypeName() string { + return "messages.savedDialogs" +} + +// TypeInfo returns info about TL type. +func (s *MessagesSavedDialogs) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.savedDialogs", + ID: MessagesSavedDialogsTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Dialogs", + SchemaName: "dialogs", + }, + { + Name: "Messages", + SchemaName: "messages", + }, + { + Name: "Chats", + SchemaName: "chats", + }, + { + Name: "Users", + SchemaName: "users", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *MessagesSavedDialogs) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode messages.savedDialogs#f83ae221 as nil") + } + b.PutID(MessagesSavedDialogsTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *MessagesSavedDialogs) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode messages.savedDialogs#f83ae221 as nil") + } + b.PutVectorHeader(len(s.Dialogs)) + for idx, v := range s.Dialogs { + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field dialogs element with index %d: %w", idx, err) + } + } + b.PutVectorHeader(len(s.Messages)) + for idx, v := range s.Messages { + if v == nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field messages element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field messages element with index %d: %w", idx, err) + } + } + b.PutVectorHeader(len(s.Chats)) + for idx, v := range s.Chats { + if v == nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field chats element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field chats element with index %d: %w", idx, err) + } + } + b.PutVectorHeader(len(s.Users)) + for idx, v := range s.Users { + if v == nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field users element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogs#f83ae221: field users element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (s *MessagesSavedDialogs) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode messages.savedDialogs#f83ae221 to nil") + } + if err := b.ConsumeID(MessagesSavedDialogsTypeID); err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *MessagesSavedDialogs) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode messages.savedDialogs#f83ae221 to nil") + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field dialogs: %w", err) + } + + if headerLen > 0 { + s.Dialogs = make([]SavedDialog, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + var value SavedDialog + if err := value.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field dialogs: %w", err) + } + s.Dialogs = append(s.Dialogs, value) + } + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field messages: %w", err) + } + + if headerLen > 0 { + s.Messages = make([]MessageClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeMessage(b) + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field messages: %w", err) + } + s.Messages = append(s.Messages, value) + } + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field chats: %w", err) + } + + if headerLen > 0 { + s.Chats = make([]ChatClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeChat(b) + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field chats: %w", err) + } + s.Chats = append(s.Chats, value) + } + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field users: %w", err) + } + + if headerLen > 0 { + s.Users = make([]UserClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeUser(b) + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogs#f83ae221: field users: %w", err) + } + s.Users = append(s.Users, value) + } + } + return nil +} + +// GetDialogs returns value of Dialogs field. +func (s *MessagesSavedDialogs) GetDialogs() (value []SavedDialog) { + if s == nil { + return + } + return s.Dialogs +} + +// GetMessages returns value of Messages field. +func (s *MessagesSavedDialogs) GetMessages() (value []MessageClass) { + if s == nil { + return + } + return s.Messages +} + +// GetChats returns value of Chats field. +func (s *MessagesSavedDialogs) GetChats() (value []ChatClass) { + if s == nil { + return + } + return s.Chats +} + +// GetUsers returns value of Users field. +func (s *MessagesSavedDialogs) GetUsers() (value []UserClass) { + if s == nil { + return + } + return s.Users +} + +// MapMessages returns field Messages wrapped in MessageClassArray helper. +func (s *MessagesSavedDialogs) MapMessages() (value MessageClassArray) { + return MessageClassArray(s.Messages) +} + +// MapChats returns field Chats wrapped in ChatClassArray helper. +func (s *MessagesSavedDialogs) MapChats() (value ChatClassArray) { + return ChatClassArray(s.Chats) +} + +// MapUsers returns field Users wrapped in UserClassArray helper. +func (s *MessagesSavedDialogs) MapUsers() (value UserClassArray) { + return UserClassArray(s.Users) +} + +// MessagesSavedDialogsSlice represents TL type `messages.savedDialogsSlice#44ba9dd9`. +// +// See https://core.telegram.org/constructor/messages.savedDialogsSlice for reference. +type MessagesSavedDialogsSlice struct { + // Count field of MessagesSavedDialogsSlice. + Count int + // Dialogs field of MessagesSavedDialogsSlice. + Dialogs []SavedDialog + // Messages field of MessagesSavedDialogsSlice. + Messages []MessageClass + // Chats field of MessagesSavedDialogsSlice. + Chats []ChatClass + // Users field of MessagesSavedDialogsSlice. + Users []UserClass +} + +// MessagesSavedDialogsSliceTypeID is TL type id of MessagesSavedDialogsSlice. +const MessagesSavedDialogsSliceTypeID = 0x44ba9dd9 + +// construct implements constructor of MessagesSavedDialogsClass. +func (s MessagesSavedDialogsSlice) construct() MessagesSavedDialogsClass { return &s } + +// Ensuring interfaces in compile-time for MessagesSavedDialogsSlice. +var ( + _ bin.Encoder = &MessagesSavedDialogsSlice{} + _ bin.Decoder = &MessagesSavedDialogsSlice{} + _ bin.BareEncoder = &MessagesSavedDialogsSlice{} + _ bin.BareDecoder = &MessagesSavedDialogsSlice{} + + _ MessagesSavedDialogsClass = &MessagesSavedDialogsSlice{} +) + +func (s *MessagesSavedDialogsSlice) Zero() bool { + if s == nil { + return true + } + if !(s.Count == 0) { + return false + } + if !(s.Dialogs == nil) { + return false + } + if !(s.Messages == nil) { + return false + } + if !(s.Chats == nil) { + return false + } + if !(s.Users == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *MessagesSavedDialogsSlice) String() string { + if s == nil { + return "MessagesSavedDialogsSlice(nil)" + } + type Alias MessagesSavedDialogsSlice + return fmt.Sprintf("MessagesSavedDialogsSlice%+v", Alias(*s)) +} + +// FillFrom fills MessagesSavedDialogsSlice from given interface. +func (s *MessagesSavedDialogsSlice) FillFrom(from interface { + GetCount() (value int) + GetDialogs() (value []SavedDialog) + GetMessages() (value []MessageClass) + GetChats() (value []ChatClass) + GetUsers() (value []UserClass) +}) { + s.Count = from.GetCount() + s.Dialogs = from.GetDialogs() + s.Messages = from.GetMessages() + s.Chats = from.GetChats() + s.Users = from.GetUsers() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesSavedDialogsSlice) TypeID() uint32 { + return MessagesSavedDialogsSliceTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesSavedDialogsSlice) TypeName() string { + return "messages.savedDialogsSlice" +} + +// TypeInfo returns info about TL type. +func (s *MessagesSavedDialogsSlice) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.savedDialogsSlice", + ID: MessagesSavedDialogsSliceTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Count", + SchemaName: "count", + }, + { + Name: "Dialogs", + SchemaName: "dialogs", + }, + { + Name: "Messages", + SchemaName: "messages", + }, + { + Name: "Chats", + SchemaName: "chats", + }, + { + Name: "Users", + SchemaName: "users", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *MessagesSavedDialogsSlice) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode messages.savedDialogsSlice#44ba9dd9 as nil") + } + b.PutID(MessagesSavedDialogsSliceTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *MessagesSavedDialogsSlice) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode messages.savedDialogsSlice#44ba9dd9 as nil") + } + b.PutInt(s.Count) + b.PutVectorHeader(len(s.Dialogs)) + for idx, v := range s.Dialogs { + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field dialogs element with index %d: %w", idx, err) + } + } + b.PutVectorHeader(len(s.Messages)) + for idx, v := range s.Messages { + if v == nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field messages element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field messages element with index %d: %w", idx, err) + } + } + b.PutVectorHeader(len(s.Chats)) + for idx, v := range s.Chats { + if v == nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field chats element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field chats element with index %d: %w", idx, err) + } + } + b.PutVectorHeader(len(s.Users)) + for idx, v := range s.Users { + if v == nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field users element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.savedDialogsSlice#44ba9dd9: field users element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (s *MessagesSavedDialogsSlice) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode messages.savedDialogsSlice#44ba9dd9 to nil") + } + if err := b.ConsumeID(MessagesSavedDialogsSliceTypeID); err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *MessagesSavedDialogsSlice) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode messages.savedDialogsSlice#44ba9dd9 to nil") + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field count: %w", err) + } + s.Count = value + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field dialogs: %w", err) + } + + if headerLen > 0 { + s.Dialogs = make([]SavedDialog, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + var value SavedDialog + if err := value.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field dialogs: %w", err) + } + s.Dialogs = append(s.Dialogs, value) + } + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field messages: %w", err) + } + + if headerLen > 0 { + s.Messages = make([]MessageClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeMessage(b) + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field messages: %w", err) + } + s.Messages = append(s.Messages, value) + } + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field chats: %w", err) + } + + if headerLen > 0 { + s.Chats = make([]ChatClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeChat(b) + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field chats: %w", err) + } + s.Chats = append(s.Chats, value) + } + } + { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field users: %w", err) + } + + if headerLen > 0 { + s.Users = make([]UserClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeUser(b) + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsSlice#44ba9dd9: field users: %w", err) + } + s.Users = append(s.Users, value) + } + } + return nil +} + +// GetCount returns value of Count field. +func (s *MessagesSavedDialogsSlice) GetCount() (value int) { + if s == nil { + return + } + return s.Count +} + +// GetDialogs returns value of Dialogs field. +func (s *MessagesSavedDialogsSlice) GetDialogs() (value []SavedDialog) { + if s == nil { + return + } + return s.Dialogs +} + +// GetMessages returns value of Messages field. +func (s *MessagesSavedDialogsSlice) GetMessages() (value []MessageClass) { + if s == nil { + return + } + return s.Messages +} + +// GetChats returns value of Chats field. +func (s *MessagesSavedDialogsSlice) GetChats() (value []ChatClass) { + if s == nil { + return + } + return s.Chats +} + +// GetUsers returns value of Users field. +func (s *MessagesSavedDialogsSlice) GetUsers() (value []UserClass) { + if s == nil { + return + } + return s.Users +} + +// MapMessages returns field Messages wrapped in MessageClassArray helper. +func (s *MessagesSavedDialogsSlice) MapMessages() (value MessageClassArray) { + return MessageClassArray(s.Messages) +} + +// MapChats returns field Chats wrapped in ChatClassArray helper. +func (s *MessagesSavedDialogsSlice) MapChats() (value ChatClassArray) { + return ChatClassArray(s.Chats) +} + +// MapUsers returns field Users wrapped in UserClassArray helper. +func (s *MessagesSavedDialogsSlice) MapUsers() (value UserClassArray) { + return UserClassArray(s.Users) +} + +// MessagesSavedDialogsNotModified represents TL type `messages.savedDialogsNotModified#c01f6fe8`. +// +// See https://core.telegram.org/constructor/messages.savedDialogsNotModified for reference. +type MessagesSavedDialogsNotModified struct { + // Count field of MessagesSavedDialogsNotModified. + Count int +} + +// MessagesSavedDialogsNotModifiedTypeID is TL type id of MessagesSavedDialogsNotModified. +const MessagesSavedDialogsNotModifiedTypeID = 0xc01f6fe8 + +// construct implements constructor of MessagesSavedDialogsClass. +func (s MessagesSavedDialogsNotModified) construct() MessagesSavedDialogsClass { return &s } + +// Ensuring interfaces in compile-time for MessagesSavedDialogsNotModified. +var ( + _ bin.Encoder = &MessagesSavedDialogsNotModified{} + _ bin.Decoder = &MessagesSavedDialogsNotModified{} + _ bin.BareEncoder = &MessagesSavedDialogsNotModified{} + _ bin.BareDecoder = &MessagesSavedDialogsNotModified{} + + _ MessagesSavedDialogsClass = &MessagesSavedDialogsNotModified{} +) + +func (s *MessagesSavedDialogsNotModified) Zero() bool { + if s == nil { + return true + } + if !(s.Count == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *MessagesSavedDialogsNotModified) String() string { + if s == nil { + return "MessagesSavedDialogsNotModified(nil)" + } + type Alias MessagesSavedDialogsNotModified + return fmt.Sprintf("MessagesSavedDialogsNotModified%+v", Alias(*s)) +} + +// FillFrom fills MessagesSavedDialogsNotModified from given interface. +func (s *MessagesSavedDialogsNotModified) FillFrom(from interface { + GetCount() (value int) +}) { + s.Count = from.GetCount() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesSavedDialogsNotModified) TypeID() uint32 { + return MessagesSavedDialogsNotModifiedTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesSavedDialogsNotModified) TypeName() string { + return "messages.savedDialogsNotModified" +} + +// TypeInfo returns info about TL type. +func (s *MessagesSavedDialogsNotModified) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.savedDialogsNotModified", + ID: MessagesSavedDialogsNotModifiedTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Count", + SchemaName: "count", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *MessagesSavedDialogsNotModified) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode messages.savedDialogsNotModified#c01f6fe8 as nil") + } + b.PutID(MessagesSavedDialogsNotModifiedTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *MessagesSavedDialogsNotModified) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode messages.savedDialogsNotModified#c01f6fe8 as nil") + } + b.PutInt(s.Count) + return nil +} + +// Decode implements bin.Decoder. +func (s *MessagesSavedDialogsNotModified) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode messages.savedDialogsNotModified#c01f6fe8 to nil") + } + if err := b.ConsumeID(MessagesSavedDialogsNotModifiedTypeID); err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsNotModified#c01f6fe8: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *MessagesSavedDialogsNotModified) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode messages.savedDialogsNotModified#c01f6fe8 to nil") + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode messages.savedDialogsNotModified#c01f6fe8: field count: %w", err) + } + s.Count = value + } + return nil +} + +// GetCount returns value of Count field. +func (s *MessagesSavedDialogsNotModified) GetCount() (value int) { + if s == nil { + return + } + return s.Count +} + +// MessagesSavedDialogsClassName is schema name of MessagesSavedDialogsClass. +const MessagesSavedDialogsClassName = "messages.SavedDialogs" + +// MessagesSavedDialogsClass represents messages.SavedDialogs generic type. +// +// See https://core.telegram.org/type/messages.SavedDialogs for reference. +// +// Example: +// +// g, err := tg.DecodeMessagesSavedDialogs(buf) +// if err != nil { +// panic(err) +// } +// switch v := g.(type) { +// case *tg.MessagesSavedDialogs: // messages.savedDialogs#f83ae221 +// case *tg.MessagesSavedDialogsSlice: // messages.savedDialogsSlice#44ba9dd9 +// case *tg.MessagesSavedDialogsNotModified: // messages.savedDialogsNotModified#c01f6fe8 +// default: panic(v) +// } +type MessagesSavedDialogsClass interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() MessagesSavedDialogsClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + // AsModified tries to map MessagesSavedDialogsClass to ModifiedMessagesSavedDialogs. + AsModified() (ModifiedMessagesSavedDialogs, bool) +} + +// ModifiedMessagesSavedDialogs represents Modified subset of MessagesSavedDialogsClass. +type ModifiedMessagesSavedDialogs interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() MessagesSavedDialogsClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + // Dialogs field of MessagesSavedDialogs. + GetDialogs() (value []SavedDialog) + + // Messages field of MessagesSavedDialogs. + GetMessages() (value []MessageClass) + + // Chats field of MessagesSavedDialogs. + GetChats() (value []ChatClass) + + // Users field of MessagesSavedDialogs. + GetUsers() (value []UserClass) +} + +// AsModified tries to map MessagesSavedDialogs to ModifiedMessagesSavedDialogs. +func (s *MessagesSavedDialogs) AsModified() (ModifiedMessagesSavedDialogs, bool) { + value, ok := (MessagesSavedDialogsClass(s)).(ModifiedMessagesSavedDialogs) + return value, ok +} + +// AsModified tries to map MessagesSavedDialogsSlice to ModifiedMessagesSavedDialogs. +func (s *MessagesSavedDialogsSlice) AsModified() (ModifiedMessagesSavedDialogs, bool) { + value, ok := (MessagesSavedDialogsClass(s)).(ModifiedMessagesSavedDialogs) + return value, ok +} + +// AsModified tries to map MessagesSavedDialogsNotModified to ModifiedMessagesSavedDialogs. +func (s *MessagesSavedDialogsNotModified) AsModified() (ModifiedMessagesSavedDialogs, bool) { + value, ok := (MessagesSavedDialogsClass(s)).(ModifiedMessagesSavedDialogs) + return value, ok +} + +// DecodeMessagesSavedDialogs implements binary de-serialization for MessagesSavedDialogsClass. +func DecodeMessagesSavedDialogs(buf *bin.Buffer) (MessagesSavedDialogsClass, error) { + id, err := buf.PeekID() + if err != nil { + return nil, err + } + switch id { + case MessagesSavedDialogsTypeID: + // Decoding messages.savedDialogs#f83ae221. + v := MessagesSavedDialogs{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessagesSavedDialogsClass: %w", err) + } + return &v, nil + case MessagesSavedDialogsSliceTypeID: + // Decoding messages.savedDialogsSlice#44ba9dd9. + v := MessagesSavedDialogsSlice{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessagesSavedDialogsClass: %w", err) + } + return &v, nil + case MessagesSavedDialogsNotModifiedTypeID: + // Decoding messages.savedDialogsNotModified#c01f6fe8. + v := MessagesSavedDialogsNotModified{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessagesSavedDialogsClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode MessagesSavedDialogsClass: %w", bin.NewUnexpectedID(id)) + } +} + +// MessagesSavedDialogs boxes the MessagesSavedDialogsClass providing a helper. +type MessagesSavedDialogsBox struct { + SavedDialogs MessagesSavedDialogsClass +} + +// Decode implements bin.Decoder for MessagesSavedDialogsBox. +func (b *MessagesSavedDialogsBox) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("unable to decode MessagesSavedDialogsBox to nil") + } + v, err := DecodeMessagesSavedDialogs(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.SavedDialogs = v + return nil +} + +// Encode implements bin.Encode for MessagesSavedDialogsBox. +func (b *MessagesSavedDialogsBox) Encode(buf *bin.Buffer) error { + if b == nil || b.SavedDialogs == nil { + return fmt.Errorf("unable to encode MessagesSavedDialogsClass as nil") + } + return b.SavedDialogs.Encode(buf) +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_saved_dialogs_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_saved_dialogs_slices_gen.go new file mode 100644 index 00000000..df2b72e7 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_saved_dialogs_slices_gen.go @@ -0,0 +1,457 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesSavedDialogsClassArray is adapter for slice of MessagesSavedDialogsClass. +type MessagesSavedDialogsClassArray []MessagesSavedDialogsClass + +// Sort sorts slice of MessagesSavedDialogsClass. +func (s MessagesSavedDialogsClassArray) Sort(less func(a, b MessagesSavedDialogsClass) bool) MessagesSavedDialogsClassArray { + sort.Slice(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// SortStable sorts slice of MessagesSavedDialogsClass. +func (s MessagesSavedDialogsClassArray) SortStable(less func(a, b MessagesSavedDialogsClass) bool) MessagesSavedDialogsClassArray { + sort.SliceStable(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// Retain filters in-place slice of MessagesSavedDialogsClass. +func (s MessagesSavedDialogsClassArray) Retain(keep func(x MessagesSavedDialogsClass) bool) MessagesSavedDialogsClassArray { + n := 0 + for _, x := range s { + if keep(x) { + s[n] = x + n++ + } + } + s = s[:n] + + return s +} + +// First returns first element of slice (if exists). +func (s MessagesSavedDialogsClassArray) First() (v MessagesSavedDialogsClass, ok bool) { + if len(s) < 1 { + return + } + return s[0], true +} + +// Last returns last element of slice (if exists). +func (s MessagesSavedDialogsClassArray) Last() (v MessagesSavedDialogsClass, ok bool) { + if len(s) < 1 { + return + } + return s[len(s)-1], true +} + +// PopFirst returns first element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsClassArray) PopFirst() (v MessagesSavedDialogsClass, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[0] + + // Delete by index from SliceTricks. + copy(a[0:], a[1:]) + var zero MessagesSavedDialogsClass + a[len(a)-1] = zero + a = a[:len(a)-1] + *s = a + + return v, true +} + +// Pop returns last element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsClassArray) Pop() (v MessagesSavedDialogsClass, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[len(a)-1] + a = a[:len(a)-1] + *s = a + + return v, true +} + +// AsMessagesSavedDialogs returns copy with only MessagesSavedDialogs constructors. +func (s MessagesSavedDialogsClassArray) AsMessagesSavedDialogs() (to MessagesSavedDialogsArray) { + for _, elem := range s { + value, ok := elem.(*MessagesSavedDialogs) + if !ok { + continue + } + to = append(to, *value) + } + + return to +} + +// AsMessagesSavedDialogsSlice returns copy with only MessagesSavedDialogsSlice constructors. +func (s MessagesSavedDialogsClassArray) AsMessagesSavedDialogsSlice() (to MessagesSavedDialogsSliceArray) { + for _, elem := range s { + value, ok := elem.(*MessagesSavedDialogsSlice) + if !ok { + continue + } + to = append(to, *value) + } + + return to +} + +// AsMessagesSavedDialogsNotModified returns copy with only MessagesSavedDialogsNotModified constructors. +func (s MessagesSavedDialogsClassArray) AsMessagesSavedDialogsNotModified() (to MessagesSavedDialogsNotModifiedArray) { + for _, elem := range s { + value, ok := elem.(*MessagesSavedDialogsNotModified) + if !ok { + continue + } + to = append(to, *value) + } + + return to +} + +// AppendOnlyModified appends only Modified constructors to +// given slice. +func (s MessagesSavedDialogsClassArray) AppendOnlyModified(to []ModifiedMessagesSavedDialogs) []ModifiedMessagesSavedDialogs { + for _, elem := range s { + value, ok := elem.AsModified() + if !ok { + continue + } + to = append(to, value) + } + + return to +} + +// AsModified returns copy with only Modified constructors. +func (s MessagesSavedDialogsClassArray) AsModified() (to []ModifiedMessagesSavedDialogs) { + return s.AppendOnlyModified(to) +} + +// FirstAsModified returns first element of slice (if exists). +func (s MessagesSavedDialogsClassArray) FirstAsModified() (v ModifiedMessagesSavedDialogs, ok bool) { + value, ok := s.First() + if !ok { + return + } + return value.AsModified() +} + +// LastAsModified returns last element of slice (if exists). +func (s MessagesSavedDialogsClassArray) LastAsModified() (v ModifiedMessagesSavedDialogs, ok bool) { + value, ok := s.Last() + if !ok { + return + } + return value.AsModified() +} + +// PopFirstAsModified returns element of slice (if exists). +func (s *MessagesSavedDialogsClassArray) PopFirstAsModified() (v ModifiedMessagesSavedDialogs, ok bool) { + value, ok := s.PopFirst() + if !ok { + return + } + return value.AsModified() +} + +// PopAsModified returns element of slice (if exists). +func (s *MessagesSavedDialogsClassArray) PopAsModified() (v ModifiedMessagesSavedDialogs, ok bool) { + value, ok := s.Pop() + if !ok { + return + } + return value.AsModified() +} + +// MessagesSavedDialogsArray is adapter for slice of MessagesSavedDialogs. +type MessagesSavedDialogsArray []MessagesSavedDialogs + +// Sort sorts slice of MessagesSavedDialogs. +func (s MessagesSavedDialogsArray) Sort(less func(a, b MessagesSavedDialogs) bool) MessagesSavedDialogsArray { + sort.Slice(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// SortStable sorts slice of MessagesSavedDialogs. +func (s MessagesSavedDialogsArray) SortStable(less func(a, b MessagesSavedDialogs) bool) MessagesSavedDialogsArray { + sort.SliceStable(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// Retain filters in-place slice of MessagesSavedDialogs. +func (s MessagesSavedDialogsArray) Retain(keep func(x MessagesSavedDialogs) bool) MessagesSavedDialogsArray { + n := 0 + for _, x := range s { + if keep(x) { + s[n] = x + n++ + } + } + s = s[:n] + + return s +} + +// First returns first element of slice (if exists). +func (s MessagesSavedDialogsArray) First() (v MessagesSavedDialogs, ok bool) { + if len(s) < 1 { + return + } + return s[0], true +} + +// Last returns last element of slice (if exists). +func (s MessagesSavedDialogsArray) Last() (v MessagesSavedDialogs, ok bool) { + if len(s) < 1 { + return + } + return s[len(s)-1], true +} + +// PopFirst returns first element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsArray) PopFirst() (v MessagesSavedDialogs, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[0] + + // Delete by index from SliceTricks. + copy(a[0:], a[1:]) + var zero MessagesSavedDialogs + a[len(a)-1] = zero + a = a[:len(a)-1] + *s = a + + return v, true +} + +// Pop returns last element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsArray) Pop() (v MessagesSavedDialogs, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[len(a)-1] + a = a[:len(a)-1] + *s = a + + return v, true +} + +// MessagesSavedDialogsSliceArray is adapter for slice of MessagesSavedDialogsSlice. +type MessagesSavedDialogsSliceArray []MessagesSavedDialogsSlice + +// Sort sorts slice of MessagesSavedDialogsSlice. +func (s MessagesSavedDialogsSliceArray) Sort(less func(a, b MessagesSavedDialogsSlice) bool) MessagesSavedDialogsSliceArray { + sort.Slice(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// SortStable sorts slice of MessagesSavedDialogsSlice. +func (s MessagesSavedDialogsSliceArray) SortStable(less func(a, b MessagesSavedDialogsSlice) bool) MessagesSavedDialogsSliceArray { + sort.SliceStable(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// Retain filters in-place slice of MessagesSavedDialogsSlice. +func (s MessagesSavedDialogsSliceArray) Retain(keep func(x MessagesSavedDialogsSlice) bool) MessagesSavedDialogsSliceArray { + n := 0 + for _, x := range s { + if keep(x) { + s[n] = x + n++ + } + } + s = s[:n] + + return s +} + +// First returns first element of slice (if exists). +func (s MessagesSavedDialogsSliceArray) First() (v MessagesSavedDialogsSlice, ok bool) { + if len(s) < 1 { + return + } + return s[0], true +} + +// Last returns last element of slice (if exists). +func (s MessagesSavedDialogsSliceArray) Last() (v MessagesSavedDialogsSlice, ok bool) { + if len(s) < 1 { + return + } + return s[len(s)-1], true +} + +// PopFirst returns first element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsSliceArray) PopFirst() (v MessagesSavedDialogsSlice, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[0] + + // Delete by index from SliceTricks. + copy(a[0:], a[1:]) + var zero MessagesSavedDialogsSlice + a[len(a)-1] = zero + a = a[:len(a)-1] + *s = a + + return v, true +} + +// Pop returns last element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsSliceArray) Pop() (v MessagesSavedDialogsSlice, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[len(a)-1] + a = a[:len(a)-1] + *s = a + + return v, true +} + +// MessagesSavedDialogsNotModifiedArray is adapter for slice of MessagesSavedDialogsNotModified. +type MessagesSavedDialogsNotModifiedArray []MessagesSavedDialogsNotModified + +// Sort sorts slice of MessagesSavedDialogsNotModified. +func (s MessagesSavedDialogsNotModifiedArray) Sort(less func(a, b MessagesSavedDialogsNotModified) bool) MessagesSavedDialogsNotModifiedArray { + sort.Slice(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// SortStable sorts slice of MessagesSavedDialogsNotModified. +func (s MessagesSavedDialogsNotModifiedArray) SortStable(less func(a, b MessagesSavedDialogsNotModified) bool) MessagesSavedDialogsNotModifiedArray { + sort.SliceStable(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// Retain filters in-place slice of MessagesSavedDialogsNotModified. +func (s MessagesSavedDialogsNotModifiedArray) Retain(keep func(x MessagesSavedDialogsNotModified) bool) MessagesSavedDialogsNotModifiedArray { + n := 0 + for _, x := range s { + if keep(x) { + s[n] = x + n++ + } + } + s = s[:n] + + return s +} + +// First returns first element of slice (if exists). +func (s MessagesSavedDialogsNotModifiedArray) First() (v MessagesSavedDialogsNotModified, ok bool) { + if len(s) < 1 { + return + } + return s[0], true +} + +// Last returns last element of slice (if exists). +func (s MessagesSavedDialogsNotModifiedArray) Last() (v MessagesSavedDialogsNotModified, ok bool) { + if len(s) < 1 { + return + } + return s[len(s)-1], true +} + +// PopFirst returns first element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsNotModifiedArray) PopFirst() (v MessagesSavedDialogsNotModified, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[0] + + // Delete by index from SliceTricks. + copy(a[0:], a[1:]) + var zero MessagesSavedDialogsNotModified + a[len(a)-1] = zero + a = a[:len(a)-1] + *s = a + + return v, true +} + +// Pop returns last element of slice (if exists) and deletes it. +func (s *MessagesSavedDialogsNotModifiedArray) Pop() (v MessagesSavedDialogsNotModified, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[len(a)-1] + a = a[:len(a)-1] + *s = a + + return v, true +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_search_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_search_gen.go index d8fb9b0c..eeb4abca 100644 --- a/vendor/github.com/gotd/td/tg/tl_messages_search_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_messages_search_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// MessagesSearchRequest represents TL type `messages.search#a0fda762`. +// MessagesSearchRequest represents TL type `messages.search#a7b4e929`. // Search for messages. // // See https://core.telegram.org/method/messages.search for reference. @@ -56,6 +56,10 @@ type MessagesSearchRequest struct { // // Use SetFromID and GetFromID helpers. FromID InputPeerClass + // SavedPeerID field of MessagesSearchRequest. + // + // Use SetSavedPeerID and GetSavedPeerID helpers. + SavedPeerID InputPeerClass // Thread ID¹ // // Links: @@ -101,7 +105,7 @@ type MessagesSearchRequest struct { } // MessagesSearchRequestTypeID is TL type id of MessagesSearchRequest. -const MessagesSearchRequestTypeID = 0xa0fda762 +const MessagesSearchRequestTypeID = 0xa7b4e929 // Ensuring interfaces in compile-time for MessagesSearchRequest. var ( @@ -127,6 +131,9 @@ func (s *MessagesSearchRequest) Zero() bool { if !(s.FromID == nil) { return false } + if !(s.SavedPeerID == nil) { + return false + } if !(s.TopMsgID == 0) { return false } @@ -175,6 +182,7 @@ func (s *MessagesSearchRequest) FillFrom(from interface { GetPeer() (value InputPeerClass) GetQ() (value string) GetFromID() (value InputPeerClass, ok bool) + GetSavedPeerID() (value InputPeerClass, ok bool) GetTopMsgID() (value int, ok bool) GetFilter() (value MessagesFilterClass) GetMinDate() (value int) @@ -192,6 +200,10 @@ func (s *MessagesSearchRequest) FillFrom(from interface { s.FromID = val } + if val, ok := from.GetSavedPeerID(); ok { + s.SavedPeerID = val + } + if val, ok := from.GetTopMsgID(); ok { s.TopMsgID = val } @@ -243,6 +255,11 @@ func (s *MessagesSearchRequest) TypeInfo() tdp.Type { SchemaName: "from_id", Null: !s.Flags.Has(0), }, + { + Name: "SavedPeerID", + SchemaName: "saved_peer_id", + Null: !s.Flags.Has(2), + }, { Name: "TopMsgID", SchemaName: "top_msg_id", @@ -293,6 +310,9 @@ func (s *MessagesSearchRequest) SetFlags() { if !(s.FromID == nil) { s.Flags.Set(0) } + if !(s.SavedPeerID == nil) { + s.Flags.Set(2) + } if !(s.TopMsgID == 0) { s.Flags.Set(1) } @@ -301,7 +321,7 @@ func (s *MessagesSearchRequest) SetFlags() { // Encode implements bin.Encoder. func (s *MessagesSearchRequest) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode messages.search#a0fda762 as nil") + return fmt.Errorf("can't encode messages.search#a7b4e929 as nil") } b.PutID(MessagesSearchRequestTypeID) return s.EncodeBare(b) @@ -310,35 +330,43 @@ func (s *MessagesSearchRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *MessagesSearchRequest) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode messages.search#a0fda762 as nil") + return fmt.Errorf("can't encode messages.search#a7b4e929 as nil") } s.SetFlags() if err := s.Flags.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field flags: %w", err) + return fmt.Errorf("unable to encode messages.search#a7b4e929: field flags: %w", err) } if s.Peer == nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field peer is nil") + return fmt.Errorf("unable to encode messages.search#a7b4e929: field peer is nil") } if err := s.Peer.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field peer: %w", err) + return fmt.Errorf("unable to encode messages.search#a7b4e929: field peer: %w", err) } b.PutString(s.Q) if s.Flags.Has(0) { if s.FromID == nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field from_id is nil") + return fmt.Errorf("unable to encode messages.search#a7b4e929: field from_id is nil") } if err := s.FromID.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field from_id: %w", err) + return fmt.Errorf("unable to encode messages.search#a7b4e929: field from_id: %w", err) + } + } + if s.Flags.Has(2) { + if s.SavedPeerID == nil { + return fmt.Errorf("unable to encode messages.search#a7b4e929: field saved_peer_id is nil") + } + if err := s.SavedPeerID.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.search#a7b4e929: field saved_peer_id: %w", err) } } if s.Flags.Has(1) { b.PutInt(s.TopMsgID) } if s.Filter == nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field filter is nil") + return fmt.Errorf("unable to encode messages.search#a7b4e929: field filter is nil") } if err := s.Filter.Encode(b); err != nil { - return fmt.Errorf("unable to encode messages.search#a0fda762: field filter: %w", err) + return fmt.Errorf("unable to encode messages.search#a7b4e929: field filter: %w", err) } b.PutInt(s.MinDate) b.PutInt(s.MaxDate) @@ -354,10 +382,10 @@ func (s *MessagesSearchRequest) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (s *MessagesSearchRequest) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode messages.search#a0fda762 to nil") + return fmt.Errorf("can't decode messages.search#a7b4e929 to nil") } if err := b.ConsumeID(MessagesSearchRequestTypeID); err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: %w", err) } return s.DecodeBare(b) } @@ -365,101 +393,108 @@ func (s *MessagesSearchRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *MessagesSearchRequest) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode messages.search#a0fda762 to nil") + return fmt.Errorf("can't decode messages.search#a7b4e929 to nil") } { if err := s.Flags.Decode(b); err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field flags: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field flags: %w", err) } } { value, err := DecodeInputPeer(b) if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field peer: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field peer: %w", err) } s.Peer = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field q: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field q: %w", err) } s.Q = value } if s.Flags.Has(0) { value, err := DecodeInputPeer(b) if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field from_id: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field from_id: %w", err) } s.FromID = value } + if s.Flags.Has(2) { + value, err := DecodeInputPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.search#a7b4e929: field saved_peer_id: %w", err) + } + s.SavedPeerID = value + } if s.Flags.Has(1) { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field top_msg_id: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field top_msg_id: %w", err) } s.TopMsgID = value } { value, err := DecodeMessagesFilter(b) if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field filter: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field filter: %w", err) } s.Filter = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field min_date: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field min_date: %w", err) } s.MinDate = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field max_date: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field max_date: %w", err) } s.MaxDate = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field offset_id: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field offset_id: %w", err) } s.OffsetID = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field add_offset: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field add_offset: %w", err) } s.AddOffset = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field limit: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field limit: %w", err) } s.Limit = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field max_id: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field max_id: %w", err) } s.MaxID = value } { value, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field min_id: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field min_id: %w", err) } s.MinID = value } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode messages.search#a0fda762: field hash: %w", err) + return fmt.Errorf("unable to decode messages.search#a7b4e929: field hash: %w", err) } s.Hash = value } @@ -500,6 +535,24 @@ func (s *MessagesSearchRequest) GetFromID() (value InputPeerClass, ok bool) { return s.FromID, true } +// SetSavedPeerID sets value of SavedPeerID conditional field. +func (s *MessagesSearchRequest) SetSavedPeerID(value InputPeerClass) { + s.Flags.Set(2) + s.SavedPeerID = value +} + +// GetSavedPeerID returns value of SavedPeerID conditional field and +// boolean which is true if field was set. +func (s *MessagesSearchRequest) GetSavedPeerID() (value InputPeerClass, ok bool) { + if s == nil { + return + } + if !s.Flags.Has(2) { + return value, false + } + return s.SavedPeerID, true +} + // SetTopMsgID sets value of TopMsgID conditional field. func (s *MessagesSearchRequest) SetTopMsgID(value int) { s.Flags.Set(1) @@ -590,7 +643,7 @@ func (s *MessagesSearchRequest) GetHash() (value int64) { return s.Hash } -// MessagesSearch invokes method messages.search#a0fda762 returning error if any. +// MessagesSearch invokes method messages.search#a7b4e929 returning error if any. // Search for messages. // // Possible errors: diff --git a/vendor/github.com/gotd/td/tg/tl_messages_toggle_saved_dialog_pin_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_toggle_saved_dialog_pin_gen.go new file mode 100644 index 00000000..4cb9fcc8 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_toggle_saved_dialog_pin_gen.go @@ -0,0 +1,232 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessagesToggleSavedDialogPinRequest represents TL type `messages.toggleSavedDialogPin#ac81bbde`. +// +// See https://core.telegram.org/method/messages.toggleSavedDialogPin for reference. +type MessagesToggleSavedDialogPinRequest struct { + // Flags field of MessagesToggleSavedDialogPinRequest. + Flags bin.Fields + // Pinned field of MessagesToggleSavedDialogPinRequest. + Pinned bool + // Peer field of MessagesToggleSavedDialogPinRequest. + Peer InputDialogPeerClass +} + +// MessagesToggleSavedDialogPinRequestTypeID is TL type id of MessagesToggleSavedDialogPinRequest. +const MessagesToggleSavedDialogPinRequestTypeID = 0xac81bbde + +// Ensuring interfaces in compile-time for MessagesToggleSavedDialogPinRequest. +var ( + _ bin.Encoder = &MessagesToggleSavedDialogPinRequest{} + _ bin.Decoder = &MessagesToggleSavedDialogPinRequest{} + _ bin.BareEncoder = &MessagesToggleSavedDialogPinRequest{} + _ bin.BareDecoder = &MessagesToggleSavedDialogPinRequest{} +) + +func (t *MessagesToggleSavedDialogPinRequest) Zero() bool { + if t == nil { + return true + } + if !(t.Flags.Zero()) { + return false + } + if !(t.Pinned == false) { + return false + } + if !(t.Peer == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (t *MessagesToggleSavedDialogPinRequest) String() string { + if t == nil { + return "MessagesToggleSavedDialogPinRequest(nil)" + } + type Alias MessagesToggleSavedDialogPinRequest + return fmt.Sprintf("MessagesToggleSavedDialogPinRequest%+v", Alias(*t)) +} + +// FillFrom fills MessagesToggleSavedDialogPinRequest from given interface. +func (t *MessagesToggleSavedDialogPinRequest) FillFrom(from interface { + GetPinned() (value bool) + GetPeer() (value InputDialogPeerClass) +}) { + t.Pinned = from.GetPinned() + t.Peer = from.GetPeer() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessagesToggleSavedDialogPinRequest) TypeID() uint32 { + return MessagesToggleSavedDialogPinRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessagesToggleSavedDialogPinRequest) TypeName() string { + return "messages.toggleSavedDialogPin" +} + +// TypeInfo returns info about TL type. +func (t *MessagesToggleSavedDialogPinRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messages.toggleSavedDialogPin", + ID: MessagesToggleSavedDialogPinRequestTypeID, + } + if t == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Pinned", + SchemaName: "pinned", + Null: !t.Flags.Has(0), + }, + { + Name: "Peer", + SchemaName: "peer", + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (t *MessagesToggleSavedDialogPinRequest) SetFlags() { + if !(t.Pinned == false) { + t.Flags.Set(0) + } +} + +// Encode implements bin.Encoder. +func (t *MessagesToggleSavedDialogPinRequest) Encode(b *bin.Buffer) error { + if t == nil { + return fmt.Errorf("can't encode messages.toggleSavedDialogPin#ac81bbde as nil") + } + b.PutID(MessagesToggleSavedDialogPinRequestTypeID) + return t.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (t *MessagesToggleSavedDialogPinRequest) EncodeBare(b *bin.Buffer) error { + if t == nil { + return fmt.Errorf("can't encode messages.toggleSavedDialogPin#ac81bbde as nil") + } + t.SetFlags() + if err := t.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.toggleSavedDialogPin#ac81bbde: field flags: %w", err) + } + if t.Peer == nil { + return fmt.Errorf("unable to encode messages.toggleSavedDialogPin#ac81bbde: field peer is nil") + } + if err := t.Peer.Encode(b); err != nil { + return fmt.Errorf("unable to encode messages.toggleSavedDialogPin#ac81bbde: field peer: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (t *MessagesToggleSavedDialogPinRequest) Decode(b *bin.Buffer) error { + if t == nil { + return fmt.Errorf("can't decode messages.toggleSavedDialogPin#ac81bbde to nil") + } + if err := b.ConsumeID(MessagesToggleSavedDialogPinRequestTypeID); err != nil { + return fmt.Errorf("unable to decode messages.toggleSavedDialogPin#ac81bbde: %w", err) + } + return t.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (t *MessagesToggleSavedDialogPinRequest) DecodeBare(b *bin.Buffer) error { + if t == nil { + return fmt.Errorf("can't decode messages.toggleSavedDialogPin#ac81bbde to nil") + } + { + if err := t.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode messages.toggleSavedDialogPin#ac81bbde: field flags: %w", err) + } + } + t.Pinned = t.Flags.Has(0) + { + value, err := DecodeInputDialogPeer(b) + if err != nil { + return fmt.Errorf("unable to decode messages.toggleSavedDialogPin#ac81bbde: field peer: %w", err) + } + t.Peer = value + } + return nil +} + +// SetPinned sets value of Pinned conditional field. +func (t *MessagesToggleSavedDialogPinRequest) SetPinned(value bool) { + if value { + t.Flags.Set(0) + t.Pinned = true + } else { + t.Flags.Unset(0) + t.Pinned = false + } +} + +// GetPinned returns value of Pinned conditional field. +func (t *MessagesToggleSavedDialogPinRequest) GetPinned() (value bool) { + if t == nil { + return + } + return t.Flags.Has(0) +} + +// GetPeer returns value of Peer field. +func (t *MessagesToggleSavedDialogPinRequest) GetPeer() (value InputDialogPeerClass) { + if t == nil { + return + } + return t.Peer +} + +// MessagesToggleSavedDialogPin invokes method messages.toggleSavedDialogPin#ac81bbde returning error if any. +// +// See https://core.telegram.org/method/messages.toggleSavedDialogPin for reference. +func (c *Client) MessagesToggleSavedDialogPin(ctx context.Context, request *MessagesToggleSavedDialogPinRequest) (bool, error) { + var result BoolBox + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return false, err + } + _, ok := result.Bool.(*BoolTrue) + return ok, nil +} diff --git a/vendor/github.com/gotd/td/tg/tl_messages_toggle_saved_dialog_pin_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_messages_toggle_saved_dialog_pin_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_messages_toggle_saved_dialog_pin_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_registry_gen.go b/vendor/github.com/gotd/td/tg/tl_registry_gen.go index 39b8da52..ab8436ba 100644 --- a/vendor/github.com/gotd/td/tg/tl_registry_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_registry_gen.go @@ -32,7 +32,7 @@ var ( ) // Layer version of schema. -const Layer = 169 +const Layer = 170 // TypesMap returns mapping from type ids to TL type names. func TypesMap() map[uint32]string { @@ -128,7 +128,7 @@ func TypesMap() map[uint32]string { ChatPhotoEmptyTypeID: "chatPhotoEmpty#37c1011c", ChatPhotoTypeID: "chatPhoto#1c6e1c11", MessageEmptyTypeID: "messageEmpty#90a6ca84", - MessageTypeID: "message#38116ee0", + MessageTypeID: "message#76bec211", MessageServiceTypeID: "messageService#2b085862", MessageMediaEmptyTypeID: "messageMediaEmpty#3ded6320", MessageMediaPhotoTypeID: "messageMediaPhoto#695150d7", @@ -383,6 +383,8 @@ func TypesMap() map[uint32]string { UpdatePeerWallpaperTypeID: "updatePeerWallpaper#ae3f101d", UpdateBotMessageReactionTypeID: "updateBotMessageReaction#ac21d3ce", UpdateBotMessageReactionsTypeID: "updateBotMessageReactions#9cb7759", + UpdateSavedDialogPinnedTypeID: "updateSavedDialogPinned#aeaf9e74", + UpdatePinnedSavedDialogsTypeID: "updatePinnedSavedDialogs#686c85a6", UpdatesStateTypeID: "updates.state#a56c2a3e", UpdatesDifferenceEmptyTypeID: "updates.differenceEmpty#5d75a138", UpdatesDifferenceTypeID: "updates.difference#f49ca0", @@ -634,7 +636,7 @@ func TypesMap() map[uint32]string { BotInlineMediaResultTypeID: "botInlineMediaResult#17db940b", MessagesBotResultsTypeID: "messages.botResults#e021f2f6", ExportedMessageLinkTypeID: "exportedMessageLink#5dab1af4", - MessageFwdHeaderTypeID: "messageFwdHeader#5f777dce", + MessageFwdHeaderTypeID: "messageFwdHeader#4e4df4bb", AuthCodeTypeSMSTypeID: "auth.codeTypeSms#72a3158c", AuthCodeTypeCallTypeID: "auth.codeTypeCall#741cd3e3", AuthCodeTypeFlashCallTypeID: "auth.codeTypeFlashCall#226ccefb", @@ -1237,6 +1239,10 @@ func TypesMap() map[uint32]string { StoryReactionPublicForwardTypeID: "storyReactionPublicForward#bbab2643", StoryReactionPublicRepostTypeID: "storyReactionPublicRepost#cfcd0f13", StoriesStoryReactionsListTypeID: "stories.storyReactionsList#aa5f789c", + SavedDialogTypeID: "savedDialog#bd87cb6c", + MessagesSavedDialogsTypeID: "messages.savedDialogs#f83ae221", + MessagesSavedDialogsSliceTypeID: "messages.savedDialogsSlice#44ba9dd9", + MessagesSavedDialogsNotModifiedTypeID: "messages.savedDialogsNotModified#c01f6fe8", InvokeAfterMsgRequestTypeID: "invokeAfterMsg#cb9f372d", InvokeAfterMsgsRequestTypeID: "invokeAfterMsgs#3dc4b4f0", InitConnectionRequestTypeID: "initConnection#c1cd5ea9", @@ -1389,7 +1395,7 @@ func TypesMap() map[uint32]string { MessagesGetMessagesRequestTypeID: "messages.getMessages#63c66506", MessagesGetDialogsRequestTypeID: "messages.getDialogs#a0f4cb4f", MessagesGetHistoryRequestTypeID: "messages.getHistory#4423e6c5", - MessagesSearchRequestTypeID: "messages.search#a0fda762", + MessagesSearchRequestTypeID: "messages.search#a7b4e929", MessagesReadHistoryRequestTypeID: "messages.readHistory#e306d3a", MessagesDeleteHistoryRequestTypeID: "messages.deleteHistory#b08f922a", MessagesDeleteMessagesRequestTypeID: "messages.deleteMessages#e58e95d2", @@ -1492,7 +1498,7 @@ func TypesMap() map[uint32]string { MessagesGetEmojiKeywordsDifferenceRequestTypeID: "messages.getEmojiKeywordsDifference#1508b6af", MessagesGetEmojiKeywordsLanguagesRequestTypeID: "messages.getEmojiKeywordsLanguages#4e9963b2", MessagesGetEmojiURLRequestTypeID: "messages.getEmojiURL#d5b10c26", - MessagesGetSearchCountersRequestTypeID: "messages.getSearchCounters#ae7cc1", + MessagesGetSearchCountersRequestTypeID: "messages.getSearchCounters#1bbcf300", MessagesRequestURLAuthRequestTypeID: "messages.requestUrlAuth#198fb446", MessagesAcceptURLAuthRequestTypeID: "messages.acceptUrlAuth#b12c7125", MessagesHidePeerSettingsBarRequestTypeID: "messages.hidePeerSettingsBar#4facb138", @@ -1528,8 +1534,8 @@ func TypesMap() map[uint32]string { MessagesCheckHistoryImportPeerRequestTypeID: "messages.checkHistoryImportPeer#5dc60f03", MessagesSetChatThemeRequestTypeID: "messages.setChatTheme#e63be13f", MessagesGetMessageReadParticipantsRequestTypeID: "messages.getMessageReadParticipants#31c1c44f", - MessagesGetSearchResultsCalendarRequestTypeID: "messages.getSearchResultsCalendar#49f0bde9", - MessagesGetSearchResultsPositionsRequestTypeID: "messages.getSearchResultsPositions#6e9583a3", + MessagesGetSearchResultsCalendarRequestTypeID: "messages.getSearchResultsCalendar#6aa3f6bd", + MessagesGetSearchResultsPositionsRequestTypeID: "messages.getSearchResultsPositions#9c7f2f10", MessagesHideChatJoinRequestRequestTypeID: "messages.hideChatJoinRequest#7fe7e815", MessagesHideAllChatJoinRequestsRequestTypeID: "messages.hideAllChatJoinRequests#e085f4ea", MessagesToggleNoForwardsRequestTypeID: "messages.toggleNoForwards#b11eafa2", @@ -1574,6 +1580,12 @@ func TypesMap() map[uint32]string { MessagesRequestAppWebViewRequestTypeID: "messages.requestAppWebView#8c5a3b3c", MessagesSetChatWallPaperRequestTypeID: "messages.setChatWallPaper#8ffacae1", MessagesSearchEmojiStickerSetsRequestTypeID: "messages.searchEmojiStickerSets#92b4494c", + MessagesGetSavedDialogsRequestTypeID: "messages.getSavedDialogs#5381d21a", + MessagesGetSavedHistoryRequestTypeID: "messages.getSavedHistory#3d9a414d", + MessagesDeleteSavedHistoryRequestTypeID: "messages.deleteSavedHistory#6e98102b", + MessagesGetPinnedSavedDialogsRequestTypeID: "messages.getPinnedSavedDialogs#d63d94e0", + MessagesToggleSavedDialogPinRequestTypeID: "messages.toggleSavedDialogPin#ac81bbde", + MessagesReorderPinnedSavedDialogsRequestTypeID: "messages.reorderPinnedSavedDialogs#8b716587", UpdatesGetStateRequestTypeID: "updates.getState#edd4882a", UpdatesGetDifferenceRequestTypeID: "updates.getDifference#19c2f763", UpdatesGetChannelDifferenceRequestTypeID: "updates.getChannelDifference#3173d78", @@ -2165,6 +2177,8 @@ func NamesMap() map[string]uint32 { "updatePeerWallpaper": UpdatePeerWallpaperTypeID, "updateBotMessageReaction": UpdateBotMessageReactionTypeID, "updateBotMessageReactions": UpdateBotMessageReactionsTypeID, + "updateSavedDialogPinned": UpdateSavedDialogPinnedTypeID, + "updatePinnedSavedDialogs": UpdatePinnedSavedDialogsTypeID, "updates.state": UpdatesStateTypeID, "updates.differenceEmpty": UpdatesDifferenceEmptyTypeID, "updates.difference": UpdatesDifferenceTypeID, @@ -3019,6 +3033,10 @@ func NamesMap() map[string]uint32 { "storyReactionPublicForward": StoryReactionPublicForwardTypeID, "storyReactionPublicRepost": StoryReactionPublicRepostTypeID, "stories.storyReactionsList": StoriesStoryReactionsListTypeID, + "savedDialog": SavedDialogTypeID, + "messages.savedDialogs": MessagesSavedDialogsTypeID, + "messages.savedDialogsSlice": MessagesSavedDialogsSliceTypeID, + "messages.savedDialogsNotModified": MessagesSavedDialogsNotModifiedTypeID, "invokeAfterMsg": InvokeAfterMsgRequestTypeID, "invokeAfterMsgs": InvokeAfterMsgsRequestTypeID, "initConnection": InitConnectionRequestTypeID, @@ -3356,6 +3374,12 @@ func NamesMap() map[string]uint32 { "messages.requestAppWebView": MessagesRequestAppWebViewRequestTypeID, "messages.setChatWallPaper": MessagesSetChatWallPaperRequestTypeID, "messages.searchEmojiStickerSets": MessagesSearchEmojiStickerSetsRequestTypeID, + "messages.getSavedDialogs": MessagesGetSavedDialogsRequestTypeID, + "messages.getSavedHistory": MessagesGetSavedHistoryRequestTypeID, + "messages.deleteSavedHistory": MessagesDeleteSavedHistoryRequestTypeID, + "messages.getPinnedSavedDialogs": MessagesGetPinnedSavedDialogsRequestTypeID, + "messages.toggleSavedDialogPin": MessagesToggleSavedDialogPinRequestTypeID, + "messages.reorderPinnedSavedDialogs": MessagesReorderPinnedSavedDialogsRequestTypeID, "updates.getState": UpdatesGetStateRequestTypeID, "updates.getDifference": UpdatesGetDifferenceRequestTypeID, "updates.getChannelDifference": UpdatesGetChannelDifferenceRequestTypeID, @@ -3947,6 +3971,8 @@ func TypesConstructorMap() map[uint32]func() bin.Object { UpdatePeerWallpaperTypeID: func() bin.Object { return &UpdatePeerWallpaper{} }, UpdateBotMessageReactionTypeID: func() bin.Object { return &UpdateBotMessageReaction{} }, UpdateBotMessageReactionsTypeID: func() bin.Object { return &UpdateBotMessageReactions{} }, + UpdateSavedDialogPinnedTypeID: func() bin.Object { return &UpdateSavedDialogPinned{} }, + UpdatePinnedSavedDialogsTypeID: func() bin.Object { return &UpdatePinnedSavedDialogs{} }, UpdatesStateTypeID: func() bin.Object { return &UpdatesState{} }, UpdatesDifferenceEmptyTypeID: func() bin.Object { return &UpdatesDifferenceEmpty{} }, UpdatesDifferenceTypeID: func() bin.Object { return &UpdatesDifference{} }, @@ -4801,6 +4827,10 @@ func TypesConstructorMap() map[uint32]func() bin.Object { StoryReactionPublicForwardTypeID: func() bin.Object { return &StoryReactionPublicForward{} }, StoryReactionPublicRepostTypeID: func() bin.Object { return &StoryReactionPublicRepost{} }, StoriesStoryReactionsListTypeID: func() bin.Object { return &StoriesStoryReactionsList{} }, + SavedDialogTypeID: func() bin.Object { return &SavedDialog{} }, + MessagesSavedDialogsTypeID: func() bin.Object { return &MessagesSavedDialogs{} }, + MessagesSavedDialogsSliceTypeID: func() bin.Object { return &MessagesSavedDialogsSlice{} }, + MessagesSavedDialogsNotModifiedTypeID: func() bin.Object { return &MessagesSavedDialogsNotModified{} }, InvokeAfterMsgRequestTypeID: func() bin.Object { return &InvokeAfterMsgRequest{} }, InvokeAfterMsgsRequestTypeID: func() bin.Object { return &InvokeAfterMsgsRequest{} }, InitConnectionRequestTypeID: func() bin.Object { return &InitConnectionRequest{} }, @@ -5138,6 +5168,12 @@ func TypesConstructorMap() map[uint32]func() bin.Object { MessagesRequestAppWebViewRequestTypeID: func() bin.Object { return &MessagesRequestAppWebViewRequest{} }, MessagesSetChatWallPaperRequestTypeID: func() bin.Object { return &MessagesSetChatWallPaperRequest{} }, MessagesSearchEmojiStickerSetsRequestTypeID: func() bin.Object { return &MessagesSearchEmojiStickerSetsRequest{} }, + MessagesGetSavedDialogsRequestTypeID: func() bin.Object { return &MessagesGetSavedDialogsRequest{} }, + MessagesGetSavedHistoryRequestTypeID: func() bin.Object { return &MessagesGetSavedHistoryRequest{} }, + MessagesDeleteSavedHistoryRequestTypeID: func() bin.Object { return &MessagesDeleteSavedHistoryRequest{} }, + MessagesGetPinnedSavedDialogsRequestTypeID: func() bin.Object { return &MessagesGetPinnedSavedDialogsRequest{} }, + MessagesToggleSavedDialogPinRequestTypeID: func() bin.Object { return &MessagesToggleSavedDialogPinRequest{} }, + MessagesReorderPinnedSavedDialogsRequestTypeID: func() bin.Object { return &MessagesReorderPinnedSavedDialogsRequest{} }, UpdatesGetStateRequestTypeID: func() bin.Object { return &UpdatesGetStateRequest{} }, UpdatesGetDifferenceRequestTypeID: func() bin.Object { return &UpdatesGetDifferenceRequest{} }, UpdatesGetChannelDifferenceRequestTypeID: func() bin.Object { return &UpdatesGetChannelDifferenceRequest{} }, @@ -6186,6 +6222,11 @@ func ClassConstructorsMap() map[string][]uint32 { MessagesRecentStickersNotModifiedTypeID, MessagesRecentStickersTypeID, }, + MessagesSavedDialogsClassName: { + MessagesSavedDialogsTypeID, + MessagesSavedDialogsSliceTypeID, + MessagesSavedDialogsNotModifiedTypeID, + }, MessagesSavedGifsClassName: { MessagesSavedGifsNotModifiedTypeID, MessagesSavedGifsTypeID, @@ -6644,6 +6685,8 @@ func ClassConstructorsMap() map[string][]uint32 { UpdatePeerWallpaperTypeID, UpdateBotMessageReactionTypeID, UpdateBotMessageReactionsTypeID, + UpdateSavedDialogPinnedTypeID, + UpdatePinnedSavedDialogsTypeID, }, UpdatesChannelDifferenceClassName: { UpdatesChannelDifferenceEmptyTypeID, diff --git a/vendor/github.com/gotd/td/tg/tl_saved_dialog_gen.go b/vendor/github.com/gotd/td/tg/tl_saved_dialog_gen.go new file mode 100644 index 00000000..be837a22 --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_saved_dialog_gen.go @@ -0,0 +1,246 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SavedDialog represents TL type `savedDialog#bd87cb6c`. +// +// See https://core.telegram.org/constructor/savedDialog for reference. +type SavedDialog struct { + // Flags field of SavedDialog. + Flags bin.Fields + // Pinned field of SavedDialog. + Pinned bool + // Peer field of SavedDialog. + Peer PeerClass + // TopMessage field of SavedDialog. + TopMessage int +} + +// SavedDialogTypeID is TL type id of SavedDialog. +const SavedDialogTypeID = 0xbd87cb6c + +// Ensuring interfaces in compile-time for SavedDialog. +var ( + _ bin.Encoder = &SavedDialog{} + _ bin.Decoder = &SavedDialog{} + _ bin.BareEncoder = &SavedDialog{} + _ bin.BareDecoder = &SavedDialog{} +) + +func (s *SavedDialog) Zero() bool { + if s == nil { + return true + } + if !(s.Flags.Zero()) { + return false + } + if !(s.Pinned == false) { + return false + } + if !(s.Peer == nil) { + return false + } + if !(s.TopMessage == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SavedDialog) String() string { + if s == nil { + return "SavedDialog(nil)" + } + type Alias SavedDialog + return fmt.Sprintf("SavedDialog%+v", Alias(*s)) +} + +// FillFrom fills SavedDialog from given interface. +func (s *SavedDialog) FillFrom(from interface { + GetPinned() (value bool) + GetPeer() (value PeerClass) + GetTopMessage() (value int) +}) { + s.Pinned = from.GetPinned() + s.Peer = from.GetPeer() + s.TopMessage = from.GetTopMessage() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SavedDialog) TypeID() uint32 { + return SavedDialogTypeID +} + +// TypeName returns name of type in TL schema. +func (*SavedDialog) TypeName() string { + return "savedDialog" +} + +// TypeInfo returns info about TL type. +func (s *SavedDialog) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "savedDialog", + ID: SavedDialogTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Pinned", + SchemaName: "pinned", + Null: !s.Flags.Has(2), + }, + { + Name: "Peer", + SchemaName: "peer", + }, + { + Name: "TopMessage", + SchemaName: "top_message", + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (s *SavedDialog) SetFlags() { + if !(s.Pinned == false) { + s.Flags.Set(2) + } +} + +// Encode implements bin.Encoder. +func (s *SavedDialog) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode savedDialog#bd87cb6c as nil") + } + b.PutID(SavedDialogTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SavedDialog) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode savedDialog#bd87cb6c as nil") + } + s.SetFlags() + if err := s.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode savedDialog#bd87cb6c: field flags: %w", err) + } + if s.Peer == nil { + return fmt.Errorf("unable to encode savedDialog#bd87cb6c: field peer is nil") + } + if err := s.Peer.Encode(b); err != nil { + return fmt.Errorf("unable to encode savedDialog#bd87cb6c: field peer: %w", err) + } + b.PutInt(s.TopMessage) + return nil +} + +// Decode implements bin.Decoder. +func (s *SavedDialog) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode savedDialog#bd87cb6c to nil") + } + if err := b.ConsumeID(SavedDialogTypeID); err != nil { + return fmt.Errorf("unable to decode savedDialog#bd87cb6c: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SavedDialog) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode savedDialog#bd87cb6c to nil") + } + { + if err := s.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode savedDialog#bd87cb6c: field flags: %w", err) + } + } + s.Pinned = s.Flags.Has(2) + { + value, err := DecodePeer(b) + if err != nil { + return fmt.Errorf("unable to decode savedDialog#bd87cb6c: field peer: %w", err) + } + s.Peer = value + } + { + value, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode savedDialog#bd87cb6c: field top_message: %w", err) + } + s.TopMessage = value + } + return nil +} + +// SetPinned sets value of Pinned conditional field. +func (s *SavedDialog) SetPinned(value bool) { + if value { + s.Flags.Set(2) + s.Pinned = true + } else { + s.Flags.Unset(2) + s.Pinned = false + } +} + +// GetPinned returns value of Pinned conditional field. +func (s *SavedDialog) GetPinned() (value bool) { + if s == nil { + return + } + return s.Flags.Has(2) +} + +// GetPeer returns value of Peer field. +func (s *SavedDialog) GetPeer() (value PeerClass) { + if s == nil { + return + } + return s.Peer +} + +// GetTopMessage returns value of TopMessage field. +func (s *SavedDialog) GetTopMessage() (value int) { + if s == nil { + return + } + return s.TopMessage +} diff --git a/vendor/github.com/gotd/td/tg/tl_saved_dialog_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_saved_dialog_slices_gen.go new file mode 100644 index 00000000..fe21471a --- /dev/null +++ b/vendor/github.com/gotd/td/tg/tl_saved_dialog_slices_gen.go @@ -0,0 +1,35 @@ +//go:build !no_gotd_slices +// +build !no_gotd_slices + +// Code generated by gotdgen, DO NOT EDIT. + +package tg + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) diff --git a/vendor/github.com/gotd/td/tg/tl_server_gen.go b/vendor/github.com/gotd/td/tg/tl_server_gen.go index ac7489e7..21a726fa 100644 --- a/vendor/github.com/gotd/td/tg/tl_server_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_server_gen.go @@ -6079,6 +6079,116 @@ func (s *ServerDispatcher) OnMessagesSearchEmojiStickerSets(f func(ctx context.C s.handlers[MessagesSearchEmojiStickerSetsRequestTypeID] = handler } +func (s *ServerDispatcher) OnMessagesGetSavedDialogs(f func(ctx context.Context, request *MessagesGetSavedDialogsRequest) (MessagesSavedDialogsClass, error)) { + handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { + var request MessagesGetSavedDialogsRequest + if err := request.Decode(b); err != nil { + return nil, err + } + + response, err := f(ctx, &request) + if err != nil { + return nil, err + } + return &MessagesSavedDialogsBox{SavedDialogs: response}, nil + } + + s.handlers[MessagesGetSavedDialogsRequestTypeID] = handler +} + +func (s *ServerDispatcher) OnMessagesGetSavedHistory(f func(ctx context.Context, request *MessagesGetSavedHistoryRequest) (MessagesMessagesClass, error)) { + handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { + var request MessagesGetSavedHistoryRequest + if err := request.Decode(b); err != nil { + return nil, err + } + + response, err := f(ctx, &request) + if err != nil { + return nil, err + } + return &MessagesMessagesBox{Messages: response}, nil + } + + s.handlers[MessagesGetSavedHistoryRequestTypeID] = handler +} + +func (s *ServerDispatcher) OnMessagesDeleteSavedHistory(f func(ctx context.Context, request *MessagesDeleteSavedHistoryRequest) (*MessagesAffectedHistory, error)) { + handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { + var request MessagesDeleteSavedHistoryRequest + if err := request.Decode(b); err != nil { + return nil, err + } + + response, err := f(ctx, &request) + if err != nil { + return nil, err + } + return response, nil + } + + s.handlers[MessagesDeleteSavedHistoryRequestTypeID] = handler +} + +func (s *ServerDispatcher) OnMessagesGetPinnedSavedDialogs(f func(ctx context.Context) (MessagesSavedDialogsClass, error)) { + handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { + var request MessagesGetPinnedSavedDialogsRequest + if err := request.Decode(b); err != nil { + return nil, err + } + + response, err := f(ctx) + if err != nil { + return nil, err + } + return &MessagesSavedDialogsBox{SavedDialogs: response}, nil + } + + s.handlers[MessagesGetPinnedSavedDialogsRequestTypeID] = handler +} + +func (s *ServerDispatcher) OnMessagesToggleSavedDialogPin(f func(ctx context.Context, request *MessagesToggleSavedDialogPinRequest) (bool, error)) { + handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { + var request MessagesToggleSavedDialogPinRequest + if err := request.Decode(b); err != nil { + return nil, err + } + + response, err := f(ctx, &request) + if err != nil { + return nil, err + } + if response { + return &BoolBox{Bool: &BoolTrue{}}, nil + } + + return &BoolBox{Bool: &BoolFalse{}}, nil + } + + s.handlers[MessagesToggleSavedDialogPinRequestTypeID] = handler +} + +func (s *ServerDispatcher) OnMessagesReorderPinnedSavedDialogs(f func(ctx context.Context, request *MessagesReorderPinnedSavedDialogsRequest) (bool, error)) { + handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { + var request MessagesReorderPinnedSavedDialogsRequest + if err := request.Decode(b); err != nil { + return nil, err + } + + response, err := f(ctx, &request) + if err != nil { + return nil, err + } + if response { + return &BoolBox{Bool: &BoolTrue{}}, nil + } + + return &BoolBox{Bool: &BoolFalse{}}, nil + } + + s.handlers[MessagesReorderPinnedSavedDialogsRequestTypeID] = handler +} + func (s *ServerDispatcher) OnUpdatesGetState(f func(ctx context.Context) (*UpdatesState, error)) { handler := func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error) { var request UpdatesGetStateRequest diff --git a/vendor/github.com/gotd/td/tg/tl_update_gen.go b/vendor/github.com/gotd/td/tg/tl_update_gen.go index a58f8d85..f4874450 100644 --- a/vendor/github.com/gotd/td/tg/tl_update_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_update_gen.go @@ -24782,6 +24782,397 @@ func (u *UpdateBotMessageReactions) GetQts() (value int) { return u.Qts } +// UpdateSavedDialogPinned represents TL type `updateSavedDialogPinned#aeaf9e74`. +// +// See https://core.telegram.org/constructor/updateSavedDialogPinned for reference. +type UpdateSavedDialogPinned struct { + // Flags field of UpdateSavedDialogPinned. + Flags bin.Fields + // Pinned field of UpdateSavedDialogPinned. + Pinned bool + // Peer field of UpdateSavedDialogPinned. + Peer DialogPeerClass +} + +// UpdateSavedDialogPinnedTypeID is TL type id of UpdateSavedDialogPinned. +const UpdateSavedDialogPinnedTypeID = 0xaeaf9e74 + +// construct implements constructor of UpdateClass. +func (u UpdateSavedDialogPinned) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateSavedDialogPinned. +var ( + _ bin.Encoder = &UpdateSavedDialogPinned{} + _ bin.Decoder = &UpdateSavedDialogPinned{} + _ bin.BareEncoder = &UpdateSavedDialogPinned{} + _ bin.BareDecoder = &UpdateSavedDialogPinned{} + + _ UpdateClass = &UpdateSavedDialogPinned{} +) + +func (u *UpdateSavedDialogPinned) Zero() bool { + if u == nil { + return true + } + if !(u.Flags.Zero()) { + return false + } + if !(u.Pinned == false) { + return false + } + if !(u.Peer == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateSavedDialogPinned) String() string { + if u == nil { + return "UpdateSavedDialogPinned(nil)" + } + type Alias UpdateSavedDialogPinned + return fmt.Sprintf("UpdateSavedDialogPinned%+v", Alias(*u)) +} + +// FillFrom fills UpdateSavedDialogPinned from given interface. +func (u *UpdateSavedDialogPinned) FillFrom(from interface { + GetPinned() (value bool) + GetPeer() (value DialogPeerClass) +}) { + u.Pinned = from.GetPinned() + u.Peer = from.GetPeer() +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateSavedDialogPinned) TypeID() uint32 { + return UpdateSavedDialogPinnedTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateSavedDialogPinned) TypeName() string { + return "updateSavedDialogPinned" +} + +// TypeInfo returns info about TL type. +func (u *UpdateSavedDialogPinned) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateSavedDialogPinned", + ID: UpdateSavedDialogPinnedTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Pinned", + SchemaName: "pinned", + Null: !u.Flags.Has(0), + }, + { + Name: "Peer", + SchemaName: "peer", + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (u *UpdateSavedDialogPinned) SetFlags() { + if !(u.Pinned == false) { + u.Flags.Set(0) + } +} + +// Encode implements bin.Encoder. +func (u *UpdateSavedDialogPinned) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateSavedDialogPinned#aeaf9e74 as nil") + } + b.PutID(UpdateSavedDialogPinnedTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateSavedDialogPinned) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateSavedDialogPinned#aeaf9e74 as nil") + } + u.SetFlags() + if err := u.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateSavedDialogPinned#aeaf9e74: field flags: %w", err) + } + if u.Peer == nil { + return fmt.Errorf("unable to encode updateSavedDialogPinned#aeaf9e74: field peer is nil") + } + if err := u.Peer.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateSavedDialogPinned#aeaf9e74: field peer: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateSavedDialogPinned) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateSavedDialogPinned#aeaf9e74 to nil") + } + if err := b.ConsumeID(UpdateSavedDialogPinnedTypeID); err != nil { + return fmt.Errorf("unable to decode updateSavedDialogPinned#aeaf9e74: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateSavedDialogPinned) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateSavedDialogPinned#aeaf9e74 to nil") + } + { + if err := u.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode updateSavedDialogPinned#aeaf9e74: field flags: %w", err) + } + } + u.Pinned = u.Flags.Has(0) + { + value, err := DecodeDialogPeer(b) + if err != nil { + return fmt.Errorf("unable to decode updateSavedDialogPinned#aeaf9e74: field peer: %w", err) + } + u.Peer = value + } + return nil +} + +// SetPinned sets value of Pinned conditional field. +func (u *UpdateSavedDialogPinned) SetPinned(value bool) { + if value { + u.Flags.Set(0) + u.Pinned = true + } else { + u.Flags.Unset(0) + u.Pinned = false + } +} + +// GetPinned returns value of Pinned conditional field. +func (u *UpdateSavedDialogPinned) GetPinned() (value bool) { + if u == nil { + return + } + return u.Flags.Has(0) +} + +// GetPeer returns value of Peer field. +func (u *UpdateSavedDialogPinned) GetPeer() (value DialogPeerClass) { + if u == nil { + return + } + return u.Peer +} + +// UpdatePinnedSavedDialogs represents TL type `updatePinnedSavedDialogs#686c85a6`. +// +// See https://core.telegram.org/constructor/updatePinnedSavedDialogs for reference. +type UpdatePinnedSavedDialogs struct { + // Flags field of UpdatePinnedSavedDialogs. + Flags bin.Fields + // Order field of UpdatePinnedSavedDialogs. + // + // Use SetOrder and GetOrder helpers. + Order []DialogPeerClass +} + +// UpdatePinnedSavedDialogsTypeID is TL type id of UpdatePinnedSavedDialogs. +const UpdatePinnedSavedDialogsTypeID = 0x686c85a6 + +// construct implements constructor of UpdateClass. +func (u UpdatePinnedSavedDialogs) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdatePinnedSavedDialogs. +var ( + _ bin.Encoder = &UpdatePinnedSavedDialogs{} + _ bin.Decoder = &UpdatePinnedSavedDialogs{} + _ bin.BareEncoder = &UpdatePinnedSavedDialogs{} + _ bin.BareDecoder = &UpdatePinnedSavedDialogs{} + + _ UpdateClass = &UpdatePinnedSavedDialogs{} +) + +func (u *UpdatePinnedSavedDialogs) Zero() bool { + if u == nil { + return true + } + if !(u.Flags.Zero()) { + return false + } + if !(u.Order == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdatePinnedSavedDialogs) String() string { + if u == nil { + return "UpdatePinnedSavedDialogs(nil)" + } + type Alias UpdatePinnedSavedDialogs + return fmt.Sprintf("UpdatePinnedSavedDialogs%+v", Alias(*u)) +} + +// FillFrom fills UpdatePinnedSavedDialogs from given interface. +func (u *UpdatePinnedSavedDialogs) FillFrom(from interface { + GetOrder() (value []DialogPeerClass, ok bool) +}) { + if val, ok := from.GetOrder(); ok { + u.Order = val + } + +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdatePinnedSavedDialogs) TypeID() uint32 { + return UpdatePinnedSavedDialogsTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdatePinnedSavedDialogs) TypeName() string { + return "updatePinnedSavedDialogs" +} + +// TypeInfo returns info about TL type. +func (u *UpdatePinnedSavedDialogs) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updatePinnedSavedDialogs", + ID: UpdatePinnedSavedDialogsTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Order", + SchemaName: "order", + Null: !u.Flags.Has(0), + }, + } + return typ +} + +// SetFlags sets flags for non-zero fields. +func (u *UpdatePinnedSavedDialogs) SetFlags() { + if !(u.Order == nil) { + u.Flags.Set(0) + } +} + +// Encode implements bin.Encoder. +func (u *UpdatePinnedSavedDialogs) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updatePinnedSavedDialogs#686c85a6 as nil") + } + b.PutID(UpdatePinnedSavedDialogsTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdatePinnedSavedDialogs) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updatePinnedSavedDialogs#686c85a6 as nil") + } + u.SetFlags() + if err := u.Flags.Encode(b); err != nil { + return fmt.Errorf("unable to encode updatePinnedSavedDialogs#686c85a6: field flags: %w", err) + } + if u.Flags.Has(0) { + b.PutVectorHeader(len(u.Order)) + for idx, v := range u.Order { + if v == nil { + return fmt.Errorf("unable to encode updatePinnedSavedDialogs#686c85a6: field order element with index %d is nil", idx) + } + if err := v.Encode(b); err != nil { + return fmt.Errorf("unable to encode updatePinnedSavedDialogs#686c85a6: field order element with index %d: %w", idx, err) + } + } + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdatePinnedSavedDialogs) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updatePinnedSavedDialogs#686c85a6 to nil") + } + if err := b.ConsumeID(UpdatePinnedSavedDialogsTypeID); err != nil { + return fmt.Errorf("unable to decode updatePinnedSavedDialogs#686c85a6: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdatePinnedSavedDialogs) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updatePinnedSavedDialogs#686c85a6 to nil") + } + { + if err := u.Flags.Decode(b); err != nil { + return fmt.Errorf("unable to decode updatePinnedSavedDialogs#686c85a6: field flags: %w", err) + } + } + if u.Flags.Has(0) { + headerLen, err := b.VectorHeader() + if err != nil { + return fmt.Errorf("unable to decode updatePinnedSavedDialogs#686c85a6: field order: %w", err) + } + + if headerLen > 0 { + u.Order = make([]DialogPeerClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeDialogPeer(b) + if err != nil { + return fmt.Errorf("unable to decode updatePinnedSavedDialogs#686c85a6: field order: %w", err) + } + u.Order = append(u.Order, value) + } + } + return nil +} + +// SetOrder sets value of Order conditional field. +func (u *UpdatePinnedSavedDialogs) SetOrder(value []DialogPeerClass) { + u.Flags.Set(0) + u.Order = value +} + +// GetOrder returns value of Order conditional field and +// boolean which is true if field was set. +func (u *UpdatePinnedSavedDialogs) GetOrder() (value []DialogPeerClass, ok bool) { + if u == nil { + return + } + if !u.Flags.Has(0) { + return value, false + } + return u.Order, true +} + +// MapOrder returns field Order wrapped in DialogPeerClassArray helper. +func (u *UpdatePinnedSavedDialogs) MapOrder() (value DialogPeerClassArray, ok bool) { + if !u.Flags.Has(0) { + return value, false + } + return DialogPeerClassArray(u.Order), true +} + // UpdateClassName is schema name of UpdateClass. const UpdateClassName = "Update" @@ -24918,6 +25309,8 @@ const UpdateClassName = "Update" // case *tg.UpdatePeerWallpaper: // updatePeerWallpaper#ae3f101d // case *tg.UpdateBotMessageReaction: // updateBotMessageReaction#ac21d3ce // case *tg.UpdateBotMessageReactions: // updateBotMessageReactions#9cb7759 +// case *tg.UpdateSavedDialogPinned: // updateSavedDialogPinned#aeaf9e74 +// case *tg.UpdatePinnedSavedDialogs: // updatePinnedSavedDialogs#686c85a6 // default: panic(v) // } type UpdateClass interface { @@ -25800,6 +26193,20 @@ func DecodeUpdate(buf *bin.Buffer) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case UpdateSavedDialogPinnedTypeID: + // Decoding updateSavedDialogPinned#aeaf9e74. + v := UpdateSavedDialogPinned{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case UpdatePinnedSavedDialogsTypeID: + // Decoding updatePinnedSavedDialogs#686c85a6. + v := UpdatePinnedSavedDialogs{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil default: return nil, fmt.Errorf("unable to decode UpdateClass: %w", bin.NewUnexpectedID(id)) } diff --git a/vendor/github.com/gotd/td/tg/tl_update_slices_gen.go b/vendor/github.com/gotd/td/tg/tl_update_slices_gen.go index 109235eb..1febd85b 100644 --- a/vendor/github.com/gotd/td/tg/tl_update_slices_gen.go +++ b/vendor/github.com/gotd/td/tg/tl_update_slices_gen.go @@ -1507,6 +1507,32 @@ func (s UpdateClassArray) AsUpdateBotMessageReactions() (to UpdateBotMessageReac return to } +// AsUpdateSavedDialogPinned returns copy with only UpdateSavedDialogPinned constructors. +func (s UpdateClassArray) AsUpdateSavedDialogPinned() (to UpdateSavedDialogPinnedArray) { + for _, elem := range s { + value, ok := elem.(*UpdateSavedDialogPinned) + if !ok { + continue + } + to = append(to, *value) + } + + return to +} + +// AsUpdatePinnedSavedDialogs returns copy with only UpdatePinnedSavedDialogs constructors. +func (s UpdateClassArray) AsUpdatePinnedSavedDialogs() (to UpdatePinnedSavedDialogsArray) { + for _, elem := range s { + value, ok := elem.(*UpdatePinnedSavedDialogs) + if !ok { + continue + } + to = append(to, *value) + } + + return to +} + // UpdateNewMessageArray is adapter for slice of UpdateNewMessage. type UpdateNewMessageArray []UpdateNewMessage @@ -10546,3 +10572,167 @@ func (s UpdateBotMessageReactionsArray) SortStableByDate() UpdateBotMessageReact return a.GetDate() < b.GetDate() }) } + +// UpdateSavedDialogPinnedArray is adapter for slice of UpdateSavedDialogPinned. +type UpdateSavedDialogPinnedArray []UpdateSavedDialogPinned + +// Sort sorts slice of UpdateSavedDialogPinned. +func (s UpdateSavedDialogPinnedArray) Sort(less func(a, b UpdateSavedDialogPinned) bool) UpdateSavedDialogPinnedArray { + sort.Slice(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// SortStable sorts slice of UpdateSavedDialogPinned. +func (s UpdateSavedDialogPinnedArray) SortStable(less func(a, b UpdateSavedDialogPinned) bool) UpdateSavedDialogPinnedArray { + sort.SliceStable(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// Retain filters in-place slice of UpdateSavedDialogPinned. +func (s UpdateSavedDialogPinnedArray) Retain(keep func(x UpdateSavedDialogPinned) bool) UpdateSavedDialogPinnedArray { + n := 0 + for _, x := range s { + if keep(x) { + s[n] = x + n++ + } + } + s = s[:n] + + return s +} + +// First returns first element of slice (if exists). +func (s UpdateSavedDialogPinnedArray) First() (v UpdateSavedDialogPinned, ok bool) { + if len(s) < 1 { + return + } + return s[0], true +} + +// Last returns last element of slice (if exists). +func (s UpdateSavedDialogPinnedArray) Last() (v UpdateSavedDialogPinned, ok bool) { + if len(s) < 1 { + return + } + return s[len(s)-1], true +} + +// PopFirst returns first element of slice (if exists) and deletes it. +func (s *UpdateSavedDialogPinnedArray) PopFirst() (v UpdateSavedDialogPinned, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[0] + + // Delete by index from SliceTricks. + copy(a[0:], a[1:]) + var zero UpdateSavedDialogPinned + a[len(a)-1] = zero + a = a[:len(a)-1] + *s = a + + return v, true +} + +// Pop returns last element of slice (if exists) and deletes it. +func (s *UpdateSavedDialogPinnedArray) Pop() (v UpdateSavedDialogPinned, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[len(a)-1] + a = a[:len(a)-1] + *s = a + + return v, true +} + +// UpdatePinnedSavedDialogsArray is adapter for slice of UpdatePinnedSavedDialogs. +type UpdatePinnedSavedDialogsArray []UpdatePinnedSavedDialogs + +// Sort sorts slice of UpdatePinnedSavedDialogs. +func (s UpdatePinnedSavedDialogsArray) Sort(less func(a, b UpdatePinnedSavedDialogs) bool) UpdatePinnedSavedDialogsArray { + sort.Slice(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// SortStable sorts slice of UpdatePinnedSavedDialogs. +func (s UpdatePinnedSavedDialogsArray) SortStable(less func(a, b UpdatePinnedSavedDialogs) bool) UpdatePinnedSavedDialogsArray { + sort.SliceStable(s, func(i, j int) bool { + return less(s[i], s[j]) + }) + return s +} + +// Retain filters in-place slice of UpdatePinnedSavedDialogs. +func (s UpdatePinnedSavedDialogsArray) Retain(keep func(x UpdatePinnedSavedDialogs) bool) UpdatePinnedSavedDialogsArray { + n := 0 + for _, x := range s { + if keep(x) { + s[n] = x + n++ + } + } + s = s[:n] + + return s +} + +// First returns first element of slice (if exists). +func (s UpdatePinnedSavedDialogsArray) First() (v UpdatePinnedSavedDialogs, ok bool) { + if len(s) < 1 { + return + } + return s[0], true +} + +// Last returns last element of slice (if exists). +func (s UpdatePinnedSavedDialogsArray) Last() (v UpdatePinnedSavedDialogs, ok bool) { + if len(s) < 1 { + return + } + return s[len(s)-1], true +} + +// PopFirst returns first element of slice (if exists) and deletes it. +func (s *UpdatePinnedSavedDialogsArray) PopFirst() (v UpdatePinnedSavedDialogs, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[0] + + // Delete by index from SliceTricks. + copy(a[0:], a[1:]) + var zero UpdatePinnedSavedDialogs + a[len(a)-1] = zero + a = a[:len(a)-1] + *s = a + + return v, true +} + +// Pop returns last element of slice (if exists) and deletes it. +func (s *UpdatePinnedSavedDialogsArray) Pop() (v UpdatePinnedSavedDialogs, ok bool) { + if s == nil || len(*s) < 1 { + return + } + + a := *s + v = a[len(a)-1] + a = a[:len(a)-1] + *s = a + + return v, true +} diff --git a/vendor/github.com/jackc/pgtype/CHANGELOG.md b/vendor/github.com/jackc/pgtype/CHANGELOG.md index a362a1df..9e141f77 100644 --- a/vendor/github.com/jackc/pgtype/CHANGELOG.md +++ b/vendor/github.com/jackc/pgtype/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.14.1 (January 12, 2024) + +* Backport fix numeric to string conversion for small negative values +* Fix EncodeValueText (horpto) +* Fix JSON.UnmarshalJSON to make copy of byte slice (horpto) + # 1.14.0 (February 11, 2023) * Fix: BC timestamp text format support (jozeflami) diff --git a/vendor/github.com/jackc/pgtype/array.go b/vendor/github.com/jackc/pgtype/array.go index 174007c1..4c06686b 100644 --- a/vendor/github.com/jackc/pgtype/array.go +++ b/vendor/github.com/jackc/pgtype/array.go @@ -285,7 +285,7 @@ func arrayParseQuotedValue(buf *bytes.Buffer) (string, bool, error) { return "", false, err } case '"': - r, _, err = buf.ReadRune() + _, _, err = buf.ReadRune() if err != nil { return "", false, err } diff --git a/vendor/github.com/jackc/pgtype/composite_type.go b/vendor/github.com/jackc/pgtype/composite_type.go index 32e0aa26..c17d6a51 100644 --- a/vendor/github.com/jackc/pgtype/composite_type.go +++ b/vendor/github.com/jackc/pgtype/composite_type.go @@ -598,12 +598,10 @@ func (b *CompositeBinaryBuilder) Finish() ([]byte, error) { } type CompositeTextBuilder struct { - ci *ConnInfo - buf []byte - startIdx int - fieldCount uint32 - err error - fieldBuf [32]byte + ci *ConnInfo + buf []byte + err error + fieldBuf [32]byte } func NewCompositeTextBuilder(ci *ConnInfo, buf []byte) *CompositeTextBuilder { diff --git a/vendor/github.com/jackc/pgtype/convert.go b/vendor/github.com/jackc/pgtype/convert.go index 377fe3ea..305491c1 100644 --- a/vendor/github.com/jackc/pgtype/convert.go +++ b/vendor/github.com/jackc/pgtype/convert.go @@ -240,12 +240,7 @@ func int64AssignTo(srcVal int64, srcStatus Status, dst interface{}) error { } *v = int32(srcVal) case *int64: - if srcVal < math.MinInt64 { - return fmt.Errorf("%d is less than minimum value for int64", srcVal) - } else if srcVal > math.MaxInt64 { - return fmt.Errorf("%d is greater than maximum value for int64", srcVal) - } - *v = int64(srcVal) + *v = srcVal case *uint: if srcVal < 0 { return fmt.Errorf("%d is less than zero for uint", srcVal) @@ -262,7 +257,7 @@ func int64AssignTo(srcVal int64, srcStatus Status, dst interface{}) error { *v = uint8(srcVal) case *uint16: if srcVal < 0 { - return fmt.Errorf("%d is less than zero for uint32", srcVal) + return fmt.Errorf("%d is less than zero for uint16", srcVal) } else if srcVal > math.MaxUint16 { return fmt.Errorf("%d is greater than maximum value for uint16", srcVal) } diff --git a/vendor/github.com/jackc/pgtype/database_sql.go b/vendor/github.com/jackc/pgtype/database_sql.go index 9d1cf822..d0e36f84 100644 --- a/vendor/github.com/jackc/pgtype/database_sql.go +++ b/vendor/github.com/jackc/pgtype/database_sql.go @@ -30,7 +30,8 @@ func DatabaseSQLValue(ci *ConnInfo, src Value) (interface{}, error) { } func EncodeValueText(src TextEncoder) (interface{}, error) { - buf, err := src.EncodeText(nil, make([]byte, 0, 32)) + var encBuf [36]byte + buf, err := src.EncodeText(nil, encBuf[:0]) if err != nil { return nil, err } diff --git a/vendor/github.com/jackc/pgtype/hstore.go b/vendor/github.com/jackc/pgtype/hstore.go index e42b7551..e91f3da8 100644 --- a/vendor/github.com/jackc/pgtype/hstore.go +++ b/vendor/github.com/jackc/pgtype/hstore.go @@ -416,7 +416,7 @@ func parseHstore(s string) (k []string, v []Text, err error) { case end: err = errors.New("Found EOS after ',', expecting space") case (unicode.IsSpace(r)): - r, end = p.Consume() + p.Consume() state = hsKey default: err = fmt.Errorf("Invalid character '%c' after ', ', expecting \"", r) diff --git a/vendor/github.com/jackc/pgtype/int8.go b/vendor/github.com/jackc/pgtype/int8.go index 0e089979..1c1fca77 100644 --- a/vendor/github.com/jackc/pgtype/int8.go +++ b/vendor/github.com/jackc/pgtype/int8.go @@ -50,12 +50,6 @@ func (dst *Int8) Set(src interface{}) error { } *dst = Int8{Int: int64(value), Status: Present} case int: - if int64(value) < math.MinInt64 { - return fmt.Errorf("%d is greater than maximum value for Int8", value) - } - if int64(value) > math.MaxInt64 { - return fmt.Errorf("%d is greater than maximum value for Int8", value) - } *dst = Int8{Int: int64(value), Status: Present} case uint: if uint64(value) > math.MaxInt64 { diff --git a/vendor/github.com/jackc/pgtype/json.go b/vendor/github.com/jackc/pgtype/json.go index a9508bdd..0aa0805c 100644 --- a/vendor/github.com/jackc/pgtype/json.go +++ b/vendor/github.com/jackc/pgtype/json.go @@ -202,8 +202,9 @@ func (dst *JSON) UnmarshalJSON(b []byte) error { if b == nil || string(b) == "null" { *dst = JSON{Status: Null} } else { - *dst = JSON{Bytes: b, Status: Present} + bCopy := make([]byte, len(b)) + copy(bCopy, b) + *dst = JSON{Bytes: bCopy, Status: Present} } return nil - } diff --git a/vendor/github.com/jackc/pgtype/numeric.go b/vendor/github.com/jackc/pgtype/numeric.go index 1f32b36b..5999eaf5 100644 --- a/vendor/github.com/jackc/pgtype/numeric.go +++ b/vendor/github.com/jackc/pgtype/numeric.go @@ -448,11 +448,15 @@ func (src *Numeric) toFloat64() (float64, error) { return math.Inf(-1), nil } + if src.Exp == 1 { + return float64(src.Int.Int64()), nil + } + buf := make([]byte, 0, 32) - buf = append(buf, src.Int.String()...) + buf = src.Int.Append(buf, 10) buf = append(buf, 'e') - buf = append(buf, strconv.FormatInt(int64(src.Exp), 10)...) + buf = strconv.AppendInt(buf, int64(src.Exp), 10) f, err := strconv.ParseFloat(string(buf), 64) if err != nil { @@ -488,20 +492,20 @@ func (dst *Numeric) DecodeText(ci *ConnInfo, src []byte) error { } func parseNumericString(str string) (n *big.Int, exp int32, err error) { - parts := strings.SplitN(str, ".", 2) - digits := strings.Join(parts, "") + idx := strings.IndexByte(str, '.') - if len(parts) > 1 { - exp = int32(-len(parts[1])) - } else { - for len(digits) > 1 && digits[len(digits)-1] == '0' && digits[len(digits)-2] != '-' { - digits = digits[:len(digits)-1] + if idx == -1 { + for len(str) > 1 && str[len(str)-1] == '0' && str[len(str)-2] != '-' { + str = str[:len(str)-1] exp++ } + } else { + exp = int32(-(len(str) - idx - 1)) + str = str[:idx] + str[idx+1:] } accum := &big.Int{} - if _, ok := accum.SetString(digits, 10); !ok { + if _, ok := accum.SetString(str, 10); !ok { return nil, 0, fmt.Errorf("%s is not a number", str) } @@ -825,6 +829,12 @@ func encodeNumericText(n Numeric, buf []byte) (newBuf []byte, err error) { func (n Numeric) numberTextBytes() []byte { intStr := n.Int.String() buf := &bytes.Buffer{} + + if len(intStr) > 0 && intStr[:1] == "-" { + intStr = intStr[1:] + buf.WriteByte('-') + } + exp := int(n.Exp) if exp > 0 { buf.WriteString(intStr) diff --git a/vendor/github.com/jackc/pgtype/point.go b/vendor/github.com/jackc/pgtype/point.go index 0c799106..debc16e5 100644 --- a/vendor/github.com/jackc/pgtype/point.go +++ b/vendor/github.com/jackc/pgtype/point.go @@ -45,7 +45,7 @@ func (dst *Point) Set(src interface{}) error { } func parsePoint(src []byte) (*Point, error) { - if src == nil || bytes.Compare(src, []byte("null")) == 0 { + if src == nil || bytes.Equal(src, []byte("null")) { return &Point{Status: Null}, nil } diff --git a/vendor/github.com/jackc/pgtype/uuid.go b/vendor/github.com/jackc/pgtype/uuid.go index 6839c052..03cf23b2 100644 --- a/vendor/github.com/jackc/pgtype/uuid.go +++ b/vendor/github.com/jackc/pgtype/uuid.go @@ -84,7 +84,7 @@ func (src *UUID) AssignTo(dst interface{}) error { copy(*v, src.Bytes[:]) return nil case *string: - *v = encodeUUID(src.Bytes) + *v = string(encodeUUID(src.Bytes)) return nil default: if nextDst, retry := GetAssignToDstType(v); retry { @@ -100,28 +100,48 @@ func (src *UUID) AssignTo(dst interface{}) error { // parseUUID converts a string UUID in standard form to a byte array. func parseUUID(src string) (dst [16]byte, err error) { + var uuidBuf [32]byte + srcBuf := uuidBuf[:] + switch len(src) { case 36: - src = src[0:8] + src[9:13] + src[14:18] + src[19:23] + src[24:] + copy(srcBuf[0:8], src[:8]) + copy(srcBuf[8:12], src[9:13]) + copy(srcBuf[12:16], src[14:18]) + copy(srcBuf[16:20], src[19:23]) + copy(srcBuf[20:], src[24:]) case 32: // dashes already stripped, assume valid + copy(srcBuf, src) + default: // assume invalid. return dst, fmt.Errorf("cannot parse UUID %v", src) } - buf, err := hex.DecodeString(src) + _, err = hex.Decode(dst[:], srcBuf) if err != nil { return dst, err } - - copy(dst[:], buf) return dst, err } // encodeUUID converts a uuid byte array to UUID standard string form. -func encodeUUID(src [16]byte) string { - return fmt.Sprintf("%x-%x-%x-%x-%x", src[0:4], src[4:6], src[6:8], src[8:10], src[10:16]) +func encodeUUID(src [16]byte) (dst []byte) { + var buf [36]byte + dst = buf[:] + + hex.Encode(dst, src[:4]) + buf[8] = '-' + hex.Encode(dst[9:13], src[4:6]) + buf[13] = '-' + hex.Encode(dst[14:18], src[6:8]) + buf[18] = '-' + hex.Encode(dst[19:23], src[8:10]) + buf[23] = '-' + hex.Encode(dst[24:], src[10:]) + + return } func (dst *UUID) DecodeText(ci *ConnInfo, src []byte) error { @@ -209,7 +229,7 @@ func (src UUID) MarshalJSON() ([]byte, error) { case Present: var buff bytes.Buffer buff.WriteByte('"') - buff.WriteString(encodeUUID(src.Bytes)) + buff.Write(encodeUUID(src.Bytes)) buff.WriteByte('"') return buff.Bytes(), nil case Null: @@ -221,7 +241,7 @@ func (src UUID) MarshalJSON() ([]byte, error) { } func (dst *UUID) UnmarshalJSON(src []byte) error { - if bytes.Compare(src, []byte("null")) == 0 { + if bytes.Equal(src, []byte("null")) { return dst.Set(nil) } if len(src) != 38 { diff --git a/vendor/github.com/jackc/pgx/v5/CHANGELOG.md b/vendor/github.com/jackc/pgx/v5/CHANGELOG.md index f5612277..6469c183 100644 --- a/vendor/github.com/jackc/pgx/v5/CHANGELOG.md +++ b/vendor/github.com/jackc/pgx/v5/CHANGELOG.md @@ -1,3 +1,14 @@ +# 5.5.2 (January 13, 2024) + +* Allow NamedArgs to start with underscore +* pgproto3: Maximum message body length support (jeremy.spriet) +* Upgrade golang.org/x/crypto to v0.17.0 +* Add snake_case support to RowToStructByName (Tikhon Fedulov) +* Fix: update description cache after exec prepare (James Hartig) +* Fix: pipeline checks if it is closed (James Hartig and Ryan Fowler) +* Fix: normalize timeout / context errors during TLS startup (Samuel Stauffer) +* Add OnPgError for easier centralized error handling (James Hartig) + # 5.5.1 (December 9, 2023) * Add CopyFromFunc helper function. (robford) diff --git a/vendor/github.com/jackc/pgx/v5/conn.go b/vendor/github.com/jackc/pgx/v5/conn.go index d85cf127..64ae48ca 100644 --- a/vendor/github.com/jackc/pgx/v5/conn.go +++ b/vendor/github.com/jackc/pgx/v5/conn.go @@ -513,6 +513,7 @@ optionLoop: if err != nil { return pgconn.CommandTag{}, err } + c.descriptionCache.Put(sd) } return c.execParams(ctx, sd, arguments) diff --git a/vendor/github.com/jackc/pgx/v5/doc.go b/vendor/github.com/jackc/pgx/v5/doc.go index 7486f42c..db99fc4c 100644 --- a/vendor/github.com/jackc/pgx/v5/doc.go +++ b/vendor/github.com/jackc/pgx/v5/doc.go @@ -187,7 +187,7 @@ implemented on top of pgconn. The Conn.PgConn() method can be used to access thi PgBouncer -By default pgx automatically uses prepared statements. Prepared statements are incompaptible with PgBouncer. This can be +By default pgx automatically uses prepared statements. Prepared statements are incompatible with PgBouncer. This can be disabled by setting a different QueryExecMode in ConnConfig.DefaultQueryExecMode. */ package pgx diff --git a/vendor/github.com/jackc/pgx/v5/large_objects.go b/vendor/github.com/jackc/pgx/v5/large_objects.go index c238ab9c..67666745 100644 --- a/vendor/github.com/jackc/pgx/v5/large_objects.go +++ b/vendor/github.com/jackc/pgx/v5/large_objects.go @@ -67,6 +67,10 @@ type LargeObject struct { } // Write writes p to the large object and returns the number of bytes written and an error if not all of p was written. +// +// Write is implemented with a single call to lowrite. The PostgreSQL wire protocol has a limit of 1 GB - 1 per message. +// See definition of PQ_LARGE_MESSAGE_LIMIT in the PostgreSQL source code. To allow for the other data in the message, +// len(p) should be no larger than 1 GB - 1 KB. func (o *LargeObject) Write(p []byte) (int, error) { var n int err := o.tx.QueryRow(o.ctx, "select lowrite($1, $2)", o.fd, p).Scan(&n) @@ -82,6 +86,10 @@ func (o *LargeObject) Write(p []byte) (int, error) { } // Read reads up to len(p) bytes into p returning the number of bytes read. +// +// Read is implemented with a single call to loread. PostgreSQL internally allocates a single buffer for the response. +// The largest buffer PostgreSQL will allocate is 1 GB - 1. See definition of MaxAllocSize in the PostgreSQL source +// code. To allow for the other data in the message, len(p) should be no larger than 1 GB - 1 KB. func (o *LargeObject) Read(p []byte) (int, error) { var res []byte err := o.tx.QueryRow(o.ctx, "select loread($1, $2)", o.fd, len(p)).Scan(&res) diff --git a/vendor/github.com/jackc/pgx/v5/named_args.go b/vendor/github.com/jackc/pgx/v5/named_args.go index 1bc32337..8367fc63 100644 --- a/vendor/github.com/jackc/pgx/v5/named_args.go +++ b/vendor/github.com/jackc/pgx/v5/named_args.go @@ -14,6 +14,9 @@ import ( // // conn.Query(ctx, "select * from widgets where foo = @foo and bar = @bar", pgx.NamedArgs{"foo": 1, "bar": 2}) // conn.Query(ctx, "select * from widgets where foo = $1 and bar = $2", 1, 2) +// +// Named placeholders are case sensitive and must start with a letter or underscore. Subsequent characters can be +// letters, numbers, or underscores. type NamedArgs map[string]any // RewriteQuery implements the QueryRewriter interface. @@ -80,7 +83,7 @@ func rawState(l *sqlLexer) stateFn { return doubleQuoteState case '@': nextRune, _ := utf8.DecodeRuneInString(l.src[l.pos:]) - if isLetter(nextRune) { + if isLetter(nextRune) || nextRune == '_' { if l.pos-l.start > 0 { l.parts = append(l.parts, l.src[l.start:l.pos-width]) } diff --git a/vendor/github.com/jackc/pgx/v5/pgconn/config.go b/vendor/github.com/jackc/pgx/v5/pgconn/config.go index db0170e0..ddde89bd 100644 --- a/vendor/github.com/jackc/pgx/v5/pgconn/config.go +++ b/vendor/github.com/jackc/pgx/v5/pgconn/config.go @@ -60,6 +60,11 @@ type Config struct { // OnNotification is a callback function called when a notification from the LISTEN/NOTIFY system is received. OnNotification NotificationHandler + // OnPgError is a callback function called when a Postgres error is received by the server. The default handler will close + // the connection on any FATAL errors. If you override this handler you should call the previously set handler or ensure + // that you close on FATAL errors by returning false. + OnPgError PgErrorHandler + createdByParseConfig bool // Used to enforce created by ParseConfig rule. } @@ -232,12 +237,12 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con if strings.HasPrefix(connString, "postgres://") || strings.HasPrefix(connString, "postgresql://") { connStringSettings, err = parseURLSettings(connString) if err != nil { - return nil, &parseConfigError{connString: connString, msg: "failed to parse as URL", err: err} + return nil, &ParseConfigError{ConnString: connString, msg: "failed to parse as URL", err: err} } } else { connStringSettings, err = parseDSNSettings(connString) if err != nil { - return nil, &parseConfigError{connString: connString, msg: "failed to parse as DSN", err: err} + return nil, &ParseConfigError{ConnString: connString, msg: "failed to parse as DSN", err: err} } } } @@ -246,7 +251,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con if service, present := settings["service"]; present { serviceSettings, err := parseServiceSettings(settings["servicefile"], service) if err != nil { - return nil, &parseConfigError{connString: connString, msg: "failed to read service", err: err} + return nil, &ParseConfigError{ConnString: connString, msg: "failed to read service", err: err} } settings = mergeSettings(defaultSettings, envSettings, serviceSettings, connStringSettings) @@ -261,12 +266,19 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con BuildFrontend: func(r io.Reader, w io.Writer) *pgproto3.Frontend { return pgproto3.NewFrontend(r, w) }, + OnPgError: func(_ *PgConn, pgErr *PgError) bool { + // we want to automatically close any fatal errors + if strings.EqualFold(pgErr.Severity, "FATAL") { + return false + } + return true + }, } if connectTimeoutSetting, present := settings["connect_timeout"]; present { connectTimeout, err := parseConnectTimeoutSetting(connectTimeoutSetting) if err != nil { - return nil, &parseConfigError{connString: connString, msg: "invalid connect_timeout", err: err} + return nil, &ParseConfigError{ConnString: connString, msg: "invalid connect_timeout", err: err} } config.ConnectTimeout = connectTimeout config.DialFunc = makeConnectTimeoutDialFunc(connectTimeout) @@ -328,7 +340,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con port, err := parsePort(portStr) if err != nil { - return nil, &parseConfigError{connString: connString, msg: "invalid port", err: err} + return nil, &ParseConfigError{ConnString: connString, msg: "invalid port", err: err} } var tlsConfigs []*tls.Config @@ -340,7 +352,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con var err error tlsConfigs, err = configTLS(settings, host, options) if err != nil { - return nil, &parseConfigError{connString: connString, msg: "failed to configure TLS", err: err} + return nil, &ParseConfigError{ConnString: connString, msg: "failed to configure TLS", err: err} } } @@ -384,7 +396,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con case "any": // do nothing default: - return nil, &parseConfigError{connString: connString, msg: fmt.Sprintf("unknown target_session_attrs value: %v", tsa)} + return nil, &ParseConfigError{ConnString: connString, msg: fmt.Sprintf("unknown target_session_attrs value: %v", tsa)} } return config, nil diff --git a/vendor/github.com/jackc/pgx/v5/pgconn/errors.go b/vendor/github.com/jackc/pgx/v5/pgconn/errors.go index 3c54bbec..c315739a 100644 --- a/vendor/github.com/jackc/pgx/v5/pgconn/errors.go +++ b/vendor/github.com/jackc/pgx/v5/pgconn/errors.go @@ -57,22 +57,23 @@ func (pe *PgError) SQLState() string { return pe.Code } -type connectError struct { - config *Config +// ConnectError is the error returned when a connection attempt fails. +type ConnectError struct { + Config *Config // The configuration that was used in the connection attempt. msg string err error } -func (e *connectError) Error() string { +func (e *ConnectError) Error() string { sb := &strings.Builder{} - fmt.Fprintf(sb, "failed to connect to `host=%s user=%s database=%s`: %s", e.config.Host, e.config.User, e.config.Database, e.msg) + fmt.Fprintf(sb, "failed to connect to `host=%s user=%s database=%s`: %s", e.Config.Host, e.Config.User, e.Config.Database, e.msg) if e.err != nil { fmt.Fprintf(sb, " (%s)", e.err.Error()) } return sb.String() } -func (e *connectError) Unwrap() error { +func (e *ConnectError) Unwrap() error { return e.err } @@ -88,33 +89,38 @@ func (e *connLockError) Error() string { return e.status } -type parseConfigError struct { - connString string +// ParseConfigError is the error returned when a connection string cannot be parsed. +type ParseConfigError struct { + ConnString string // The connection string that could not be parsed. msg string err error } -func (e *parseConfigError) Error() string { - connString := redactPW(e.connString) +func (e *ParseConfigError) Error() string { + // Now that ParseConfigError is public and ConnString is available to the developer, perhaps it would be better only + // return a static string. That would ensure that the error message cannot leak a password. The ConnString field would + // allow access to the original string if desired and Unwrap would allow access to the underlying error. + connString := redactPW(e.ConnString) if e.err == nil { return fmt.Sprintf("cannot parse `%s`: %s", connString, e.msg) } return fmt.Sprintf("cannot parse `%s`: %s (%s)", connString, e.msg, e.err.Error()) } -func (e *parseConfigError) Unwrap() error { +func (e *ParseConfigError) Unwrap() error { return e.err } func normalizeTimeoutError(ctx context.Context, err error) error { - if err, ok := err.(net.Error); ok && err.Timeout() { + var netErr net.Error + if errors.As(err, &netErr) && netErr.Timeout() { if ctx.Err() == context.Canceled { // Since the timeout was caused by a context cancellation, the actual error is context.Canceled not the timeout error. return context.Canceled } else if ctx.Err() == context.DeadlineExceeded { return &errTimeout{err: ctx.Err()} } else { - return &errTimeout{err: err} + return &errTimeout{err: netErr} } } return err diff --git a/vendor/github.com/jackc/pgx/v5/pgconn/pgconn.go b/vendor/github.com/jackc/pgx/v5/pgconn/pgconn.go index 1ccdc4db..b287e020 100644 --- a/vendor/github.com/jackc/pgx/v5/pgconn/pgconn.go +++ b/vendor/github.com/jackc/pgx/v5/pgconn/pgconn.go @@ -52,6 +52,12 @@ type LookupFunc func(ctx context.Context, host string) (addrs []string, err erro // BuildFrontendFunc is a function that can be used to create Frontend implementation for connection. type BuildFrontendFunc func(r io.Reader, w io.Writer) *pgproto3.Frontend +// PgErrorHandler is a function that handles errors returned from Postgres. This function must return true to keep +// the connection open. Returning false will cause the connection to be closed immediately. You should return +// false on any FATAL-severity errors. This will not receive network errors. The *PgConn is provided so the handler is +// aware of the origin of the error, but it must not invoke any query method. +type PgErrorHandler func(*PgConn, *PgError) bool + // NoticeHandler is a function that can handle notices received from the PostgreSQL server. Notices can be received at // any time, usually during handling of a query response. The *PgConn is provided so the handler is aware of the origin // of the notice, but it must not invoke any query method. Be aware that this is distinct from LISTEN/NOTIFY @@ -146,11 +152,11 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er ctx := octx fallbackConfigs, err = expandWithIPs(ctx, config.LookupFunc, fallbackConfigs) if err != nil { - return nil, &connectError{config: config, msg: "hostname resolving error", err: err} + return nil, &ConnectError{Config: config, msg: "hostname resolving error", err: err} } if len(fallbackConfigs) == 0 { - return nil, &connectError{config: config, msg: "hostname resolving error", err: errors.New("ip addr wasn't found")} + return nil, &ConnectError{Config: config, msg: "hostname resolving error", err: errors.New("ip addr wasn't found")} } foundBestServer := false @@ -172,7 +178,7 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er foundBestServer = true break } else if pgerr, ok := err.(*PgError); ok { - err = &connectError{config: config, msg: "server error", err: pgerr} + err = &ConnectError{Config: config, msg: "server error", err: pgerr} const ERRCODE_INVALID_PASSWORD = "28P01" // wrong password const ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION = "28000" // wrong password or bad pg_hba.conf settings const ERRCODE_INVALID_CATALOG_NAME = "3D000" // db does not exist @@ -183,7 +189,7 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er pgerr.Code == ERRCODE_INSUFFICIENT_PRIVILEGE { break } - } else if cerr, ok := err.(*connectError); ok { + } else if cerr, ok := err.(*ConnectError); ok { if _, ok := cerr.err.(*NotPreferredError); ok { fallbackConfig = fc } @@ -193,7 +199,7 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er if !foundBestServer && fallbackConfig != nil { pgConn, err = connect(ctx, config, fallbackConfig, true) if pgerr, ok := err.(*PgError); ok { - err = &connectError{config: config, msg: "server error", err: pgerr} + err = &ConnectError{Config: config, msg: "server error", err: pgerr} } } @@ -205,7 +211,7 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er err := config.AfterConnect(ctx, pgConn) if err != nil { pgConn.conn.Close() - return nil, &connectError{config: config, msg: "AfterConnect error", err: err} + return nil, &ConnectError{Config: config, msg: "AfterConnect error", err: err} } } @@ -277,7 +283,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig network, address := NetworkAddress(fallbackConfig.Host, fallbackConfig.Port) netConn, err := config.DialFunc(ctx, network, address) if err != nil { - return nil, &connectError{config: config, msg: "dial error", err: normalizeTimeoutError(ctx, err)} + return nil, &ConnectError{Config: config, msg: "dial error", err: normalizeTimeoutError(ctx, err)} } pgConn.conn = netConn @@ -289,7 +295,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig pgConn.contextWatcher.Unwatch() // Always unwatch `netConn` after TLS. if err != nil { netConn.Close() - return nil, &connectError{config: config, msg: "tls error", err: err} + return nil, &ConnectError{Config: config, msg: "tls error", err: normalizeTimeoutError(ctx, err)} } pgConn.conn = nbTLSConn @@ -330,7 +336,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig pgConn.frontend.Send(&startupMsg) if err := pgConn.flushWithPotentialWriteReadDeadlock(); err != nil { pgConn.conn.Close() - return nil, &connectError{config: config, msg: "failed to write startup message", err: normalizeTimeoutError(ctx, err)} + return nil, &ConnectError{Config: config, msg: "failed to write startup message", err: normalizeTimeoutError(ctx, err)} } for { @@ -340,7 +346,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig if err, ok := err.(*PgError); ok { return nil, err } - return nil, &connectError{config: config, msg: "failed to receive message", err: normalizeTimeoutError(ctx, err)} + return nil, &ConnectError{Config: config, msg: "failed to receive message", err: normalizeTimeoutError(ctx, err)} } switch msg := msg.(type) { @@ -353,26 +359,26 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig err = pgConn.txPasswordMessage(pgConn.config.Password) if err != nil { pgConn.conn.Close() - return nil, &connectError{config: config, msg: "failed to write password message", err: err} + return nil, &ConnectError{Config: config, msg: "failed to write password message", err: err} } case *pgproto3.AuthenticationMD5Password: digestedPassword := "md5" + hexMD5(hexMD5(pgConn.config.Password+pgConn.config.User)+string(msg.Salt[:])) err = pgConn.txPasswordMessage(digestedPassword) if err != nil { pgConn.conn.Close() - return nil, &connectError{config: config, msg: "failed to write password message", err: err} + return nil, &ConnectError{Config: config, msg: "failed to write password message", err: err} } case *pgproto3.AuthenticationSASL: err = pgConn.scramAuth(msg.AuthMechanisms) if err != nil { pgConn.conn.Close() - return nil, &connectError{config: config, msg: "failed SASL auth", err: err} + return nil, &ConnectError{Config: config, msg: "failed SASL auth", err: err} } case *pgproto3.AuthenticationGSS: err = pgConn.gssAuth() if err != nil { pgConn.conn.Close() - return nil, &connectError{config: config, msg: "failed GSS auth", err: err} + return nil, &ConnectError{Config: config, msg: "failed GSS auth", err: err} } case *pgproto3.ReadyForQuery: pgConn.status = connStatusIdle @@ -390,7 +396,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig return pgConn, nil } pgConn.conn.Close() - return nil, &connectError{config: config, msg: "ValidateConnect failed", err: err} + return nil, &ConnectError{Config: config, msg: "ValidateConnect failed", err: err} } } return pgConn, nil @@ -401,7 +407,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig return nil, ErrorResponseToPgError(msg) default: pgConn.conn.Close() - return nil, &connectError{config: config, msg: "received unexpected message", err: err} + return nil, &ConnectError{Config: config, msg: "received unexpected message", err: err} } } } @@ -547,11 +553,12 @@ func (pgConn *PgConn) receiveMessage() (pgproto3.BackendMessage, error) { case *pgproto3.ParameterStatus: pgConn.parameterStatuses[msg.Name] = msg.Value case *pgproto3.ErrorResponse: - if msg.Severity == "FATAL" { + err := ErrorResponseToPgError(msg) + if pgConn.config.OnPgError != nil && !pgConn.config.OnPgError(pgConn, err) { pgConn.status = connStatusClosed pgConn.conn.Close() // Ignore error as the connection is already broken and there is already an error to return. close(pgConn.cleanupDone) - return nil, ErrorResponseToPgError(msg) + return nil, err } case *pgproto3.NoticeResponse: if pgConn.config.OnNotice != nil { @@ -2046,6 +2053,13 @@ func (p *Pipeline) Flush() error { // Sync establishes a synchronization point and flushes the queued requests. func (p *Pipeline) Sync() error { + if p.closed { + if p.err != nil { + return p.err + } + return errors.New("pipeline closed") + } + p.conn.frontend.SendSync(&pgproto3.Sync{}) err := p.Flush() if err != nil { @@ -2062,10 +2076,21 @@ func (p *Pipeline) Sync() error { // *PipelineSync. If an ErrorResponse is received from the server, results will be nil and err will be a *PgError. If no // results are available, results and err will both be nil. func (p *Pipeline) GetResults() (results any, err error) { + if p.closed { + if p.err != nil { + return nil, p.err + } + return nil, errors.New("pipeline closed") + } + if p.expectedReadyForQueryCount == 0 { return nil, nil } + return p.getResults() +} + +func (p *Pipeline) getResults() (results any, err error) { for { msg, err := p.conn.receiveMessage() if err != nil { @@ -2092,7 +2117,8 @@ func (p *Pipeline) GetResults() (results any, err error) { case *pgproto3.ParseComplete: peekedMsg, err := p.conn.peekMessage() if err != nil { - return nil, err + p.conn.asyncClose() + return nil, normalizeTimeoutError(p.ctx, err) } if _, ok := peekedMsg.(*pgproto3.ParameterDescription); ok { return p.getResultsPrepare() @@ -2152,6 +2178,7 @@ func (p *Pipeline) Close() error { if p.closed { return p.err } + p.closed = true if p.pendingSync { @@ -2164,7 +2191,7 @@ func (p *Pipeline) Close() error { } for p.expectedReadyForQueryCount > 0 { - _, err := p.GetResults() + _, err := p.getResults() if err != nil { p.err = err var pgErr *PgError diff --git a/vendor/github.com/jackc/pgx/v5/pgproto3/backend.go b/vendor/github.com/jackc/pgx/v5/pgproto3/backend.go index 6db77e4a..efa909c3 100644 --- a/vendor/github.com/jackc/pgx/v5/pgproto3/backend.go +++ b/vendor/github.com/jackc/pgx/v5/pgproto3/backend.go @@ -38,6 +38,7 @@ type Backend struct { terminate Terminate bodyLen int + maxBodyLen int // maxBodyLen is the maximum length of a message body in octets. If a message body exceeds this length, Receive will return an error. msgType byte partialMsg bool authType uint32 @@ -158,6 +159,9 @@ func (b *Backend) Receive() (FrontendMessage, error) { b.msgType = header[0] b.bodyLen = int(binary.BigEndian.Uint32(header[1:])) - 4 + if b.maxBodyLen > 0 && b.bodyLen > b.maxBodyLen { + return nil, &ExceededMaxBodyLenErr{b.maxBodyLen, b.bodyLen} + } b.partialMsg = true } @@ -260,3 +264,12 @@ func (b *Backend) SetAuthType(authType uint32) error { return nil } + +// SetMaxBodyLen sets the maximum length of a message body in octets. If a message body exceeds this length, Receive will return +// an error. This is useful for protecting against malicious clients that send large messages with the intent of +// causing memory exhaustion. +// The default value is 0. +// If maxBodyLen is 0, then no maximum is enforced. +func (b *Backend) SetMaxBodyLen(maxBodyLen int) { + b.maxBodyLen = maxBodyLen +} diff --git a/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go b/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go index ef5a5489..8df383c2 100644 --- a/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go +++ b/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go @@ -70,6 +70,15 @@ func (e *writeError) Unwrap() error { return e.err } +type ExceededMaxBodyLenErr struct { + MaxExpectedBodyLen int + ActualBodyLen int +} + +func (e *ExceededMaxBodyLenErr) Error() string { + return fmt.Sprintf("invalid body length: expected at most %d, but got %d", e.MaxExpectedBodyLen, e.ActualBodyLen) +} + // getValueFromJSON gets the value from a protocol message representation in JSON. func getValueFromJSON(v map[string]string) ([]byte, error) { if v == nil { diff --git a/vendor/github.com/jackc/pgx/v5/rows.go b/vendor/github.com/jackc/pgx/v5/rows.go index 73efffa0..1ad91765 100644 --- a/vendor/github.com/jackc/pgx/v5/rows.go +++ b/vendor/github.com/jackc/pgx/v5/rows.go @@ -667,7 +667,12 @@ const structTagKey = "db" func fieldPosByName(fldDescs []pgconn.FieldDescription, field string) (i int) { i = -1 for i, desc := range fldDescs { - if strings.EqualFold(desc.Name, field) { + + // Snake case support. + field = strings.ReplaceAll(field, "_", "") + descName := strings.ReplaceAll(desc.Name, "_", "") + + if strings.EqualFold(descName, field) { return i } } diff --git a/vendor/github.com/jackc/pgx/v5/stdlib/sql.go b/vendor/github.com/jackc/pgx/v5/stdlib/sql.go index 86a4c932..3d65e23a 100644 --- a/vendor/github.com/jackc/pgx/v5/stdlib/sql.go +++ b/vendor/github.com/jackc/pgx/v5/stdlib/sql.go @@ -21,10 +21,7 @@ // return err // } // -// db, err := stdlib.OpenDBFromPool(pool) -// if err != nil { -// return err -// } +// db := stdlib.OpenDBFromPool(pool) // // Or a pgx.ConnConfig can be used to set configuration not accessible via connection string. In this case the // pgx.ConnConfig must first be registered with the driver. This registration returns a connection string which is used diff --git a/vendor/github.com/nats-io/nats.go/.golangci.yaml b/vendor/github.com/nats-io/nats.go/.golangci.yaml index be66189e..fb548e50 100644 --- a/vendor/github.com/nats-io/nats.go/.golangci.yaml +++ b/vendor/github.com/nats-io/nats.go/.golangci.yaml @@ -5,6 +5,9 @@ issues: - linters: - errcheck text: "Unsubscribe" + - linters: + - errcheck + text: "Drain" - linters: - errcheck text: "msg.Ack" diff --git a/vendor/github.com/nats-io/nats.go/README.md b/vendor/github.com/nats-io/nats.go/README.md index 042733da..d7f2e00d 100644 --- a/vendor/github.com/nats-io/nats.go/README.md +++ b/vendor/github.com/nats-io/nats.go/README.md @@ -14,6 +14,8 @@ A [Go](http://golang.org) client for the [NATS messaging system](https://nats.io [Coverage-Url]: https://coveralls.io/r/nats-io/nats.go?branch=main [Coverage-image]: https://coveralls.io/repos/github/nats-io/nats.go/badge.svg?branch=main +**Check out [NATS by example](https://natsbyexample.com) - An evolving collection of runnable, cross-client reference examples for NATS.** + ## Installation ```bash @@ -29,7 +31,7 @@ When using or transitioning to Go modules support: ```bash # Go client latest or explicit version go get github.com/nats-io/nats.go/@latest -go get github.com/nats-io/nats.go/@v1.31.0 +go get github.com/nats-io/nats.go/@v1.32.0 # For latest NATS Server, add /v2 at the end go get github.com/nats-io/nats-server/v2 diff --git a/vendor/github.com/nats-io/nats.go/context.go b/vendor/github.com/nats-io/nats.go/context.go index c4ef4be1..20f1782a 100644 --- a/vendor/github.com/nats-io/nats.go/context.go +++ b/vendor/github.com/nats-io/nats.go/context.go @@ -1,4 +1,4 @@ -// Copyright 2016-2022 The NATS Authors +// Copyright 2016-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/enc.go b/vendor/github.com/nats-io/nats.go/enc.go index a1c54f24..4550f618 100644 --- a/vendor/github.com/nats-io/nats.go/enc.go +++ b/vendor/github.com/nats-io/nats.go/enc.go @@ -1,4 +1,4 @@ -// Copyright 2012-2019 The NATS Authors +// Copyright 2012-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go b/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go index 65c2d68b..7e729637 100644 --- a/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go +++ b/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go @@ -1,4 +1,4 @@ -// Copyright 2012-2018 The NATS Authors +// Copyright 2012-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go b/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go index 4e7cecba..7ecf85e4 100644 --- a/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go +++ b/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go @@ -1,4 +1,4 @@ -// Copyright 2013-2018 The NATS Authors +// Copyright 2013-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go b/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go index 9b6ffc01..0540d985 100644 --- a/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go +++ b/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go @@ -1,4 +1,4 @@ -// Copyright 2012-2018 The NATS Authors +// Copyright 2012-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/go_test.mod b/vendor/github.com/nats-io/nats.go/go_test.mod index 8902c1ed..d28963c2 100644 --- a/vendor/github.com/nats-io/nats.go/go_test.mod +++ b/vendor/github.com/nats-io/nats.go/go_test.mod @@ -4,19 +4,19 @@ go 1.19 require ( github.com/golang/protobuf v1.4.2 - github.com/klauspost/compress v1.17.0 - github.com/nats-io/nats-server/v2 v2.10.0 - github.com/nats-io/nkeys v0.4.5 + github.com/klauspost/compress v1.17.4 + github.com/nats-io/nats-server/v2 v2.10.7 + github.com/nats-io/nkeys v0.4.6 github.com/nats-io/nuid v1.0.1 go.uber.org/goleak v1.2.1 - golang.org/x/text v0.13.0 + golang.org/x/text v0.14.0 google.golang.org/protobuf v1.23.0 ) require ( github.com/minio/highwayhash v1.0.2 // indirect - github.com/nats-io/jwt/v2 v2.5.2 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/time v0.3.0 // indirect + github.com/nats-io/jwt/v2 v2.5.3 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/time v0.5.0 // indirect ) diff --git a/vendor/github.com/nats-io/nats.go/go_test.sum b/vendor/github.com/nats-io/nats.go/go_test.sum index ce4ba920..38fe6ef6 100644 --- a/vendor/github.com/nats-io/nats.go/go_test.sum +++ b/vendor/github.com/nats-io/nats.go/go_test.sum @@ -10,32 +10,31 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/nats-io/jwt/v2 v2.5.2 h1:DhGH+nKt+wIkDxM6qnVSKjokq5t59AZV5HRcFW0zJwU= -github.com/nats-io/jwt/v2 v2.5.2/go.mod h1:24BeQtRwxRV8ruvC4CojXlx/WQ/VjuwlYiH+vu/+ibI= -github.com/nats-io/nats-server/v2 v2.10.0 h1:rcU++Hzo+wARxtJugrV3J5z5iGdHeVG8tT8Chb3bKDg= -github.com/nats-io/nats-server/v2 v2.10.0/go.mod h1:3PMvMSu2cuK0J9YInRLWdFpFsswKKGUS77zVSAudRto= -github.com/nats-io/nkeys v0.4.5 h1:Zdz2BUlFm4fJlierwvGK+yl20IAKUm7eV6AAZXEhkPk= -github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= +github.com/nats-io/jwt/v2 v2.5.3 h1:/9SWvzc6hTfamcgXJ3uYRpgj+QuY2aLNqRiqrKcrpEo= +github.com/nats-io/jwt/v2 v2.5.3/go.mod h1:iysuPemFcc7p4IoYots3IuELSI4EDe9Y0bQMe+I3Bf4= +github.com/nats-io/nats-server/v2 v2.10.7 h1:f5VDy+GMu7JyuFA0Fef+6TfulfCs5nBTgq7MMkFJx5Y= +github.com/nats-io/nats-server/v2 v2.10.7/go.mod h1:V2JHOvPiPdtfDXTuEUsthUnCvSDeFrK4Xn9hRo6du7c= +github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY= +github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/vendor/github.com/nats-io/nats.go/js.go b/vendor/github.com/nats-io/nats.go/js.go index 444278e0..0c067305 100644 --- a/vendor/github.com/nats-io/nats.go/js.go +++ b/vendor/github.com/nats-io/nats.go/js.go @@ -227,14 +227,16 @@ type js struct { opts *jsOpts // For async publish context. - mu sync.RWMutex - rpre string - rsub *Subscription - pafs map[string]*pubAckFuture - stc chan struct{} - dch chan struct{} - rr *rand.Rand - connStatusCh chan (Status) + mu sync.RWMutex + rpre string + rsub *Subscription + pafs map[string]*pubAckFuture + stc chan struct{} + dch chan struct{} + rr *rand.Rand + connStatusCh chan (Status) + replyPrefix string + replyPrefixLen int } type jsOpts struct { @@ -283,6 +285,12 @@ func (nc *Conn) JetStream(opts ...JSOpt) (JetStreamContext, error) { maxpa: defaultAsyncPubAckInflight, }, } + inboxPrefix := InboxPrefix + if js.nc.Opts.InboxPrefix != _EMPTY_ { + inboxPrefix = js.nc.Opts.InboxPrefix + "." + } + js.replyPrefix = inboxPrefix + js.replyPrefixLen = len(js.replyPrefix) + aReplyTokensize + 1 for _, opt := range opts { if err := opt.configureJSContext(js.opts); err != nil { @@ -537,7 +545,7 @@ func (js *js) PublishMsg(m *Msg, opts ...PubOpt) (*PubAck, error) { } if err != nil { - for r, ttl := 0, o.ttl; err == ErrNoResponders && (r < o.rnum || o.rnum < 0); r++ { + for r, ttl := 0, o.ttl; errors.Is(err, ErrNoResponders) && (r < o.rnum || o.rnum < 0); r++ { // To protect against small blips in leadership changes etc, if we get a no responders here retry. if o.ctx != nil { select { @@ -559,7 +567,7 @@ func (js *js) PublishMsg(m *Msg, opts ...PubOpt) (*PubAck, error) { } } if err != nil { - if err == ErrNoResponders { + if errors.Is(err, ErrNoResponders) { err = ErrNoStreamResponse } return nil, err @@ -641,7 +649,6 @@ func (paf *pubAckFuture) Msg() *Msg { } // For quick token lookup etc. -const aReplyPreLen = 14 const aReplyTokensize = 6 func (js *js) newAsyncReply() string { @@ -654,11 +661,7 @@ func (js *js) newAsyncReply() string { for i := 0; i < aReplyTokensize; i++ { b[i] = rdigits[int(b[i]%base)] } - inboxPrefix := InboxPrefix - if js.nc.Opts.InboxPrefix != _EMPTY_ { - inboxPrefix = js.nc.Opts.InboxPrefix + "." - } - js.rpre = fmt.Sprintf("%s%s.", inboxPrefix, b[:aReplyTokensize]) + js.rpre = fmt.Sprintf("%s%s.", js.replyPrefix, b[:aReplyTokensize]) sub, err := js.nc.Subscribe(fmt.Sprintf("%s*", js.rpre), js.handleAsyncReply) if err != nil { js.mu.Unlock() @@ -767,10 +770,10 @@ func (js *js) asyncStall() <-chan struct{} { // Handle an async reply from PublishAsync. func (js *js) handleAsyncReply(m *Msg) { - if len(m.Subject) <= aReplyPreLen { + if len(m.Subject) <= js.replyPrefixLen { return } - id := m.Subject[aReplyPreLen:] + id := m.Subject[js.replyPrefixLen:] js.mu.Lock() paf := js.getPAF(id) @@ -916,7 +919,7 @@ func (js *js) PublishMsgAsync(m *Msg, opts ...PubOpt) (PubAckFuture, error) { return nil, errors.New("nats: error creating async reply handler") } - id := m.Reply[aReplyPreLen:] + id := m.Reply[js.replyPrefixLen:] paf := &pubAckFuture{msg: m, st: time.Now()} numPending, maxPending := js.registerPAF(id, paf) @@ -1241,6 +1244,10 @@ func (sub *Subscription) deleteConsumer() error { sub.mu.Unlock() return nil } + if jsi.stream == _EMPTY_ || jsi.consumer == _EMPTY_ { + sub.mu.Unlock() + return nil + } stream, consumer := jsi.stream, jsi.consumer js := jsi.js sub.mu.Unlock() @@ -1594,7 +1601,7 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync, if consumer != _EMPTY_ && !o.skipCInfo { info, err = js.ConsumerInfo(stream, consumer) notFoundErr = errors.Is(err, ErrConsumerNotFound) - lookupErr = err == ErrJetStreamNotEnabled || err == ErrTimeout || err == context.DeadlineExceeded + lookupErr = err == ErrJetStreamNotEnabled || errors.Is(err, ErrTimeout) || errors.Is(err, context.DeadlineExceeded) } switch { @@ -1808,7 +1815,9 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync, if bl < DefaultSubPendingBytesLimit { bl = DefaultSubPendingBytesLimit } - sub.SetPendingLimits(maxap, bl) + if err := sub.SetPendingLimits(maxap, bl); err != nil { + return nil, err + } } // Do heartbeats last if needed. @@ -2047,7 +2056,16 @@ func (sub *Subscription) resetOrderedConsumer(sseq uint64) { js := jsi.js sub.mu.Unlock() - consName := nuid.Next() + sub.mu.Lock() + // Attempt to delete the existing consumer. + // We don't wait for the response since even if it's unsuccessful, + // inactivity threshold will kick in and delete it. + if jsi.consumer != _EMPTY_ { + go js.DeleteConsumer(jsi.stream, jsi.consumer) + } + jsi.consumer = "" + sub.mu.Unlock() + consName := getHash(nuid.Next()) cinfo, err := js.upsertConsumer(jsi.stream, consName, cfg) if err != nil { var apiErr *APIError @@ -2813,7 +2831,7 @@ func (sub *Subscription) Fetch(batch int, opts ...PullOpt) ([]*Msg, error) { // are no messages. msg, err = sub.nextMsgWithContext(ctx, true, false) if err != nil { - if err == errNoMessages { + if errors.Is(err, errNoMessages) { err = nil } break @@ -2893,13 +2911,13 @@ func (sub *Subscription) Fetch(batch int, opts ...PullOpt) ([]*Msg, error) { usrMsg, err = checkMsg(msg, true, noWait) if err == nil && usrMsg { msgs = append(msgs, msg) - } else if noWait && (err == errNoMessages || err == errRequestsPending) && len(msgs) == 0 { + } else if noWait && (errors.Is(err, errNoMessages) || errors.Is(err, errRequestsPending)) && len(msgs) == 0 { // If we have a 404/408 for our "no_wait" request and have // not collected any message, then resend request to // wait this time. noWait = false err = sendReq() - } else if err == ErrTimeout && len(msgs) == 0 { + } else if errors.Is(err, ErrTimeout) && len(msgs) == 0 { // If we get a 408, we will bail if we already collected some // messages, otherwise ignore and go back calling nextMsg. err = nil @@ -3082,7 +3100,7 @@ func (sub *Subscription) FetchBatch(batch int, opts ...PullOpt) (MessageBatch, e // are no messages. msg, err := sub.nextMsgWithContext(ctx, true, false) if err != nil { - if err == errNoMessages { + if errors.Is(err, errNoMessages) { err = nil } result.err = err @@ -3159,7 +3177,7 @@ func (sub *Subscription) FetchBatch(batch int, opts ...PullOpt) (MessageBatch, e usrMsg, err = checkMsg(msg, true, false) if err != nil { - if err == ErrTimeout { + if errors.Is(err, ErrTimeout) { if reqID != "" && !subjectMatchesReqID(msg.Subject, reqID) { // ignore timeout message from server if it comes from a different pull request continue @@ -3188,7 +3206,7 @@ func (sub *Subscription) FetchBatch(batch int, opts ...PullOpt) (MessageBatch, e // checkCtxErr is used to determine whether ErrTimeout should be returned in case of context timeout func (o *pullOpts) checkCtxErr(err error) error { - if o.ctx == nil && err == context.DeadlineExceeded { + if o.ctx == nil && errors.Is(err, context.DeadlineExceeded) { return ErrTimeout } return err @@ -3204,7 +3222,7 @@ func (js *js) getConsumerInfoContext(ctx context.Context, stream, consumer strin ccInfoSubj := fmt.Sprintf(apiConsumerInfoT, stream, consumer) resp, err := js.apiRequestWithContext(ctx, js.apiSubj(ccInfoSubj), nil) if err != nil { - if err == ErrNoResponders { + if errors.Is(err, ErrNoResponders) { err = ErrJetStreamNotEnabled } return nil, err diff --git a/vendor/github.com/nats-io/nats.go/jserrors.go b/vendor/github.com/nats-io/nats.go/jserrors.go index c8b1f5fc..ef5d4af9 100644 --- a/vendor/github.com/nats-io/nats.go/jserrors.go +++ b/vendor/github.com/nats-io/nats.go/jserrors.go @@ -1,4 +1,4 @@ -// Copyright 2020-2022 The NATS Authors +// Copyright 2020-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/jsm.go b/vendor/github.com/nats-io/nats.go/jsm.go index 266bf066..8f724726 100644 --- a/vendor/github.com/nats-io/nats.go/jsm.go +++ b/vendor/github.com/nats-io/nats.go/jsm.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 The NATS Authors +// Copyright 2021-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -252,11 +252,13 @@ type AccountInfo struct { } type Tier struct { - Memory uint64 `json:"memory"` - Store uint64 `json:"storage"` - Streams int `json:"streams"` - Consumers int `json:"consumers"` - Limits AccountLimits `json:"limits"` + Memory uint64 `json:"memory"` + Store uint64 `json:"storage"` + ReservedMemory uint64 `json:"reserved_memory"` + ReservedStore uint64 `json:"reserved_storage"` + Streams int `json:"streams"` + Consumers int `json:"consumers"` + Limits AccountLimits `json:"limits"` } // APIStats reports on API calls to JetStream for this account. @@ -297,7 +299,7 @@ func (js *js) AccountInfo(opts ...JSOpt) (*AccountInfo, error) { resp, err := js.apiRequestWithContext(o.ctx, js.apiSubj(apiAccountInfo), nil) if err != nil { // todo maybe nats server should never have no responder on this subject and always respond if they know there is no js to be had - if err == ErrNoResponders { + if errors.Is(err, ErrNoResponders) { err = ErrJetStreamNotEnabled } return nil, err @@ -415,7 +417,7 @@ func (js *js) upsertConsumer(stream, consumerName string, cfg *ConsumerConfig, o resp, err := js.apiRequestWithContext(o.ctx, js.apiSubj(ccSubj), req) if err != nil { - if err == ErrNoResponders { + if errors.Is(err, ErrNoResponders) { err = ErrJetStreamNotEnabled } return nil, err @@ -1623,7 +1625,7 @@ func (jsc *js) StreamNameBySubject(subj string, opts ...JSOpt) (string, error) { resp, err := jsc.apiRequestWithContext(o.ctx, jsc.apiSubj(apiStreams), j) if err != nil { - if err == ErrNoResponders { + if errors.Is(err, ErrNoResponders) { err = ErrJetStreamNotEnabled } return _EMPTY_, err diff --git a/vendor/github.com/nats-io/nats.go/kv.go b/vendor/github.com/nats-io/nats.go/kv.go index 7382f4d8..0864f30c 100644 --- a/vendor/github.com/nats-io/nats.go/kv.go +++ b/vendor/github.com/nats-io/nats.go/kv.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 The NATS Authors +// Copyright 2021-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -65,7 +65,10 @@ type KeyValue interface { // WatchAll will invoke the callback for all updates. WatchAll(opts ...WatchOpt) (KeyWatcher, error) // Keys will return all keys. + // DEPRECATED: Use ListKeys instead to avoid memory issues. Keys(opts ...WatchOpt) ([]string, error) + // ListKeys will return all keys in a channel. + ListKeys(opts ...WatchOpt) (KeyLister, error) // History will return all historical values for the key. History(key string, opts ...WatchOpt) ([]KeyValueEntry, error) // Bucket returns the current bucket name. @@ -95,6 +98,9 @@ type KeyValueStatus interface { // Bytes returns the size in bytes of the bucket Bytes() uint64 + + // IsCompressed indicates if the data is compressed on disk + IsCompressed() bool } // KeyWatcher is what is returned when doing a watch. @@ -107,6 +113,12 @@ type KeyWatcher interface { Stop() error } +// KeyLister is used to retrieve a list of key value store keys +type KeyLister interface { + Keys() <-chan string + Stop() error +} + type WatchOpt interface { configureWatcher(opts *watchOpts) error } @@ -249,6 +261,10 @@ type KeyValueConfig struct { RePublish *RePublish Mirror *StreamSource Sources []*StreamSource + + // Enable underlying stream compression. + // NOTE: Compression is supported for nats-server 2.10.0+ + Compression bool } // Used to watch all keys. @@ -343,7 +359,7 @@ func (js *js) KeyValue(bucket string) (KeyValue, error) { stream := fmt.Sprintf(kvBucketNameTmpl, bucket) si, err := js.StreamInfo(stream) if err != nil { - if err == ErrStreamNotFound { + if errors.Is(err, ErrStreamNotFound) { err = ErrBucketNotFound } return nil, err @@ -405,6 +421,10 @@ func (js *js) CreateKeyValue(cfg *KeyValueConfig) (KeyValue, error) { if cfg.TTL > 0 && cfg.TTL < duplicateWindow { duplicateWindow = cfg.TTL } + var compression StoreCompression + if cfg.Compression { + compression = S2Compression + } scfg := &StreamConfig{ Name: fmt.Sprintf(kvBucketNameTmpl, cfg.Bucket), Description: cfg.Description, @@ -422,6 +442,7 @@ func (js *js) CreateKeyValue(cfg *KeyValueConfig) (KeyValue, error) { MaxConsumers: -1, AllowDirect: true, RePublish: cfg.RePublish, + Compression: compression, } if cfg.Mirror != nil { // Copy in case we need to make changes so we do not change caller's version. @@ -465,7 +486,7 @@ func (js *js) CreateKeyValue(cfg *KeyValueConfig) (KeyValue, error) { // the stream. // The same logic applies for KVs created pre 2.9.x and // the AllowDirect setting. - if err == ErrStreamNameAlreadyInUse { + if errors.Is(err, ErrStreamNameAlreadyInUse) { if si, _ = js.StreamInfo(scfg.Name); si != nil { // To compare, make the server's stream info discard // policy same than ours. @@ -537,7 +558,7 @@ func keyValid(key string) bool { func (kv *kvs) Get(key string) (KeyValueEntry, error) { e, err := kv.get(key, kvLatestRevision) if err != nil { - if err == ErrKeyDeleted { + if errors.Is(err, ErrKeyDeleted) { return nil, ErrKeyNotFound } return nil, err @@ -550,7 +571,7 @@ func (kv *kvs) Get(key string) (KeyValueEntry, error) { func (kv *kvs) GetRevision(key string, revision uint64) (KeyValueEntry, error) { e, err := kv.get(key, revision) if err != nil { - if err == ErrKeyDeleted { + if errors.Is(err, ErrKeyDeleted) { return nil, ErrKeyNotFound } return nil, err @@ -587,7 +608,7 @@ func (kv *kvs) get(key string, revision uint64) (KeyValueEntry, error) { } } if err != nil { - if err == ErrMsgNotFound { + if errors.Is(err, ErrMsgNotFound) { err = ErrKeyNotFound } return nil, err @@ -654,7 +675,7 @@ func (kv *kvs) Create(key string, value []byte) (revision uint64, err error) { // TODO(dlc) - Since we have tombstones for DEL ops for watchers, this could be from that // so we need to double check. - if e, err := kv.get(key, kvLatestRevision); err == ErrKeyDeleted { + if e, err := kv.get(key, kvLatestRevision); errors.Is(err, ErrKeyDeleted) { return kv.Update(key, value, e.Revision()) } @@ -830,6 +851,41 @@ func (kv *kvs) Keys(opts ...WatchOpt) ([]string, error) { return keys, nil } +type keyLister struct { + watcher KeyWatcher + keys chan string +} + +// ListKeys will return all keys. +func (kv *kvs) ListKeys(opts ...WatchOpt) (KeyLister, error) { + opts = append(opts, IgnoreDeletes(), MetaOnly()) + watcher, err := kv.WatchAll(opts...) + if err != nil { + return nil, err + } + kl := &keyLister{watcher: watcher, keys: make(chan string, 256)} + + go func() { + defer close(kl.keys) + defer watcher.Stop() + for entry := range watcher.Updates() { + if entry == nil { + return + } + kl.keys <- entry.Key() + } + }() + return kl, nil +} + +func (kl *keyLister) Keys() <-chan string { + return kl.keys +} + +func (kl *keyLister) Stop() error { + return kl.watcher.Stop() +} + // History will return all values for the key. func (kv *kvs) History(key string, opts ...WatchOpt) ([]KeyValueEntry, error) { opts = append(opts, IncludeHistory()) @@ -1040,6 +1096,9 @@ func (s *KeyValueBucketStatus) StreamInfo() *StreamInfo { return s.nfo } // Bytes is the size of the stream func (s *KeyValueBucketStatus) Bytes() uint64 { return s.nfo.State.Bytes } +// IsCompressed indicates if the data is compressed on disk +func (s *KeyValueBucketStatus) IsCompressed() bool { return s.nfo.Config.Compression != NoCompression } + // Status retrieves the status and configuration of a bucket func (kv *kvs) Status() (KeyValueStatus, error) { nfo, err := kv.js.StreamInfo(kv.stream) @@ -1062,7 +1121,7 @@ func (js *js) KeyValueStoreNames() <-chan string { if !strings.HasPrefix(name, kvBucketNamePre) { continue } - ch <- name + ch <- strings.TrimPrefix(name, kvBucketNamePre) } } }() diff --git a/vendor/github.com/nats-io/nats.go/nats.go b/vendor/github.com/nats-io/nats.go/nats.go index da13692f..a252da2a 100644 --- a/vendor/github.com/nats-io/nats.go/nats.go +++ b/vendor/github.com/nats-io/nats.go/nats.go @@ -47,7 +47,7 @@ import ( // Default Constants const ( - Version = "1.31.0" + Version = "1.32.0" DefaultURL = "nats://127.0.0.1:4222" DefaultPort = 4222 DefaultMaxReconnect = 60 @@ -4298,6 +4298,12 @@ func (nc *Conn) removeSub(s *Subscription) { } } + if s.typ != AsyncSubscription { + done := s.pDone + if done != nil { + done(s.Subject) + } + } // Mark as invalid s.closed = true if s.pCond != nil { diff --git a/vendor/github.com/nats-io/nats.go/netchan.go b/vendor/github.com/nats-io/nats.go/netchan.go index 060721eb..6b13690b 100644 --- a/vendor/github.com/nats-io/nats.go/netchan.go +++ b/vendor/github.com/nats-io/nats.go/netchan.go @@ -1,4 +1,4 @@ -// Copyright 2013-2022 The NATS Authors +// Copyright 2013-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at diff --git a/vendor/github.com/nats-io/nats.go/object.go b/vendor/github.com/nats-io/nats.go/object.go index f6ba8fb1..92267918 100644 --- a/vendor/github.com/nats-io/nats.go/object.go +++ b/vendor/github.com/nats-io/nats.go/object.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 The NATS Authors +// Copyright 2021-2023 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -377,13 +377,16 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn defer jetStream.(*js).cleanupReplySub() - purgePartial := func() { + purgePartial := func() error { // wait until all pubs are complete or up to default timeout before attempting purge select { case <-jetStream.PublishAsyncComplete(): case <-time.After(obs.js.opts.wait): } - obs.js.purgeStream(obs.stream, &StreamPurgeRequest{Subject: chunkSubj}) + if err := obs.js.purgeStream(obs.stream, &StreamPurgeRequest{Subject: chunkSubj}); err != nil { + return fmt.Errorf("could not cleanup bucket after erronous put operation: %w", err) + } + return nil } m, h := NewMsg(chunkSubj), sha256.New() @@ -404,7 +407,9 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn default: } if err != nil { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(err, purgeErr) + } return nil, err } } @@ -415,7 +420,9 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn // Handle all non EOF errors if readErr != nil && readErr != io.EOF { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(readErr, purgeErr) + } return nil, readErr } @@ -427,11 +434,15 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn // Send msg itself. if _, err := jetStream.PublishMsgAsync(m); err != nil { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(err, purgeErr) + } return nil, err } if err := getErr(); err != nil { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(err, purgeErr) + } return nil, err } // Update totals. @@ -455,7 +466,9 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn mm.Data, err = json.Marshal(info) if err != nil { if r != nil { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(err, purgeErr) + } } return nil, err } @@ -464,7 +477,9 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn _, err = jetStream.PublishMsgAsync(mm) if err != nil { if r != nil { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(err, purgeErr) + } } return nil, err } @@ -474,7 +489,9 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn case <-jetStream.PublishAsyncComplete(): if err := getErr(); err != nil { if r != nil { - purgePartial() + if purgeErr := purgePartial(); purgeErr != nil { + return nil, errors.Join(err, purgeErr) + } } return nil, err } @@ -487,7 +504,9 @@ func (obs *obs) Put(meta *ObjectMeta, r io.Reader, opts ...ObjectOpt) (*ObjectIn // Delete any original chunks. if einfo != nil && !einfo.Deleted { echunkSubj := fmt.Sprintf(objChunksPreTmpl, obs.name, einfo.NUID) - obs.js.purgeStream(obs.stream, &StreamPurgeRequest{Subject: echunkSubj}) + if err := obs.js.purgeStream(obs.stream, &StreamPurgeRequest{Subject: echunkSubj}); err != nil { + return info, err + } } // TODO would it be okay to do this to return the info with the correct time? @@ -626,7 +645,7 @@ func (obs *obs) Get(name string, opts ...GetObjectOpt) (ObjectResult, error) { if ctx != nil { select { case <-ctx.Done(): - if ctx.Err() == context.Canceled { + if errors.Is(ctx.Err(), context.Canceled) { err = ctx.Err() } else { err = ErrTimeout @@ -926,7 +945,7 @@ func (obs *obs) GetInfo(name string, opts ...GetObjectInfoOpt) (*ObjectInfo, err m, err := obs.js.GetLastMsg(stream, metaSubj) if err != nil { - if err == ErrMsgNotFound { + if errors.Is(err, ErrMsgNotFound) { err = ErrObjectNotFound } return nil, err diff --git a/vendor/github.com/nats-io/nats.go/timer.go b/vendor/github.com/nats-io/nats.go/timer.go index 4fb02ecb..6edeb4cf 100644 --- a/vendor/github.com/nats-io/nats.go/timer.go +++ b/vendor/github.com/nats-io/nats.go/timer.go @@ -29,7 +29,7 @@ type timerPool struct { // Get returns a timer that completes after the given duration. func (tp *timerPool) Get(d time.Duration) *time.Timer { - if t, _ := tp.p.Get().(*time.Timer); t != nil { + if t, ok := tp.p.Get().(*time.Timer); ok && t != nil { t.Reset(d) return t } diff --git a/vendor/github.com/nats-io/nkeys/README.md b/vendor/github.com/nats-io/nkeys/README.md index 37febc9a..17e3a8e3 100644 --- a/vendor/github.com/nats-io/nkeys/README.md +++ b/vendor/github.com/nats-io/nkeys/README.md @@ -2,9 +2,9 @@ [![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![Go Report Card](https://goreportcard.com/badge/github.com/nats-io/nkeys)](https://goreportcard.com/report/github.com/nats-io/nkeys) -[![Build Status](https://app.travis-ci.com/nats-io/nkeys.svg?branch=master)](https://app.travis-ci.com/nats-io/nkeys) +[![Build Status](https://github.com/nats-io/nkeys/actions/workflows/release.yaml/badge.svg)](https://github.com/nats-io/nkeys/actions/workflows/release.yaml/badge.svg) [![GoDoc](https://godoc.org/github.com/nats-io/nkeys?status.svg)](https://godoc.org/github.com/nats-io/nkeys) -[![Coverage Status](https://coveralls.io/repos/github/nats-io/nkeys/badge.svg?branch=master&service=github)](https://coveralls.io/github/nats-io/nkeys?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/nats-io/nkeys/badge.svg?branch=main&service=github)](https://coveralls.io/github/nats-io/nkeys?branch=main) A public-key signature system based on [Ed25519](https://ed25519.cr.yp.to/) for the NATS ecosystem. @@ -66,4 +66,3 @@ user2, _ := nkeys.FromRawSeed(PrefixByteUser, rawSeed) Unless otherwise noted, the NATS source files are distributed under the Apache Version 2.0 license found in the LICENSE file. - diff --git a/vendor/github.com/nats-io/nkeys/nkeys.go b/vendor/github.com/nats-io/nkeys/nkeys.go index 0db0f0c1..6f1ba205 100644 --- a/vendor/github.com/nats-io/nkeys/nkeys.go +++ b/vendor/github.com/nats-io/nkeys/nkeys.go @@ -19,7 +19,7 @@ package nkeys import "io" // Version is our current version -const Version = "0.4.6" +const Version = "0.4.7" // KeyPair provides the central interface to nkeys. type KeyPair interface { diff --git a/vendor/github.com/pierrec/lz4/v4/README.md b/vendor/github.com/pierrec/lz4/v4/README.md index 4629c9d0..dee77545 100644 --- a/vendor/github.com/pierrec/lz4/v4/README.md +++ b/vendor/github.com/pierrec/lz4/v4/README.md @@ -21,7 +21,7 @@ go get github.com/pierrec/lz4/v4 There is a command line interface tool to compress and decompress LZ4 files. ``` -go install github.com/pierrec/lz4/v4/cmd/lz4c +go install github.com/pierrec/lz4/v4/cmd/lz4c@latest ``` Usage diff --git a/vendor/github.com/pierrec/lz4/v4/compressing_reader.go b/vendor/github.com/pierrec/lz4/v4/compressing_reader.go new file mode 100644 index 00000000..8df0dc76 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/v4/compressing_reader.go @@ -0,0 +1,222 @@ +package lz4 + +import ( + "errors" + "io" + + "github.com/pierrec/lz4/v4/internal/lz4block" + "github.com/pierrec/lz4/v4/internal/lz4errors" + "github.com/pierrec/lz4/v4/internal/lz4stream" +) + +type crState int + +const ( + crStateInitial crState = iota + crStateReading + crStateFlushing + crStateDone +) + +type CompressingReader struct { + state crState + src io.ReadCloser // source reader + level lz4block.CompressionLevel // how hard to try + frame *lz4stream.Frame // frame being built + in []byte + out ovWriter + handler func(int) +} + +// NewCompressingReader creates a reader which reads compressed data from +// raw stream. This makes it a logical opposite of a normal lz4.Reader. +// We require an io.ReadCloser as an underlying source for compatibility +// with Go's http.Request. +func NewCompressingReader(src io.ReadCloser) *CompressingReader { + zrd := &CompressingReader { + frame: lz4stream.NewFrame(), + } + + _ = zrd.Apply(DefaultBlockSizeOption, DefaultChecksumOption, defaultOnBlockDone) + zrd.Reset(src) + + return zrd +} + +// Source exposes the underlying source stream for introspection and control. +func (zrd *CompressingReader) Source() io.ReadCloser { + return zrd.src +} + +// Close simply invokes the underlying stream Close method. This method is +// provided for the benefit of Go http client/server, which relies on Close +// for goroutine termination. +func (zrd *CompressingReader) Close() error { + return zrd.src.Close() +} + +// Apply applies useful options to the lz4 encoder. +func (zrd *CompressingReader) Apply(options ...Option) (err error) { + if zrd.state != crStateInitial { + return lz4errors.ErrOptionClosedOrError + } + + zrd.Reset(zrd.src) + + for _, o := range options { + if err = o(zrd); err != nil { + return + } + } + return +} + +func (*CompressingReader) private() {} + +func (zrd *CompressingReader) init() error { + zrd.frame.InitW(&zrd.out, 1, false) + size := zrd.frame.Descriptor.Flags.BlockSizeIndex() + zrd.in = size.Get() + return zrd.frame.Descriptor.Write(zrd.frame, &zrd.out) +} + +// Read allows reading of lz4 compressed data +func (zrd *CompressingReader) Read(p []byte) (n int, err error) { + defer func() { + if err != nil { + zrd.state = crStateDone + } + }() + + if !zrd.out.reset(p) { + return len(p), nil + } + + switch zrd.state { + case crStateInitial: + err = zrd.init() + if err != nil { + return + } + zrd.state = crStateReading + case crStateDone: + return 0, errors.New("This reader is done") + case crStateFlushing: + if zrd.out.dataPos > 0 { + n = zrd.out.dataPos + zrd.out.data = nil + zrd.out.dataPos = 0 + return + } else { + zrd.state = crStateDone + return 0, io.EOF + } + } + + for zrd.state == crStateReading { + block := zrd.frame.Blocks.Block + + var rCount int + rCount, err = io.ReadFull(zrd.src, zrd.in) + switch err { + case nil: + err = block.Compress( + zrd.frame, zrd.in[ : rCount], zrd.level, + ).Write(zrd.frame, &zrd.out) + zrd.handler(len(block.Data)) + if err != nil { + return + } + + if zrd.out.dataPos == len(zrd.out.data) { + n = zrd.out.dataPos + zrd.out.dataPos = 0 + zrd.out.data = nil + return + } + case io.EOF, io.ErrUnexpectedEOF: // read may be partial + if rCount > 0 { + err = block.Compress( + zrd.frame, zrd.in[ : rCount], zrd.level, + ).Write(zrd.frame, &zrd.out) + zrd.handler(len(block.Data)) + if err != nil { + return + } + } + + err = zrd.frame.CloseW(&zrd.out, 1) + if err != nil { + return + } + zrd.state = crStateFlushing + + n = zrd.out.dataPos + zrd.out.dataPos = 0 + zrd.out.data = nil + return + default: + return + } + } + + err = lz4errors.ErrInternalUnhandledState + return +} + +// Reset makes the stream usable again; mostly handy to reuse lz4 encoder +// instances. +func (zrd *CompressingReader) Reset(src io.ReadCloser) { + zrd.frame.Reset(1) + zrd.state = crStateInitial + zrd.src = src + zrd.out.clear() +} + +type ovWriter struct { + data []byte + ov []byte + dataPos int + ovPos int +} + +func (wr *ovWriter) Write(p []byte) (n int, err error) { + count := copy(wr.data[wr.dataPos : ], p) + wr.dataPos += count + + if count < len(p) { + wr.ov = append(wr.ov, p[count : ]...) + } + + return len(p), nil +} + +func (wr *ovWriter) reset(out []byte) bool { + ovRem := len(wr.ov) - wr.ovPos + + if ovRem >= len(out) { + wr.ovPos += copy(out, wr.ov[wr.ovPos : ]) + return false + } + + if ovRem > 0 { + copy(out, wr.ov[wr.ovPos : ]) + wr.ov = wr.ov[ : 0] + wr.ovPos = 0 + wr.dataPos = ovRem + } else if wr.ovPos > 0 { + wr.ov = wr.ov[ : 0] + wr.ovPos = 0 + wr.dataPos = 0 + } + + wr.data = out + return true +} + +func (wr *ovWriter) clear() { + wr.data = nil + wr.dataPos = 0 + wr.ov = wr.ov[ : 0] + wr.ovPos = 0 +} diff --git a/vendor/github.com/pierrec/lz4/v4/internal/lz4block/blocks.go b/vendor/github.com/pierrec/lz4/v4/internal/lz4block/blocks.go index a1bfa99e..138083d9 100644 --- a/vendor/github.com/pierrec/lz4/v4/internal/lz4block/blocks.go +++ b/vendor/github.com/pierrec/lz4/v4/internal/lz4block/blocks.go @@ -8,12 +8,9 @@ const ( Block256Kb Block1Mb Block4Mb + Block8Mb = 2 * Block4Mb ) -// In legacy mode all blocks are compressed regardless -// of the compressed size: use the bound size. -var Block8Mb = uint32(CompressBlockBound(8 << 20)) - var ( BlockPool64K = sync.Pool{New: func() interface{} { return make([]byte, Block64Kb) }} BlockPool256K = sync.Pool{New: func() interface{} { return make([]byte, Block256Kb) }} diff --git a/vendor/github.com/pierrec/lz4/v4/internal/lz4stream/block.go b/vendor/github.com/pierrec/lz4/v4/internal/lz4stream/block.go index 459086f0..e9646546 100644 --- a/vendor/github.com/pierrec/lz4/v4/internal/lz4stream/block.go +++ b/vendor/github.com/pierrec/lz4/v4/internal/lz4stream/block.go @@ -224,9 +224,7 @@ func (b *FrameDataBlock) Close(f *Frame) { func (b *FrameDataBlock) Compress(f *Frame, src []byte, level lz4block.CompressionLevel) *FrameDataBlock { data := b.data if f.isLegacy() { - // In legacy mode, the buffer is sized according to CompressBlockBound, - // but only 8Mb is buffered for compression. - src = src[:8<<20] + data = data[:cap(data)] } else { data = data[:len(src)] // trigger the incompressible flag in CompressBlock } diff --git a/vendor/github.com/pierrec/lz4/v4/options.go b/vendor/github.com/pierrec/lz4/v4/options.go index 46a87380..57a44e76 100644 --- a/vendor/github.com/pierrec/lz4/v4/options.go +++ b/vendor/github.com/pierrec/lz4/v4/options.go @@ -57,6 +57,13 @@ func BlockSizeOption(size BlockSize) Option { } w.frame.Descriptor.Flags.BlockSizeIndexSet(lz4block.Index(size)) return nil + case *CompressingReader: + size := uint32(size) + if !lz4block.IsValid(size) { + return fmt.Errorf("%w: %d", lz4errors.ErrOptionInvalidBlockSize, size) + } + w.frame.Descriptor.Flags.BlockSizeIndexSet(lz4block.Index(size)) + return nil } return lz4errors.ErrOptionNotApplicable } @@ -72,6 +79,9 @@ func BlockChecksumOption(flag bool) Option { case *Writer: w.frame.Descriptor.Flags.BlockChecksumSet(flag) return nil + case *CompressingReader: + w.frame.Descriptor.Flags.BlockChecksumSet(flag) + return nil } return lz4errors.ErrOptionNotApplicable } @@ -87,6 +97,9 @@ func ChecksumOption(flag bool) Option { case *Writer: w.frame.Descriptor.Flags.ContentChecksumSet(flag) return nil + case *CompressingReader: + w.frame.Descriptor.Flags.ContentChecksumSet(flag) + return nil } return lz4errors.ErrOptionNotApplicable } @@ -104,6 +117,10 @@ func SizeOption(size uint64) Option { w.frame.Descriptor.Flags.SizeSet(size > 0) w.frame.Descriptor.ContentSize = size return nil + case *CompressingReader: + w.frame.Descriptor.Flags.SizeSet(size > 0) + w.frame.Descriptor.ContentSize = size + return nil } return lz4errors.ErrOptionNotApplicable } @@ -162,6 +179,14 @@ func CompressionLevelOption(level CompressionLevel) Option { } w.level = lz4block.CompressionLevel(level) return nil + case *CompressingReader: + switch level { + case Fast, Level1, Level2, Level3, Level4, Level5, Level6, Level7, Level8, Level9: + default: + return fmt.Errorf("%w: %d", lz4errors.ErrOptionInvalidCompressionLevel, level) + } + w.level = lz4block.CompressionLevel(level) + return nil } return lz4errors.ErrOptionNotApplicable } @@ -186,6 +211,9 @@ func OnBlockDoneOption(handler func(size int)) Option { case *Reader: rw.handler = handler return nil + case *CompressingReader: + rw.handler = handler + return nil } return lz4errors.ErrOptionNotApplicable } diff --git a/vendor/github.com/sashabaranov/go-openai/chat.go b/vendor/github.com/sashabaranov/go-openai/chat.go index 5b87b6bd..33b8755c 100644 --- a/vendor/github.com/sashabaranov/go-openai/chat.go +++ b/vendor/github.com/sashabaranov/go-openai/chat.go @@ -200,7 +200,15 @@ type ChatCompletionRequest struct { // incorrect: `"logit_bias":{"You": 6}`, correct: `"logit_bias":{"1639": 6}` // refs: https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias LogitBias map[string]int `json:"logit_bias,omitempty"` - User string `json:"user,omitempty"` + // LogProbs indicates whether to return log probabilities of the output tokens or not. + // If true, returns the log probabilities of each output token returned in the content of message. + // This option is currently not available on the gpt-4-vision-preview model. + LogProbs bool `json:"logprobs,omitempty"` + // TopLogProbs is an integer between 0 and 5 specifying the number of most likely tokens to return at each + // token position, each with an associated log probability. + // logprobs must be set to true if this parameter is used. + TopLogProbs int `json:"top_logprobs,omitempty"` + User string `json:"user,omitempty"` // Deprecated: use Tools instead. Functions []FunctionDefinition `json:"functions,omitempty"` // Deprecated: use ToolChoice instead. @@ -244,6 +252,28 @@ type FunctionDefinition struct { // Deprecated: use FunctionDefinition instead. type FunctionDefine = FunctionDefinition +type TopLogProbs struct { + Token string `json:"token"` + LogProb float64 `json:"logprob"` + Bytes []byte `json:"bytes,omitempty"` +} + +// LogProb represents the probability information for a token. +type LogProb struct { + Token string `json:"token"` + LogProb float64 `json:"logprob"` + Bytes []byte `json:"bytes,omitempty"` // Omitting the field if it is null + // TopLogProbs is a list of the most likely tokens and their log probability, at this token position. + // In rare cases, there may be fewer than the number of requested top_logprobs returned. + TopLogProbs []TopLogProbs `json:"top_logprobs"` +} + +// LogProbs is the top-level structure containing the log probability information. +type LogProbs struct { + // Content is a list of message content tokens with log probability information. + Content []LogProb `json:"content"` +} + type FinishReason string const ( @@ -273,6 +303,7 @@ type ChatCompletionChoice struct { // content_filter: Omitted content due to a flag from our content filters // null: API response still in progress or incomplete FinishReason FinishReason `json:"finish_reason"` + LogProbs *LogProbs `json:"logprobs,omitempty"` } // ChatCompletionResponse represents a response structure for chat completion API. diff --git a/vendor/github.com/sashabaranov/go-openai/image.go b/vendor/github.com/sashabaranov/go-openai/image.go index 4fe8b3a3..afd4e196 100644 --- a/vendor/github.com/sashabaranov/go-openai/image.go +++ b/vendor/github.com/sashabaranov/go-openai/image.go @@ -68,7 +68,7 @@ type ImageResponseDataInner struct { // CreateImage - API call to create an image. This is the main endpoint of the DALL-E API. func (c *Client) CreateImage(ctx context.Context, request ImageRequest) (response ImageResponse, err error) { urlSuffix := "/images/generations" - req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request)) + req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix, request.Model), withBody(request)) if err != nil { return } diff --git a/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/tables/table_connections/table_connections.go b/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/tables/table_connections/table_connections.go index efa6a211..2e9bcde7 100644 --- a/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/tables/table_connections/table_connections.go +++ b/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/tables/table_connections/table_connections.go @@ -1,17 +1,16 @@ package table_connections - // Table_Connection - модель для таблицы connections: Подключения к БД СТЕКа. type Table_Connection struct { - BranchID int64 `json:"branch_id" gorm:"column:branch_id;default:0"` //Филиал (ИД) - DbName string `json:"db_name" gorm:"column:db_name;default:\"\""` //Имя таблицы - DbScheme string `json:"db_scheme" gorm:"column:db_scheme;default:\"\""` //Имя схемы - ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement:true"` //Уникальный технический идентификатор - IsLegal bool `json:"is_legal" gorm:"column:is_legal"` //Это соединение для юридических лиц - Login string `json:"login" gorm:"column:login;default:\"\""` //Логин - Name string `json:"name" gorm:"column:name;default:\"\""` //Наименование - Password string `json:"password" gorm:"column:password;default:\"\""` //Пароль - Port string `json:"port" gorm:"column:port;default:\"\""` //Номер порта - Server string `json:"server" gorm:"column:server;default:\"\""` //Имя сервера, или ip-адрес + BranchID int64 `json:"branch_id" gorm:"column:branch_id;default:0"` //Филиал (ИД) + DbName string `json:"db_name" gorm:"column:db_name;default:\"\""` //Имя таблицы + DbScheme string `json:"db_scheme" gorm:"column:db_scheme;default:\"\""` //Имя схемы + ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement:true"` //Уникальный технический идентификатор + IsLegal bool `json:"is_legal" gorm:"column:is_legal"` //Это соединение для юридических лиц + Login string `json:"login" gorm:"column:login;default:\"\""` //Логин + Name string `json:"name" gorm:"column:name;default:\"\""` //Наименование + Password string `json:"password" gorm:"column:password;default:\"\""` //Пароль + Port string `json:"port" gorm:"column:port;default:\"\""` //Номер порта + Server string `json:"server" gorm:"column:server;default:\"\""` //Имя сервера, или ip-адрес } diff --git a/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/connections/connections_crud.go b/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/connections/connections_crud.go index 8b107ab8..411d3eaf 100644 --- a/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/connections/connections_crud.go +++ b/vendor/gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/connections/connections_crud.go @@ -14,8 +14,8 @@ import ( // versionConnection - версия структуры модели, с учётом имен и типов полей var versionConnection uint32 -// crud_Connection - объект контроллер crud операций -var crud_Connection ICrud_Connection +// Crud_Connection - объект контроллер crud операций +var Crud_Connection ICrud_Connection // интерфейс стандартных CRUD операций, для использования в DB или GRPC или NRPC type ICrud_Connection interface { @@ -92,51 +92,51 @@ func (m Connection) GetJSON() (string, error) { // Read - находит запись в БД по ID, и заполняет в объект func (m *Connection) Read() error { - if crud_Connection == nil { + if Crud_Connection == nil { return constants.ErrorCrudIsNotInit } - err := crud_Connection.Read(m) + err := Crud_Connection.Read(m) return err } // Save - записывает объект в БД по ID func (m *Connection) Save() error { - if crud_Connection == nil { + if Crud_Connection == nil { return constants.ErrorCrudIsNotInit } - err := crud_Connection.Save(m) + err := Crud_Connection.Save(m) return err } // Update - обновляет объект в БД по ID func (m *Connection) Update() error { - if crud_Connection == nil { + if Crud_Connection == nil { return constants.ErrorCrudIsNotInit } - err := crud_Connection.Update(m) + err := Crud_Connection.Update(m) return err } // Create - создаёт объект в БД с новым ID func (m *Connection) Create() error { - if crud_Connection == nil { + if Crud_Connection == nil { return constants.ErrorCrudIsNotInit } - err := crud_Connection.Create(m) + err := Crud_Connection.Create(m) return err } // SetCrudInterface - заполняет интерфейс crud: DB, GRPC, NRPC func (m Connection) SetCrudInterface(crud ICrud_Connection) { - crud_Connection = crud + Crud_Connection = crud return } diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go index 271c3f10..0bc1120a 100644 --- a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go +++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go @@ -380,68 +380,6 @@ func (DeviceProps_PlatformType) EnumDescriptor() ([]byte, []int) { return file_binary_proto_def_proto_rawDescGZIP(), []int{5, 0} } -type InteractiveMessage_ShopMessage_Surface int32 - -const ( - InteractiveMessage_ShopMessage_UNKNOWN_SURFACE InteractiveMessage_ShopMessage_Surface = 0 - InteractiveMessage_ShopMessage_FB InteractiveMessage_ShopMessage_Surface = 1 - InteractiveMessage_ShopMessage_IG InteractiveMessage_ShopMessage_Surface = 2 - InteractiveMessage_ShopMessage_WA InteractiveMessage_ShopMessage_Surface = 3 -) - -// Enum value maps for InteractiveMessage_ShopMessage_Surface. -var ( - InteractiveMessage_ShopMessage_Surface_name = map[int32]string{ - 0: "UNKNOWN_SURFACE", - 1: "FB", - 2: "IG", - 3: "WA", - } - InteractiveMessage_ShopMessage_Surface_value = map[string]int32{ - "UNKNOWN_SURFACE": 0, - "FB": 1, - "IG": 2, - "WA": 3, - } -) - -func (x InteractiveMessage_ShopMessage_Surface) Enum() *InteractiveMessage_ShopMessage_Surface { - p := new(InteractiveMessage_ShopMessage_Surface) - *p = x - return p -} - -func (x InteractiveMessage_ShopMessage_Surface) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (InteractiveMessage_ShopMessage_Surface) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[5].Descriptor() -} - -func (InteractiveMessage_ShopMessage_Surface) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[5] -} - -func (x InteractiveMessage_ShopMessage_Surface) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *InteractiveMessage_ShopMessage_Surface) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = InteractiveMessage_ShopMessage_Surface(num) - return nil -} - -// Deprecated: Use InteractiveMessage_ShopMessage_Surface.Descriptor instead. -func (InteractiveMessage_ShopMessage_Surface) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 0, 0} -} - type HistorySyncNotification_HistorySyncType int32 const ( @@ -487,11 +425,11 @@ func (x HistorySyncNotification_HistorySyncType) String() string { } func (HistorySyncNotification_HistorySyncType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[6].Descriptor() + return file_binary_proto_def_proto_enumTypes[5].Descriptor() } func (HistorySyncNotification_HistorySyncType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[6] + return &file_binary_proto_def_proto_enumTypes[5] } func (x HistorySyncNotification_HistorySyncType) Number() protoreflect.EnumNumber { @@ -510,7 +448,7 @@ func (x *HistorySyncNotification_HistorySyncType) UnmarshalJSON(b []byte) error // Deprecated: Use HistorySyncNotification_HistorySyncType.Descriptor instead. func (HistorySyncNotification_HistorySyncType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{8, 0} } type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType int32 @@ -558,11 +496,11 @@ func (x HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeC } func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[7].Descriptor() + return file_binary_proto_def_proto_enumTypes[6].Descriptor() } func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[7] + return &file_binary_proto_def_proto_enumTypes[6] } func (x HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType) Number() protoreflect.EnumNumber { @@ -581,7 +519,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTime // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType.Descriptor instead. func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0, 0, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0, 0, 1, 0} } type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType int32 @@ -614,11 +552,11 @@ func (x HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeC } func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[8].Descriptor() + return file_binary_proto_def_proto_enumTypes[7].Descriptor() } func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[8] + return &file_binary_proto_def_proto_enumTypes[7] } func (x HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType) Number() protoreflect.EnumNumber { @@ -637,7 +575,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTime // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType.Descriptor instead. func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0, 0, 1, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0, 0, 1, 1} } type GroupInviteMessage_GroupType int32 @@ -670,11 +608,11 @@ func (x GroupInviteMessage_GroupType) String() string { } func (GroupInviteMessage_GroupType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[9].Descriptor() + return file_binary_proto_def_proto_enumTypes[8].Descriptor() } func (GroupInviteMessage_GroupType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[9] + return &file_binary_proto_def_proto_enumTypes[8] } func (x GroupInviteMessage_GroupType) Number() protoreflect.EnumNumber { @@ -693,7 +631,7 @@ func (x *GroupInviteMessage_GroupType) UnmarshalJSON(b []byte) error { // Deprecated: Use GroupInviteMessage_GroupType.Descriptor instead. func (GroupInviteMessage_GroupType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{11, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0} } type ExtendedTextMessage_PreviewType int32 @@ -732,11 +670,11 @@ func (x ExtendedTextMessage_PreviewType) String() string { } func (ExtendedTextMessage_PreviewType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[10].Descriptor() + return file_binary_proto_def_proto_enumTypes[9].Descriptor() } func (ExtendedTextMessage_PreviewType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[10] + return &file_binary_proto_def_proto_enumTypes[9] } func (x ExtendedTextMessage_PreviewType) Number() protoreflect.EnumNumber { @@ -794,11 +732,11 @@ func (x ExtendedTextMessage_InviteLinkGroupType) String() string { } func (ExtendedTextMessage_InviteLinkGroupType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[11].Descriptor() + return file_binary_proto_def_proto_enumTypes[10].Descriptor() } func (ExtendedTextMessage_InviteLinkGroupType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[11] + return &file_binary_proto_def_proto_enumTypes[10] } func (x ExtendedTextMessage_InviteLinkGroupType) Number() protoreflect.EnumNumber { @@ -868,11 +806,11 @@ func (x ExtendedTextMessage_FontType) String() string { } func (ExtendedTextMessage_FontType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[12].Descriptor() + return file_binary_proto_def_proto_enumTypes[11].Descriptor() } func (ExtendedTextMessage_FontType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[12] + return &file_binary_proto_def_proto_enumTypes[11] } func (x ExtendedTextMessage_FontType) Number() protoreflect.EnumNumber { @@ -927,11 +865,11 @@ func (x EventResponseMessage_EventResponseType) String() string { } func (EventResponseMessage_EventResponseType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[13].Descriptor() + return file_binary_proto_def_proto_enumTypes[12].Descriptor() } func (EventResponseMessage_EventResponseType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[13] + return &file_binary_proto_def_proto_enumTypes[12] } func (x EventResponseMessage_EventResponseType) Number() protoreflect.EnumNumber { @@ -986,11 +924,11 @@ func (x CallLogMessage_CallType) String() string { } func (CallLogMessage_CallType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[14].Descriptor() + return file_binary_proto_def_proto_enumTypes[13].Descriptor() } func (CallLogMessage_CallType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[14] + return &file_binary_proto_def_proto_enumTypes[13] } func (x CallLogMessage_CallType) Number() protoreflect.EnumNumber { @@ -1060,11 +998,11 @@ func (x CallLogMessage_CallOutcome) String() string { } func (CallLogMessage_CallOutcome) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[15].Descriptor() + return file_binary_proto_def_proto_enumTypes[14].Descriptor() } func (CallLogMessage_CallOutcome) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[15] + return &file_binary_proto_def_proto_enumTypes[14] } func (x CallLogMessage_CallOutcome) Number() protoreflect.EnumNumber { @@ -1116,11 +1054,11 @@ func (x ButtonsResponseMessage_Type) String() string { } func (ButtonsResponseMessage_Type) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[16].Descriptor() + return file_binary_proto_def_proto_enumTypes[15].Descriptor() } func (ButtonsResponseMessage_Type) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[16] + return &file_binary_proto_def_proto_enumTypes[15] } func (x ButtonsResponseMessage_Type) Number() protoreflect.EnumNumber { @@ -1187,11 +1125,11 @@ func (x ButtonsMessage_HeaderType) String() string { } func (ButtonsMessage_HeaderType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[17].Descriptor() + return file_binary_proto_def_proto_enumTypes[16].Descriptor() } func (ButtonsMessage_HeaderType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[17] + return &file_binary_proto_def_proto_enumTypes[16] } func (x ButtonsMessage_HeaderType) Number() protoreflect.EnumNumber { @@ -1246,11 +1184,11 @@ func (x ButtonsMessage_Button_Type) String() string { } func (ButtonsMessage_Button_Type) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[18].Descriptor() + return file_binary_proto_def_proto_enumTypes[17].Descriptor() } func (ButtonsMessage_Button_Type) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[18] + return &file_binary_proto_def_proto_enumTypes[17] } func (x ButtonsMessage_Button_Type) Number() protoreflect.EnumNumber { @@ -1299,11 +1237,11 @@ func (x BotFeedbackMessage_BotFeedbackKindMultiplePositive) String() string { } func (BotFeedbackMessage_BotFeedbackKindMultiplePositive) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[19].Descriptor() + return file_binary_proto_def_proto_enumTypes[18].Descriptor() } func (BotFeedbackMessage_BotFeedbackKindMultiplePositive) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[19] + return &file_binary_proto_def_proto_enumTypes[18] } func (x BotFeedbackMessage_BotFeedbackKindMultiplePositive) Number() protoreflect.EnumNumber { @@ -1376,11 +1314,11 @@ func (x BotFeedbackMessage_BotFeedbackKindMultipleNegative) String() string { } func (BotFeedbackMessage_BotFeedbackKindMultipleNegative) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[20].Descriptor() + return file_binary_proto_def_proto_enumTypes[19].Descriptor() } func (BotFeedbackMessage_BotFeedbackKindMultipleNegative) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[20] + return &file_binary_proto_def_proto_enumTypes[19] } func (x BotFeedbackMessage_BotFeedbackKindMultipleNegative) Number() protoreflect.EnumNumber { @@ -1456,11 +1394,11 @@ func (x BotFeedbackMessage_BotFeedbackKind) String() string { } func (BotFeedbackMessage_BotFeedbackKind) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[21].Descriptor() + return file_binary_proto_def_proto_enumTypes[20].Descriptor() } func (BotFeedbackMessage_BotFeedbackKind) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[21] + return &file_binary_proto_def_proto_enumTypes[20] } func (x BotFeedbackMessage_BotFeedbackKind) Number() protoreflect.EnumNumber { @@ -1515,11 +1453,11 @@ func (x BCallMessage_MediaType) String() string { } func (BCallMessage_MediaType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[22].Descriptor() + return file_binary_proto_def_proto_enumTypes[21].Descriptor() } func (BCallMessage_MediaType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[22] + return &file_binary_proto_def_proto_enumTypes[21] } func (x BCallMessage_MediaType) Number() protoreflect.EnumNumber { @@ -1574,11 +1512,11 @@ func (x HydratedTemplateButton_HydratedURLButton_WebviewPresentationType) String } func (HydratedTemplateButton_HydratedURLButton_WebviewPresentationType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[23].Descriptor() + return file_binary_proto_def_proto_enumTypes[22].Descriptor() } func (HydratedTemplateButton_HydratedURLButton_WebviewPresentationType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[23] + return &file_binary_proto_def_proto_enumTypes[22] } func (x HydratedTemplateButton_HydratedURLButton_WebviewPresentationType) Number() protoreflect.EnumNumber { @@ -1597,16 +1535,17 @@ func (x *HydratedTemplateButton_HydratedURLButton_WebviewPresentationType) Unmar // Deprecated: Use HydratedTemplateButton_HydratedURLButton_WebviewPresentationType.Descriptor instead. func (HydratedTemplateButton_HydratedURLButton_WebviewPresentationType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{43, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{44, 0, 0} } type DisappearingMode_Trigger int32 const ( - DisappearingMode_UNKNOWN DisappearingMode_Trigger = 0 - DisappearingMode_CHAT_SETTING DisappearingMode_Trigger = 1 - DisappearingMode_ACCOUNT_SETTING DisappearingMode_Trigger = 2 - DisappearingMode_BULK_CHANGE DisappearingMode_Trigger = 3 + DisappearingMode_UNKNOWN DisappearingMode_Trigger = 0 + DisappearingMode_CHAT_SETTING DisappearingMode_Trigger = 1 + DisappearingMode_ACCOUNT_SETTING DisappearingMode_Trigger = 2 + DisappearingMode_BULK_CHANGE DisappearingMode_Trigger = 3 + DisappearingMode_BIZ_SUPPORTS_FB_HOSTING DisappearingMode_Trigger = 4 ) // Enum value maps for DisappearingMode_Trigger. @@ -1616,12 +1555,14 @@ var ( 1: "CHAT_SETTING", 2: "ACCOUNT_SETTING", 3: "BULK_CHANGE", + 4: "BIZ_SUPPORTS_FB_HOSTING", } DisappearingMode_Trigger_value = map[string]int32{ - "UNKNOWN": 0, - "CHAT_SETTING": 1, - "ACCOUNT_SETTING": 2, - "BULK_CHANGE": 3, + "UNKNOWN": 0, + "CHAT_SETTING": 1, + "ACCOUNT_SETTING": 2, + "BULK_CHANGE": 3, + "BIZ_SUPPORTS_FB_HOSTING": 4, } ) @@ -1636,11 +1577,11 @@ func (x DisappearingMode_Trigger) String() string { } func (DisappearingMode_Trigger) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[24].Descriptor() + return file_binary_proto_def_proto_enumTypes[23].Descriptor() } func (DisappearingMode_Trigger) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[24] + return &file_binary_proto_def_proto_enumTypes[23] } func (x DisappearingMode_Trigger) Number() protoreflect.EnumNumber { @@ -1659,15 +1600,16 @@ func (x *DisappearingMode_Trigger) UnmarshalJSON(b []byte) error { // Deprecated: Use DisappearingMode_Trigger.Descriptor instead. func (DisappearingMode_Trigger) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{45, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{46, 0} } type DisappearingMode_Initiator int32 const ( - DisappearingMode_CHANGED_IN_CHAT DisappearingMode_Initiator = 0 - DisappearingMode_INITIATED_BY_ME DisappearingMode_Initiator = 1 - DisappearingMode_INITIATED_BY_OTHER DisappearingMode_Initiator = 2 + DisappearingMode_CHANGED_IN_CHAT DisappearingMode_Initiator = 0 + DisappearingMode_INITIATED_BY_ME DisappearingMode_Initiator = 1 + DisappearingMode_INITIATED_BY_OTHER DisappearingMode_Initiator = 2 + DisappearingMode_BIZ_UPGRADE_FB_HOSTING DisappearingMode_Initiator = 3 ) // Enum value maps for DisappearingMode_Initiator. @@ -1676,11 +1618,13 @@ var ( 0: "CHANGED_IN_CHAT", 1: "INITIATED_BY_ME", 2: "INITIATED_BY_OTHER", + 3: "BIZ_UPGRADE_FB_HOSTING", } DisappearingMode_Initiator_value = map[string]int32{ - "CHANGED_IN_CHAT": 0, - "INITIATED_BY_ME": 1, - "INITIATED_BY_OTHER": 2, + "CHANGED_IN_CHAT": 0, + "INITIATED_BY_ME": 1, + "INITIATED_BY_OTHER": 2, + "BIZ_UPGRADE_FB_HOSTING": 3, } ) @@ -1695,11 +1639,11 @@ func (x DisappearingMode_Initiator) String() string { } func (DisappearingMode_Initiator) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[25].Descriptor() + return file_binary_proto_def_proto_enumTypes[24].Descriptor() } func (DisappearingMode_Initiator) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[25] + return &file_binary_proto_def_proto_enumTypes[24] } func (x DisappearingMode_Initiator) Number() protoreflect.EnumNumber { @@ -1718,7 +1662,7 @@ func (x *DisappearingMode_Initiator) UnmarshalJSON(b []byte) error { // Deprecated: Use DisappearingMode_Initiator.Descriptor instead. func (DisappearingMode_Initiator) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{45, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{46, 1} } type ContextInfo_ExternalAdReplyInfo_MediaType int32 @@ -1754,11 +1698,11 @@ func (x ContextInfo_ExternalAdReplyInfo_MediaType) String() string { } func (ContextInfo_ExternalAdReplyInfo_MediaType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[26].Descriptor() + return file_binary_proto_def_proto_enumTypes[25].Descriptor() } func (ContextInfo_ExternalAdReplyInfo_MediaType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[26] + return &file_binary_proto_def_proto_enumTypes[25] } func (x ContextInfo_ExternalAdReplyInfo_MediaType) Number() protoreflect.EnumNumber { @@ -1777,7 +1721,7 @@ func (x *ContextInfo_ExternalAdReplyInfo_MediaType) UnmarshalJSON(b []byte) erro // Deprecated: Use ContextInfo_ExternalAdReplyInfo_MediaType.Descriptor instead. func (ContextInfo_ExternalAdReplyInfo_MediaType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 1, 0} } type ContextInfo_AdReplyInfo_MediaType int32 @@ -1813,11 +1757,11 @@ func (x ContextInfo_AdReplyInfo_MediaType) String() string { } func (ContextInfo_AdReplyInfo_MediaType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[27].Descriptor() + return file_binary_proto_def_proto_enumTypes[26].Descriptor() } func (ContextInfo_AdReplyInfo_MediaType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[27] + return &file_binary_proto_def_proto_enumTypes[26] } func (x ContextInfo_AdReplyInfo_MediaType) Number() protoreflect.EnumNumber { @@ -1836,7 +1780,7 @@ func (x *ContextInfo_AdReplyInfo_MediaType) UnmarshalJSON(b []byte) error { // Deprecated: Use ContextInfo_AdReplyInfo_MediaType.Descriptor instead. func (ContextInfo_AdReplyInfo_MediaType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 4, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 4, 0} } type ForwardedNewsletterMessageInfo_ContentType int32 @@ -1872,11 +1816,11 @@ func (x ForwardedNewsletterMessageInfo_ContentType) String() string { } func (ForwardedNewsletterMessageInfo_ContentType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[28].Descriptor() + return file_binary_proto_def_proto_enumTypes[27].Descriptor() } func (ForwardedNewsletterMessageInfo_ContentType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[28] + return &file_binary_proto_def_proto_enumTypes[27] } func (x ForwardedNewsletterMessageInfo_ContentType) Number() protoreflect.EnumNumber { @@ -1895,7 +1839,7 @@ func (x *ForwardedNewsletterMessageInfo_ContentType) UnmarshalJSON(b []byte) err // Deprecated: Use ForwardedNewsletterMessageInfo_ContentType.Descriptor instead. func (ForwardedNewsletterMessageInfo_ContentType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{49, 0} } type BotPluginMetadata_SearchProvider int32 @@ -1928,11 +1872,11 @@ func (x BotPluginMetadata_SearchProvider) String() string { } func (BotPluginMetadata_SearchProvider) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[29].Descriptor() + return file_binary_proto_def_proto_enumTypes[28].Descriptor() } func (BotPluginMetadata_SearchProvider) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[29] + return &file_binary_proto_def_proto_enumTypes[28] } func (x BotPluginMetadata_SearchProvider) Number() protoreflect.EnumNumber { @@ -1951,7 +1895,7 @@ func (x *BotPluginMetadata_SearchProvider) UnmarshalJSON(b []byte) error { // Deprecated: Use BotPluginMetadata_SearchProvider.Descriptor instead. func (BotPluginMetadata_SearchProvider) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{50, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{51, 0} } type BotPluginMetadata_PluginType int32 @@ -1984,11 +1928,11 @@ func (x BotPluginMetadata_PluginType) String() string { } func (BotPluginMetadata_PluginType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[30].Descriptor() + return file_binary_proto_def_proto_enumTypes[29].Descriptor() } func (BotPluginMetadata_PluginType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[30] + return &file_binary_proto_def_proto_enumTypes[29] } func (x BotPluginMetadata_PluginType) Number() protoreflect.EnumNumber { @@ -2007,7 +1951,7 @@ func (x *BotPluginMetadata_PluginType) UnmarshalJSON(b []byte) error { // Deprecated: Use BotPluginMetadata_PluginType.Descriptor instead. func (BotPluginMetadata_PluginType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{50, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{51, 1} } type PaymentBackground_Type int32 @@ -2040,11 +1984,11 @@ func (x PaymentBackground_Type) String() string { } func (PaymentBackground_Type) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[31].Descriptor() + return file_binary_proto_def_proto_enumTypes[30].Descriptor() } func (PaymentBackground_Type) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[31] + return &file_binary_proto_def_proto_enumTypes[30] } func (x PaymentBackground_Type) Number() protoreflect.EnumNumber { @@ -2063,7 +2007,7 @@ func (x *PaymentBackground_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentBackground_Type.Descriptor instead. func (PaymentBackground_Type) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{56, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{57, 0} } type VideoMessage_Attribution int32 @@ -2099,11 +2043,11 @@ func (x VideoMessage_Attribution) String() string { } func (VideoMessage_Attribution) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[32].Descriptor() + return file_binary_proto_def_proto_enumTypes[31].Descriptor() } func (VideoMessage_Attribution) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[32] + return &file_binary_proto_def_proto_enumTypes[31] } func (x VideoMessage_Attribution) Number() protoreflect.EnumNumber { @@ -2122,7 +2066,7 @@ func (x *VideoMessage_Attribution) UnmarshalJSON(b []byte) error { // Deprecated: Use VideoMessage_Attribution.Descriptor instead. func (VideoMessage_Attribution) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{61, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{62, 0} } type ScheduledCallEditMessage_EditType int32 @@ -2155,11 +2099,11 @@ func (x ScheduledCallEditMessage_EditType) String() string { } func (ScheduledCallEditMessage_EditType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[33].Descriptor() + return file_binary_proto_def_proto_enumTypes[32].Descriptor() } func (ScheduledCallEditMessage_EditType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[33] + return &file_binary_proto_def_proto_enumTypes[32] } func (x ScheduledCallEditMessage_EditType) Number() protoreflect.EnumNumber { @@ -2178,7 +2122,7 @@ func (x *ScheduledCallEditMessage_EditType) UnmarshalJSON(b []byte) error { // Deprecated: Use ScheduledCallEditMessage_EditType.Descriptor instead. func (ScheduledCallEditMessage_EditType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{68, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{69, 0} } type ScheduledCallCreationMessage_CallType int32 @@ -2214,11 +2158,11 @@ func (x ScheduledCallCreationMessage_CallType) String() string { } func (ScheduledCallCreationMessage_CallType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[34].Descriptor() + return file_binary_proto_def_proto_enumTypes[33].Descriptor() } func (ScheduledCallCreationMessage_CallType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[34] + return &file_binary_proto_def_proto_enumTypes[33] } func (x ScheduledCallCreationMessage_CallType) Number() protoreflect.EnumNumber { @@ -2237,7 +2181,7 @@ func (x *ScheduledCallCreationMessage_CallType) UnmarshalJSON(b []byte) error { // Deprecated: Use ScheduledCallCreationMessage_CallType.Descriptor instead. func (ScheduledCallCreationMessage_CallType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{69, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{70, 0} } type RequestWelcomeMessageMetadata_LocalChatState int32 @@ -2270,11 +2214,11 @@ func (x RequestWelcomeMessageMetadata_LocalChatState) String() string { } func (RequestWelcomeMessageMetadata_LocalChatState) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[35].Descriptor() + return file_binary_proto_def_proto_enumTypes[34].Descriptor() } func (RequestWelcomeMessageMetadata_LocalChatState) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[35] + return &file_binary_proto_def_proto_enumTypes[34] } func (x RequestWelcomeMessageMetadata_LocalChatState) Number() protoreflect.EnumNumber { @@ -2293,7 +2237,7 @@ func (x *RequestWelcomeMessageMetadata_LocalChatState) UnmarshalJSON(b []byte) e // Deprecated: Use RequestWelcomeMessageMetadata_LocalChatState.Descriptor instead. func (RequestWelcomeMessageMetadata_LocalChatState) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{70, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{71, 0} } type ProtocolMessage_Type int32 @@ -2314,6 +2258,7 @@ const ( ProtocolMessage_PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE ProtocolMessage_Type = 17 ProtocolMessage_REQUEST_WELCOME_MESSAGE ProtocolMessage_Type = 18 ProtocolMessage_BOT_FEEDBACK_MESSAGE ProtocolMessage_Type = 19 + ProtocolMessage_MEDIA_NOTIFY_MESSAGE ProtocolMessage_Type = 20 ) // Enum value maps for ProtocolMessage_Type. @@ -2334,6 +2279,7 @@ var ( 17: "PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE", 18: "REQUEST_WELCOME_MESSAGE", 19: "BOT_FEEDBACK_MESSAGE", + 20: "MEDIA_NOTIFY_MESSAGE", } ProtocolMessage_Type_value = map[string]int32{ "REVOKE": 0, @@ -2351,6 +2297,7 @@ var ( "PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE": 17, "REQUEST_WELCOME_MESSAGE": 18, "BOT_FEEDBACK_MESSAGE": 19, + "MEDIA_NOTIFY_MESSAGE": 20, } ) @@ -2365,11 +2312,11 @@ func (x ProtocolMessage_Type) String() string { } func (ProtocolMessage_Type) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[36].Descriptor() + return file_binary_proto_def_proto_enumTypes[35].Descriptor() } func (ProtocolMessage_Type) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[36] + return &file_binary_proto_def_proto_enumTypes[35] } func (x ProtocolMessage_Type) Number() protoreflect.EnumNumber { @@ -2388,7 +2335,60 @@ func (x *ProtocolMessage_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use ProtocolMessage_Type.Descriptor instead. func (ProtocolMessage_Type) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{74, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{75, 0} +} + +type PlaceholderMessage_PlaceholderType int32 + +const ( + PlaceholderMessage_MASK_LINKED_DEVICES PlaceholderMessage_PlaceholderType = 0 +) + +// Enum value maps for PlaceholderMessage_PlaceholderType. +var ( + PlaceholderMessage_PlaceholderType_name = map[int32]string{ + 0: "MASK_LINKED_DEVICES", + } + PlaceholderMessage_PlaceholderType_value = map[string]int32{ + "MASK_LINKED_DEVICES": 0, + } +) + +func (x PlaceholderMessage_PlaceholderType) Enum() *PlaceholderMessage_PlaceholderType { + p := new(PlaceholderMessage_PlaceholderType) + *p = x + return p +} + +func (x PlaceholderMessage_PlaceholderType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PlaceholderMessage_PlaceholderType) Descriptor() protoreflect.EnumDescriptor { + return file_binary_proto_def_proto_enumTypes[36].Descriptor() +} + +func (PlaceholderMessage_PlaceholderType) Type() protoreflect.EnumType { + return &file_binary_proto_def_proto_enumTypes[36] +} + +func (x PlaceholderMessage_PlaceholderType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *PlaceholderMessage_PlaceholderType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = PlaceholderMessage_PlaceholderType(num) + return nil +} + +// Deprecated: Use PlaceholderMessage_PlaceholderType.Descriptor instead. +func (PlaceholderMessage_PlaceholderType) EnumDescriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 0} } type PinInChatMessage_Type int32 @@ -2447,7 +2447,7 @@ func (x *PinInChatMessage_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use PinInChatMessage_Type.Descriptor instead. func (PinInChatMessage_Type) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{81, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{83, 0} } type PaymentInviteMessage_ServiceType int32 @@ -2509,7 +2509,7 @@ func (x *PaymentInviteMessage_ServiceType) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInviteMessage_ServiceType.Descriptor instead. func (PaymentInviteMessage_ServiceType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{84, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{86, 0} } type OrderMessage_OrderSurface int32 @@ -2562,7 +2562,7 @@ func (x *OrderMessage_OrderSurface) UnmarshalJSON(b []byte) error { // Deprecated: Use OrderMessage_OrderSurface.Descriptor instead. func (OrderMessage_OrderSurface) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{87, 0} } type OrderMessage_OrderStatus int32 @@ -2621,7 +2621,7 @@ func (x *OrderMessage_OrderStatus) UnmarshalJSON(b []byte) error { // Deprecated: Use OrderMessage_OrderStatus.Descriptor instead. func (OrderMessage_OrderStatus) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{87, 1} } type ListResponseMessage_ListType int32 @@ -2677,7 +2677,7 @@ func (x *ListResponseMessage_ListType) UnmarshalJSON(b []byte) error { // Deprecated: Use ListResponseMessage_ListType.Descriptor instead. func (ListResponseMessage_ListType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{90, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{92, 0} } type ListMessage_ListType int32 @@ -2736,7 +2736,7 @@ func (x *ListMessage_ListType) UnmarshalJSON(b []byte) error { // Deprecated: Use ListMessage_ListType.Descriptor instead. func (ListMessage_ListType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 0} } type InvoiceMessage_AttachmentType int32 @@ -2792,7 +2792,7 @@ func (x *InvoiceMessage_AttachmentType) UnmarshalJSON(b []byte) error { // Deprecated: Use InvoiceMessage_AttachmentType.Descriptor instead. func (InvoiceMessage_AttachmentType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{95, 0} } type InteractiveResponseMessage_Body_Format int32 @@ -2848,7 +2848,69 @@ func (x *InteractiveResponseMessage_Body_Format) UnmarshalJSON(b []byte) error { // Deprecated: Use InteractiveResponseMessage_Body_Format.Descriptor instead. func (InteractiveResponseMessage_Body_Format) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{94, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{96, 1, 0} +} + +type InteractiveMessage_ShopMessage_Surface int32 + +const ( + InteractiveMessage_ShopMessage_UNKNOWN_SURFACE InteractiveMessage_ShopMessage_Surface = 0 + InteractiveMessage_ShopMessage_FB InteractiveMessage_ShopMessage_Surface = 1 + InteractiveMessage_ShopMessage_IG InteractiveMessage_ShopMessage_Surface = 2 + InteractiveMessage_ShopMessage_WA InteractiveMessage_ShopMessage_Surface = 3 +) + +// Enum value maps for InteractiveMessage_ShopMessage_Surface. +var ( + InteractiveMessage_ShopMessage_Surface_name = map[int32]string{ + 0: "UNKNOWN_SURFACE", + 1: "FB", + 2: "IG", + 3: "WA", + } + InteractiveMessage_ShopMessage_Surface_value = map[string]int32{ + "UNKNOWN_SURFACE": 0, + "FB": 1, + "IG": 2, + "WA": 3, + } +) + +func (x InteractiveMessage_ShopMessage_Surface) Enum() *InteractiveMessage_ShopMessage_Surface { + p := new(InteractiveMessage_ShopMessage_Surface) + *p = x + return p +} + +func (x InteractiveMessage_ShopMessage_Surface) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InteractiveMessage_ShopMessage_Surface) Descriptor() protoreflect.EnumDescriptor { + return file_binary_proto_def_proto_enumTypes[45].Descriptor() +} + +func (InteractiveMessage_ShopMessage_Surface) Type() protoreflect.EnumType { + return &file_binary_proto_def_proto_enumTypes[45] +} + +func (x InteractiveMessage_ShopMessage_Surface) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *InteractiveMessage_ShopMessage_Surface) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = InteractiveMessage_ShopMessage_Surface(num) + return nil +} + +// Deprecated: Use InteractiveMessage_ShopMessage_Surface.Descriptor instead. +func (InteractiveMessage_ShopMessage_Surface) EnumDescriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 6, 0} } type PastParticipant_LeaveReason int32 @@ -2881,11 +2943,11 @@ func (x PastParticipant_LeaveReason) String() string { } func (PastParticipant_LeaveReason) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[45].Descriptor() + return file_binary_proto_def_proto_enumTypes[46].Descriptor() } func (PastParticipant_LeaveReason) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[45] + return &file_binary_proto_def_proto_enumTypes[46] } func (x PastParticipant_LeaveReason) Number() protoreflect.EnumNumber { @@ -2904,7 +2966,7 @@ func (x *PastParticipant_LeaveReason) UnmarshalJSON(b []byte) error { // Deprecated: Use PastParticipant_LeaveReason.Descriptor instead. func (PastParticipant_LeaveReason) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{101, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{104, 0} } type HistorySync_HistorySyncType int32 @@ -2952,11 +3014,11 @@ func (x HistorySync_HistorySyncType) String() string { } func (HistorySync_HistorySyncType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[46].Descriptor() + return file_binary_proto_def_proto_enumTypes[47].Descriptor() } func (HistorySync_HistorySyncType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[46] + return &file_binary_proto_def_proto_enumTypes[47] } func (x HistorySync_HistorySyncType) Number() protoreflect.EnumNumber { @@ -2975,7 +3037,7 @@ func (x *HistorySync_HistorySyncType) UnmarshalJSON(b []byte) error { // Deprecated: Use HistorySync_HistorySyncType.Descriptor instead. func (HistorySync_HistorySyncType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{103, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{106, 0} } type HistorySync_BotAIWaitListState int32 @@ -3008,11 +3070,11 @@ func (x HistorySync_BotAIWaitListState) String() string { } func (HistorySync_BotAIWaitListState) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[47].Descriptor() + return file_binary_proto_def_proto_enumTypes[48].Descriptor() } func (HistorySync_BotAIWaitListState) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[47] + return &file_binary_proto_def_proto_enumTypes[48] } func (x HistorySync_BotAIWaitListState) Number() protoreflect.EnumNumber { @@ -3031,7 +3093,7 @@ func (x *HistorySync_BotAIWaitListState) UnmarshalJSON(b []byte) error { // Deprecated: Use HistorySync_BotAIWaitListState.Descriptor instead. func (HistorySync_BotAIWaitListState) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{103, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{106, 1} } type GroupParticipant_Rank int32 @@ -3067,11 +3129,11 @@ func (x GroupParticipant_Rank) String() string { } func (GroupParticipant_Rank) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[48].Descriptor() + return file_binary_proto_def_proto_enumTypes[49].Descriptor() } func (GroupParticipant_Rank) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[48] + return &file_binary_proto_def_proto_enumTypes[49] } func (x GroupParticipant_Rank) Number() protoreflect.EnumNumber { @@ -3090,7 +3152,7 @@ func (x *GroupParticipant_Rank) UnmarshalJSON(b []byte) error { // Deprecated: Use GroupParticipant_Rank.Descriptor instead. func (GroupParticipant_Rank) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{105, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{108, 0} } type Conversation_EndOfHistoryTransferType int32 @@ -3126,11 +3188,11 @@ func (x Conversation_EndOfHistoryTransferType) String() string { } func (Conversation_EndOfHistoryTransferType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[49].Descriptor() + return file_binary_proto_def_proto_enumTypes[50].Descriptor() } func (Conversation_EndOfHistoryTransferType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[49] + return &file_binary_proto_def_proto_enumTypes[50] } func (x Conversation_EndOfHistoryTransferType) Number() protoreflect.EnumNumber { @@ -3149,7 +3211,7 @@ func (x *Conversation_EndOfHistoryTransferType) UnmarshalJSON(b []byte) error { // Deprecated: Use Conversation_EndOfHistoryTransferType.Descriptor instead. func (Conversation_EndOfHistoryTransferType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{107, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{110, 0} } type MediaRetryNotification_ResultType int32 @@ -3188,11 +3250,11 @@ func (x MediaRetryNotification_ResultType) String() string { } func (MediaRetryNotification_ResultType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[50].Descriptor() + return file_binary_proto_def_proto_enumTypes[51].Descriptor() } func (MediaRetryNotification_ResultType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[50] + return &file_binary_proto_def_proto_enumTypes[51] } func (x MediaRetryNotification_ResultType) Number() protoreflect.EnumNumber { @@ -3211,7 +3273,7 @@ func (x *MediaRetryNotification_ResultType) UnmarshalJSON(b []byte) error { // Deprecated: Use MediaRetryNotification_ResultType.Descriptor instead. func (MediaRetryNotification_ResultType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{111, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{114, 0} } type SyncdMutation_SyncdOperation int32 @@ -3244,11 +3306,11 @@ func (x SyncdMutation_SyncdOperation) String() string { } func (SyncdMutation_SyncdOperation) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[51].Descriptor() + return file_binary_proto_def_proto_enumTypes[52].Descriptor() } func (SyncdMutation_SyncdOperation) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[51] + return &file_binary_proto_def_proto_enumTypes[52] } func (x SyncdMutation_SyncdOperation) Number() protoreflect.EnumNumber { @@ -3267,7 +3329,7 @@ func (x *SyncdMutation_SyncdOperation) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncdMutation_SyncdOperation.Descriptor instead. func (SyncdMutation_SyncdOperation) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{119, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{122, 0} } type StatusPrivacyAction_StatusDistributionMode int32 @@ -3303,11 +3365,11 @@ func (x StatusPrivacyAction_StatusDistributionMode) String() string { } func (StatusPrivacyAction_StatusDistributionMode) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[52].Descriptor() + return file_binary_proto_def_proto_enumTypes[53].Descriptor() } func (StatusPrivacyAction_StatusDistributionMode) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[52] + return &file_binary_proto_def_proto_enumTypes[53] } func (x StatusPrivacyAction_StatusDistributionMode) Number() protoreflect.EnumNumber { @@ -3326,7 +3388,7 @@ func (x *StatusPrivacyAction_StatusDistributionMode) UnmarshalJSON(b []byte) err // Deprecated: Use StatusPrivacyAction_StatusDistributionMode.Descriptor instead. func (StatusPrivacyAction_StatusDistributionMode) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{132, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{135, 0} } type MarketingMessageAction_MarketingMessagePrototypeType int32 @@ -3356,11 +3418,11 @@ func (x MarketingMessageAction_MarketingMessagePrototypeType) String() string { } func (MarketingMessageAction_MarketingMessagePrototypeType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[53].Descriptor() + return file_binary_proto_def_proto_enumTypes[54].Descriptor() } func (MarketingMessageAction_MarketingMessagePrototypeType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[53] + return &file_binary_proto_def_proto_enumTypes[54] } func (x MarketingMessageAction_MarketingMessagePrototypeType) Number() protoreflect.EnumNumber { @@ -3379,7 +3441,7 @@ func (x *MarketingMessageAction_MarketingMessagePrototypeType) UnmarshalJSON(b [ // Deprecated: Use MarketingMessageAction_MarketingMessagePrototypeType.Descriptor instead. func (MarketingMessageAction_MarketingMessagePrototypeType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{151, 0} } type PatchDebugData_Platform int32 @@ -3427,11 +3489,11 @@ func (x PatchDebugData_Platform) String() string { } func (PatchDebugData_Platform) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[54].Descriptor() + return file_binary_proto_def_proto_enumTypes[55].Descriptor() } func (PatchDebugData_Platform) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[54] + return &file_binary_proto_def_proto_enumTypes[55] } func (x PatchDebugData_Platform) Number() protoreflect.EnumNumber { @@ -3450,7 +3512,7 @@ func (x *PatchDebugData_Platform) UnmarshalJSON(b []byte) error { // Deprecated: Use PatchDebugData_Platform.Descriptor instead. func (PatchDebugData_Platform) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{170, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{176, 0} } type CallLogRecord_SilenceReason int32 @@ -3489,11 +3551,11 @@ func (x CallLogRecord_SilenceReason) String() string { } func (CallLogRecord_SilenceReason) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[55].Descriptor() + return file_binary_proto_def_proto_enumTypes[56].Descriptor() } func (CallLogRecord_SilenceReason) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[55] + return &file_binary_proto_def_proto_enumTypes[56] } func (x CallLogRecord_SilenceReason) Number() protoreflect.EnumNumber { @@ -3512,7 +3574,7 @@ func (x *CallLogRecord_SilenceReason) UnmarshalJSON(b []byte) error { // Deprecated: Use CallLogRecord_SilenceReason.Descriptor instead. func (CallLogRecord_SilenceReason) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{171, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{177, 0} } type CallLogRecord_CallType int32 @@ -3548,11 +3610,11 @@ func (x CallLogRecord_CallType) String() string { } func (CallLogRecord_CallType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[56].Descriptor() + return file_binary_proto_def_proto_enumTypes[57].Descriptor() } func (CallLogRecord_CallType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[56] + return &file_binary_proto_def_proto_enumTypes[57] } func (x CallLogRecord_CallType) Number() protoreflect.EnumNumber { @@ -3571,7 +3633,7 @@ func (x *CallLogRecord_CallType) UnmarshalJSON(b []byte) error { // Deprecated: Use CallLogRecord_CallType.Descriptor instead. func (CallLogRecord_CallType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{171, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{177, 1} } type CallLogRecord_CallResult int32 @@ -3631,11 +3693,11 @@ func (x CallLogRecord_CallResult) String() string { } func (CallLogRecord_CallResult) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[57].Descriptor() + return file_binary_proto_def_proto_enumTypes[58].Descriptor() } func (CallLogRecord_CallResult) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[57] + return &file_binary_proto_def_proto_enumTypes[58] } func (x CallLogRecord_CallResult) Number() protoreflect.EnumNumber { @@ -3654,7 +3716,7 @@ func (x *CallLogRecord_CallResult) UnmarshalJSON(b []byte) error { // Deprecated: Use CallLogRecord_CallResult.Descriptor instead. func (CallLogRecord_CallResult) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{171, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{177, 2} } type BizIdentityInfo_VerifiedLevelValue int32 @@ -3690,11 +3752,11 @@ func (x BizIdentityInfo_VerifiedLevelValue) String() string { } func (BizIdentityInfo_VerifiedLevelValue) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[58].Descriptor() + return file_binary_proto_def_proto_enumTypes[59].Descriptor() } func (BizIdentityInfo_VerifiedLevelValue) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[58] + return &file_binary_proto_def_proto_enumTypes[59] } func (x BizIdentityInfo_VerifiedLevelValue) Number() protoreflect.EnumNumber { @@ -3713,7 +3775,7 @@ func (x *BizIdentityInfo_VerifiedLevelValue) UnmarshalJSON(b []byte) error { // Deprecated: Use BizIdentityInfo_VerifiedLevelValue.Descriptor instead. func (BizIdentityInfo_VerifiedLevelValue) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{174, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{180, 0} } type BizIdentityInfo_HostStorageType int32 @@ -3746,11 +3808,11 @@ func (x BizIdentityInfo_HostStorageType) String() string { } func (BizIdentityInfo_HostStorageType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[59].Descriptor() + return file_binary_proto_def_proto_enumTypes[60].Descriptor() } func (BizIdentityInfo_HostStorageType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[59] + return &file_binary_proto_def_proto_enumTypes[60] } func (x BizIdentityInfo_HostStorageType) Number() protoreflect.EnumNumber { @@ -3769,7 +3831,7 @@ func (x *BizIdentityInfo_HostStorageType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizIdentityInfo_HostStorageType.Descriptor instead. func (BizIdentityInfo_HostStorageType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{174, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{180, 1} } type BizIdentityInfo_ActualActorsType int32 @@ -3802,11 +3864,11 @@ func (x BizIdentityInfo_ActualActorsType) String() string { } func (BizIdentityInfo_ActualActorsType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[60].Descriptor() + return file_binary_proto_def_proto_enumTypes[61].Descriptor() } func (BizIdentityInfo_ActualActorsType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[60] + return &file_binary_proto_def_proto_enumTypes[61] } func (x BizIdentityInfo_ActualActorsType) Number() protoreflect.EnumNumber { @@ -3825,7 +3887,7 @@ func (x *BizIdentityInfo_ActualActorsType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizIdentityInfo_ActualActorsType.Descriptor instead. func (BizIdentityInfo_ActualActorsType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{174, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{180, 2} } type BizAccountLinkInfo_HostStorageType int32 @@ -3858,11 +3920,11 @@ func (x BizAccountLinkInfo_HostStorageType) String() string { } func (BizAccountLinkInfo_HostStorageType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[61].Descriptor() + return file_binary_proto_def_proto_enumTypes[62].Descriptor() } func (BizAccountLinkInfo_HostStorageType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[61] + return &file_binary_proto_def_proto_enumTypes[62] } func (x BizAccountLinkInfo_HostStorageType) Number() protoreflect.EnumNumber { @@ -3881,7 +3943,7 @@ func (x *BizAccountLinkInfo_HostStorageType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizAccountLinkInfo_HostStorageType.Descriptor instead. func (BizAccountLinkInfo_HostStorageType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{176, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{182, 0} } type BizAccountLinkInfo_AccountType int32 @@ -3911,11 +3973,11 @@ func (x BizAccountLinkInfo_AccountType) String() string { } func (BizAccountLinkInfo_AccountType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[62].Descriptor() + return file_binary_proto_def_proto_enumTypes[63].Descriptor() } func (BizAccountLinkInfo_AccountType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[62] + return &file_binary_proto_def_proto_enumTypes[63] } func (x BizAccountLinkInfo_AccountType) Number() protoreflect.EnumNumber { @@ -3934,7 +3996,7 @@ func (x *BizAccountLinkInfo_AccountType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizAccountLinkInfo_AccountType.Descriptor instead. func (BizAccountLinkInfo_AccountType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{176, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{182, 1} } type ClientPayload_Product int32 @@ -3973,11 +4035,11 @@ func (x ClientPayload_Product) String() string { } func (ClientPayload_Product) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[63].Descriptor() + return file_binary_proto_def_proto_enumTypes[64].Descriptor() } func (ClientPayload_Product) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[63] + return &file_binary_proto_def_proto_enumTypes[64] } func (x ClientPayload_Product) Number() protoreflect.EnumNumber { @@ -3996,7 +4058,7 @@ func (x *ClientPayload_Product) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_Product.Descriptor instead. func (ClientPayload_Product) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 0} } type ClientPayload_IOSAppExtension int32 @@ -4032,11 +4094,11 @@ func (x ClientPayload_IOSAppExtension) String() string { } func (ClientPayload_IOSAppExtension) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[64].Descriptor() + return file_binary_proto_def_proto_enumTypes[65].Descriptor() } func (ClientPayload_IOSAppExtension) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[64] + return &file_binary_proto_def_proto_enumTypes[65] } func (x ClientPayload_IOSAppExtension) Number() protoreflect.EnumNumber { @@ -4055,7 +4117,7 @@ func (x *ClientPayload_IOSAppExtension) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_IOSAppExtension.Descriptor instead. func (ClientPayload_IOSAppExtension) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 1} } type ClientPayload_ConnectType int32 @@ -4127,11 +4189,11 @@ func (x ClientPayload_ConnectType) String() string { } func (ClientPayload_ConnectType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[65].Descriptor() + return file_binary_proto_def_proto_enumTypes[66].Descriptor() } func (ClientPayload_ConnectType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[65] + return &file_binary_proto_def_proto_enumTypes[66] } func (x ClientPayload_ConnectType) Number() protoreflect.EnumNumber { @@ -4150,7 +4212,7 @@ func (x *ClientPayload_ConnectType) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_ConnectType.Descriptor instead. func (ClientPayload_ConnectType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 2} } type ClientPayload_ConnectReason int32 @@ -4198,11 +4260,11 @@ func (x ClientPayload_ConnectReason) String() string { } func (ClientPayload_ConnectReason) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[66].Descriptor() + return file_binary_proto_def_proto_enumTypes[67].Descriptor() } func (ClientPayload_ConnectReason) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[66] + return &file_binary_proto_def_proto_enumTypes[67] } func (x ClientPayload_ConnectReason) Number() protoreflect.EnumNumber { @@ -4221,7 +4283,7 @@ func (x *ClientPayload_ConnectReason) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_ConnectReason.Descriptor instead. func (ClientPayload_ConnectReason) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 3} } type ClientPayload_WebInfo_WebSubPlatform int32 @@ -4263,11 +4325,11 @@ func (x ClientPayload_WebInfo_WebSubPlatform) String() string { } func (ClientPayload_WebInfo_WebSubPlatform) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[67].Descriptor() + return file_binary_proto_def_proto_enumTypes[68].Descriptor() } func (ClientPayload_WebInfo_WebSubPlatform) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[67] + return &file_binary_proto_def_proto_enumTypes[68] } func (x ClientPayload_WebInfo_WebSubPlatform) Number() protoreflect.EnumNumber { @@ -4286,7 +4348,7 @@ func (x *ClientPayload_WebInfo_WebSubPlatform) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_WebInfo_WebSubPlatform.Descriptor instead. func (ClientPayload_WebInfo_WebSubPlatform) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 0, 0} } type ClientPayload_UserAgent_ReleaseChannel int32 @@ -4325,11 +4387,11 @@ func (x ClientPayload_UserAgent_ReleaseChannel) String() string { } func (ClientPayload_UserAgent_ReleaseChannel) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[68].Descriptor() + return file_binary_proto_def_proto_enumTypes[69].Descriptor() } func (ClientPayload_UserAgent_ReleaseChannel) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[68] + return &file_binary_proto_def_proto_enumTypes[69] } func (x ClientPayload_UserAgent_ReleaseChannel) Number() protoreflect.EnumNumber { @@ -4348,7 +4410,7 @@ func (x *ClientPayload_UserAgent_ReleaseChannel) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_UserAgent_ReleaseChannel.Descriptor instead. func (ClientPayload_UserAgent_ReleaseChannel) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 1, 0} } type ClientPayload_UserAgent_Platform int32 @@ -4389,6 +4451,7 @@ const ( ClientPayload_UserAgent_BLUE_WEB ClientPayload_UserAgent_Platform = 32 ClientPayload_UserAgent_IPAD ClientPayload_UserAgent_Platform = 33 ClientPayload_UserAgent_TEST ClientPayload_UserAgent_Platform = 34 + ClientPayload_UserAgent_SMART_GLASSES ClientPayload_UserAgent_Platform = 35 ) // Enum value maps for ClientPayload_UserAgent_Platform. @@ -4429,6 +4492,7 @@ var ( 32: "BLUE_WEB", 33: "IPAD", 34: "TEST", + 35: "SMART_GLASSES", } ClientPayload_UserAgent_Platform_value = map[string]int32{ "ANDROID": 0, @@ -4466,6 +4530,7 @@ var ( "BLUE_WEB": 32, "IPAD": 33, "TEST": 34, + "SMART_GLASSES": 35, } ) @@ -4480,11 +4545,11 @@ func (x ClientPayload_UserAgent_Platform) String() string { } func (ClientPayload_UserAgent_Platform) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[69].Descriptor() + return file_binary_proto_def_proto_enumTypes[70].Descriptor() } func (ClientPayload_UserAgent_Platform) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[69] + return &file_binary_proto_def_proto_enumTypes[70] } func (x ClientPayload_UserAgent_Platform) Number() protoreflect.EnumNumber { @@ -4503,7 +4568,7 @@ func (x *ClientPayload_UserAgent_Platform) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_UserAgent_Platform.Descriptor instead. func (ClientPayload_UserAgent_Platform) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 1, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 1, 1} } type ClientPayload_UserAgent_DeviceType int32 @@ -4545,11 +4610,11 @@ func (x ClientPayload_UserAgent_DeviceType) String() string { } func (ClientPayload_UserAgent_DeviceType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[70].Descriptor() + return file_binary_proto_def_proto_enumTypes[71].Descriptor() } func (ClientPayload_UserAgent_DeviceType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[70] + return &file_binary_proto_def_proto_enumTypes[71] } func (x ClientPayload_UserAgent_DeviceType) Number() protoreflect.EnumNumber { @@ -4568,7 +4633,7 @@ func (x *ClientPayload_UserAgent_DeviceType) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_UserAgent_DeviceType.Descriptor instead. func (ClientPayload_UserAgent_DeviceType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 1, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 1, 2} } type ClientPayload_DNSSource_DNSResolutionMethod int32 @@ -4610,11 +4675,11 @@ func (x ClientPayload_DNSSource_DNSResolutionMethod) String() string { } func (ClientPayload_DNSSource_DNSResolutionMethod) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[71].Descriptor() + return file_binary_proto_def_proto_enumTypes[72].Descriptor() } func (ClientPayload_DNSSource_DNSResolutionMethod) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[71] + return &file_binary_proto_def_proto_enumTypes[72] } func (x ClientPayload_DNSSource_DNSResolutionMethod) Number() protoreflect.EnumNumber { @@ -4633,7 +4698,7 @@ func (x *ClientPayload_DNSSource_DNSResolutionMethod) UnmarshalJSON(b []byte) er // Deprecated: Use ClientPayload_DNSSource_DNSResolutionMethod.Descriptor instead. func (ClientPayload_DNSSource_DNSResolutionMethod) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 4, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 4, 0} } type WebMessageInfo_StubType int32 @@ -5263,11 +5328,11 @@ func (x WebMessageInfo_StubType) String() string { } func (WebMessageInfo_StubType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[72].Descriptor() + return file_binary_proto_def_proto_enumTypes[73].Descriptor() } func (WebMessageInfo_StubType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[72] + return &file_binary_proto_def_proto_enumTypes[73] } func (x WebMessageInfo_StubType) Number() protoreflect.EnumNumber { @@ -5286,7 +5351,7 @@ func (x *WebMessageInfo_StubType) UnmarshalJSON(b []byte) error { // Deprecated: Use WebMessageInfo_StubType.Descriptor instead. func (WebMessageInfo_StubType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{183, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{189, 0} } type WebMessageInfo_Status int32 @@ -5331,11 +5396,11 @@ func (x WebMessageInfo_Status) String() string { } func (WebMessageInfo_Status) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[73].Descriptor() + return file_binary_proto_def_proto_enumTypes[74].Descriptor() } func (WebMessageInfo_Status) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[73] + return &file_binary_proto_def_proto_enumTypes[74] } func (x WebMessageInfo_Status) Number() protoreflect.EnumNumber { @@ -5354,7 +5419,7 @@ func (x *WebMessageInfo_Status) UnmarshalJSON(b []byte) error { // Deprecated: Use WebMessageInfo_Status.Descriptor instead. func (WebMessageInfo_Status) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{183, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{189, 1} } type WebMessageInfo_BizPrivacyStatus int32 @@ -5393,11 +5458,11 @@ func (x WebMessageInfo_BizPrivacyStatus) String() string { } func (WebMessageInfo_BizPrivacyStatus) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[74].Descriptor() + return file_binary_proto_def_proto_enumTypes[75].Descriptor() } func (WebMessageInfo_BizPrivacyStatus) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[74] + return &file_binary_proto_def_proto_enumTypes[75] } func (x WebMessageInfo_BizPrivacyStatus) Number() protoreflect.EnumNumber { @@ -5416,7 +5481,7 @@ func (x *WebMessageInfo_BizPrivacyStatus) UnmarshalJSON(b []byte) error { // Deprecated: Use WebMessageInfo_BizPrivacyStatus.Descriptor instead. func (WebMessageInfo_BizPrivacyStatus) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{183, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{189, 2} } type WebFeatures_Flag int32 @@ -5455,11 +5520,11 @@ func (x WebFeatures_Flag) String() string { } func (WebFeatures_Flag) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[75].Descriptor() + return file_binary_proto_def_proto_enumTypes[76].Descriptor() } func (WebFeatures_Flag) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[75] + return &file_binary_proto_def_proto_enumTypes[76] } func (x WebFeatures_Flag) Number() protoreflect.EnumNumber { @@ -5478,7 +5543,7 @@ func (x *WebFeatures_Flag) UnmarshalJSON(b []byte) error { // Deprecated: Use WebFeatures_Flag.Descriptor instead. func (WebFeatures_Flag) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{184, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{190, 0} } type PinInChat_Type int32 @@ -5514,11 +5579,11 @@ func (x PinInChat_Type) String() string { } func (PinInChat_Type) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[76].Descriptor() + return file_binary_proto_def_proto_enumTypes[77].Descriptor() } func (PinInChat_Type) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[76] + return &file_binary_proto_def_proto_enumTypes[77] } func (x PinInChat_Type) Number() protoreflect.EnumNumber { @@ -5537,7 +5602,7 @@ func (x *PinInChat_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use PinInChat_Type.Descriptor instead. func (PinInChat_Type) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{192, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{198, 0} } type PaymentInfo_TxnStatus int32 @@ -5660,11 +5725,11 @@ func (x PaymentInfo_TxnStatus) String() string { } func (PaymentInfo_TxnStatus) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[77].Descriptor() + return file_binary_proto_def_proto_enumTypes[78].Descriptor() } func (PaymentInfo_TxnStatus) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[77] + return &file_binary_proto_def_proto_enumTypes[78] } func (x PaymentInfo_TxnStatus) Number() protoreflect.EnumNumber { @@ -5683,7 +5748,7 @@ func (x *PaymentInfo_TxnStatus) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInfo_TxnStatus.Descriptor instead. func (PaymentInfo_TxnStatus) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{194, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{200, 0} } type PaymentInfo_Status int32 @@ -5746,11 +5811,11 @@ func (x PaymentInfo_Status) String() string { } func (PaymentInfo_Status) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[78].Descriptor() + return file_binary_proto_def_proto_enumTypes[79].Descriptor() } func (PaymentInfo_Status) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[78] + return &file_binary_proto_def_proto_enumTypes[79] } func (x PaymentInfo_Status) Number() protoreflect.EnumNumber { @@ -5769,7 +5834,7 @@ func (x *PaymentInfo_Status) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInfo_Status.Descriptor instead. func (PaymentInfo_Status) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{194, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{200, 1} } type PaymentInfo_Currency int32 @@ -5802,11 +5867,11 @@ func (x PaymentInfo_Currency) String() string { } func (PaymentInfo_Currency) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[79].Descriptor() + return file_binary_proto_def_proto_enumTypes[80].Descriptor() } func (PaymentInfo_Currency) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[79] + return &file_binary_proto_def_proto_enumTypes[80] } func (x PaymentInfo_Currency) Number() protoreflect.EnumNumber { @@ -5825,7 +5890,7 @@ func (x *PaymentInfo_Currency) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInfo_Currency.Descriptor instead. func (PaymentInfo_Currency) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{194, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{200, 2} } type QP_FilterResult int32 @@ -5861,11 +5926,11 @@ func (x QP_FilterResult) String() string { } func (QP_FilterResult) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[80].Descriptor() + return file_binary_proto_def_proto_enumTypes[81].Descriptor() } func (QP_FilterResult) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[80] + return &file_binary_proto_def_proto_enumTypes[81] } func (x QP_FilterResult) Number() protoreflect.EnumNumber { @@ -5884,7 +5949,7 @@ func (x *QP_FilterResult) UnmarshalJSON(b []byte) error { // Deprecated: Use QP_FilterResult.Descriptor instead. func (QP_FilterResult) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209, 0} } type QP_FilterClientNotSupportedConfig int32 @@ -5917,11 +5982,11 @@ func (x QP_FilterClientNotSupportedConfig) String() string { } func (QP_FilterClientNotSupportedConfig) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[81].Descriptor() + return file_binary_proto_def_proto_enumTypes[82].Descriptor() } func (QP_FilterClientNotSupportedConfig) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[81] + return &file_binary_proto_def_proto_enumTypes[82] } func (x QP_FilterClientNotSupportedConfig) Number() protoreflect.EnumNumber { @@ -5940,7 +6005,7 @@ func (x *QP_FilterClientNotSupportedConfig) UnmarshalJSON(b []byte) error { // Deprecated: Use QP_FilterClientNotSupportedConfig.Descriptor instead. func (QP_FilterClientNotSupportedConfig) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209, 1} } type QP_ClauseType int32 @@ -5976,11 +6041,11 @@ func (x QP_ClauseType) String() string { } func (QP_ClauseType) Descriptor() protoreflect.EnumDescriptor { - return file_binary_proto_def_proto_enumTypes[82].Descriptor() + return file_binary_proto_def_proto_enumTypes[83].Descriptor() } func (QP_ClauseType) Type() protoreflect.EnumType { - return &file_binary_proto_def_proto_enumTypes[82] + return &file_binary_proto_def_proto_enumTypes[83] } func (x QP_ClauseType) Number() protoreflect.EnumNumber { @@ -5999,7 +6064,7 @@ func (x *QP_ClauseType) UnmarshalJSON(b []byte) error { // Deprecated: Use QP_ClauseType.Descriptor instead. func (QP_ClauseType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209, 2} } type ADVSignedKeyIndexList struct { @@ -6436,147 +6501,6 @@ func (x *DeviceProps) GetHistorySyncConfig() *DeviceProps_HistorySyncConfig { return nil } -type InteractiveMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *InteractiveMessage_Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` - Body *InteractiveMessage_Body `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"` - Footer *InteractiveMessage_Footer `protobuf:"bytes,3,opt,name=footer" json:"footer,omitempty"` - ContextInfo *ContextInfo `protobuf:"bytes,15,opt,name=contextInfo" json:"contextInfo,omitempty"` - // Types that are assignable to InteractiveMessage: - // - // *InteractiveMessage_ShopStorefrontMessage - // *InteractiveMessage_CollectionMessage_ - // *InteractiveMessage_NativeFlowMessage_ - // *InteractiveMessage_CarouselMessage_ - InteractiveMessage isInteractiveMessage_InteractiveMessage `protobuf_oneof:"interactiveMessage"` -} - -func (x *InteractiveMessage) Reset() { - *x = InteractiveMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage) ProtoMessage() {} - -func (x *InteractiveMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage.ProtoReflect.Descriptor instead. -func (*InteractiveMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6} -} - -func (x *InteractiveMessage) GetHeader() *InteractiveMessage_Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *InteractiveMessage) GetBody() *InteractiveMessage_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *InteractiveMessage) GetFooter() *InteractiveMessage_Footer { - if x != nil { - return x.Footer - } - return nil -} - -func (x *InteractiveMessage) GetContextInfo() *ContextInfo { - if x != nil { - return x.ContextInfo - } - return nil -} - -func (m *InteractiveMessage) GetInteractiveMessage() isInteractiveMessage_InteractiveMessage { - if m != nil { - return m.InteractiveMessage - } - return nil -} - -func (x *InteractiveMessage) GetShopStorefrontMessage() *InteractiveMessage_ShopMessage { - if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_ShopStorefrontMessage); ok { - return x.ShopStorefrontMessage - } - return nil -} - -func (x *InteractiveMessage) GetCollectionMessage() *InteractiveMessage_CollectionMessage { - if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_CollectionMessage_); ok { - return x.CollectionMessage - } - return nil -} - -func (x *InteractiveMessage) GetNativeFlowMessage() *InteractiveMessage_NativeFlowMessage { - if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_NativeFlowMessage_); ok { - return x.NativeFlowMessage - } - return nil -} - -func (x *InteractiveMessage) GetCarouselMessage() *InteractiveMessage_CarouselMessage { - if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_CarouselMessage_); ok { - return x.CarouselMessage - } - return nil -} - -type isInteractiveMessage_InteractiveMessage interface { - isInteractiveMessage_InteractiveMessage() -} - -type InteractiveMessage_ShopStorefrontMessage struct { - ShopStorefrontMessage *InteractiveMessage_ShopMessage `protobuf:"bytes,4,opt,name=shopStorefrontMessage,oneof"` -} - -type InteractiveMessage_CollectionMessage_ struct { - CollectionMessage *InteractiveMessage_CollectionMessage `protobuf:"bytes,5,opt,name=collectionMessage,oneof"` -} - -type InteractiveMessage_NativeFlowMessage_ struct { - NativeFlowMessage *InteractiveMessage_NativeFlowMessage `protobuf:"bytes,6,opt,name=nativeFlowMessage,oneof"` -} - -type InteractiveMessage_CarouselMessage_ struct { - CarouselMessage *InteractiveMessage_CarouselMessage `protobuf:"bytes,7,opt,name=carouselMessage,oneof"` -} - -func (*InteractiveMessage_ShopStorefrontMessage) isInteractiveMessage_InteractiveMessage() {} - -func (*InteractiveMessage_CollectionMessage_) isInteractiveMessage_InteractiveMessage() {} - -func (*InteractiveMessage_NativeFlowMessage_) isInteractiveMessage_InteractiveMessage() {} - -func (*InteractiveMessage_CarouselMessage_) isInteractiveMessage_InteractiveMessage() {} - type InitialSecurityNotificationSettingSync struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6588,7 +6512,7 @@ type InitialSecurityNotificationSettingSync struct { func (x *InitialSecurityNotificationSettingSync) Reset() { *x = InitialSecurityNotificationSettingSync{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[7] + mi := &file_binary_proto_def_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6601,7 +6525,7 @@ func (x *InitialSecurityNotificationSettingSync) String() string { func (*InitialSecurityNotificationSettingSync) ProtoMessage() {} func (x *InitialSecurityNotificationSettingSync) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[7] + mi := &file_binary_proto_def_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6614,7 +6538,7 @@ func (x *InitialSecurityNotificationSettingSync) ProtoReflect() protoreflect.Mes // Deprecated: Use InitialSecurityNotificationSettingSync.ProtoReflect.Descriptor instead. func (*InitialSecurityNotificationSettingSync) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{7} + return file_binary_proto_def_proto_rawDescGZIP(), []int{6} } func (x *InitialSecurityNotificationSettingSync) GetSecurityNotificationEnabled() bool { @@ -6661,7 +6585,7 @@ type ImageMessage struct { func (x *ImageMessage) Reset() { *x = ImageMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[8] + mi := &file_binary_proto_def_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6674,7 +6598,7 @@ func (x *ImageMessage) String() string { func (*ImageMessage) ProtoMessage() {} func (x *ImageMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[8] + mi := &file_binary_proto_def_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6687,7 +6611,7 @@ func (x *ImageMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ImageMessage.ProtoReflect.Descriptor instead. func (*ImageMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{8} + return file_binary_proto_def_proto_rawDescGZIP(), []int{7} } func (x *ImageMessage) GetUrl() string { @@ -6901,7 +6825,7 @@ type HistorySyncNotification struct { func (x *HistorySyncNotification) Reset() { *x = HistorySyncNotification{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[9] + mi := &file_binary_proto_def_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6914,7 +6838,7 @@ func (x *HistorySyncNotification) String() string { func (*HistorySyncNotification) ProtoMessage() {} func (x *HistorySyncNotification) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[9] + mi := &file_binary_proto_def_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6927,7 +6851,7 @@ func (x *HistorySyncNotification) ProtoReflect() protoreflect.Message { // Deprecated: Use HistorySyncNotification.ProtoReflect.Descriptor instead. func (*HistorySyncNotification) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{9} + return file_binary_proto_def_proto_rawDescGZIP(), []int{8} } func (x *HistorySyncNotification) GetFileSha256() []byte { @@ -7033,7 +6957,7 @@ type HighlyStructuredMessage struct { func (x *HighlyStructuredMessage) Reset() { *x = HighlyStructuredMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[10] + mi := &file_binary_proto_def_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7046,7 +6970,7 @@ func (x *HighlyStructuredMessage) String() string { func (*HighlyStructuredMessage) ProtoMessage() {} func (x *HighlyStructuredMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[10] + mi := &file_binary_proto_def_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7059,7 +6983,7 @@ func (x *HighlyStructuredMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use HighlyStructuredMessage.ProtoReflect.Descriptor instead. func (*HighlyStructuredMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9} } func (x *HighlyStructuredMessage) GetNamespace() string { @@ -7143,7 +7067,7 @@ type GroupInviteMessage struct { func (x *GroupInviteMessage) Reset() { *x = GroupInviteMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[11] + mi := &file_binary_proto_def_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7156,7 +7080,7 @@ func (x *GroupInviteMessage) String() string { func (*GroupInviteMessage) ProtoMessage() {} func (x *GroupInviteMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[11] + mi := &file_binary_proto_def_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7169,7 +7093,7 @@ func (x *GroupInviteMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteMessage.ProtoReflect.Descriptor instead. func (*GroupInviteMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{11} + return file_binary_proto_def_proto_rawDescGZIP(), []int{10} } func (x *GroupInviteMessage) GetGroupJid() string { @@ -7239,7 +7163,7 @@ type FutureProofMessage struct { func (x *FutureProofMessage) Reset() { *x = FutureProofMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[12] + mi := &file_binary_proto_def_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7252,7 +7176,7 @@ func (x *FutureProofMessage) String() string { func (*FutureProofMessage) ProtoMessage() {} func (x *FutureProofMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[12] + mi := &file_binary_proto_def_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7265,7 +7189,7 @@ func (x *FutureProofMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use FutureProofMessage.ProtoReflect.Descriptor instead. func (*FutureProofMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{12} + return file_binary_proto_def_proto_rawDescGZIP(), []int{11} } func (x *FutureProofMessage) GetMessage() *Message { @@ -7275,6 +7199,61 @@ func (x *FutureProofMessage) GetMessage() *Message { return nil } +type ExtendedTextMessageWithParentKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + ExtendedTextMessage *ExtendedTextMessage `protobuf:"bytes,2,opt,name=extendedTextMessage" json:"extendedTextMessage,omitempty"` +} + +func (x *ExtendedTextMessageWithParentKey) Reset() { + *x = ExtendedTextMessageWithParentKey{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtendedTextMessageWithParentKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtendedTextMessageWithParentKey) ProtoMessage() {} + +func (x *ExtendedTextMessageWithParentKey) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendedTextMessageWithParentKey.ProtoReflect.Descriptor instead. +func (*ExtendedTextMessageWithParentKey) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{12} +} + +func (x *ExtendedTextMessageWithParentKey) GetKey() *MessageKey { + if x != nil { + return x.Key + } + return nil +} + +func (x *ExtendedTextMessageWithParentKey) GetExtendedTextMessage() *ExtendedTextMessage { + if x != nil { + return x.ExtendedTextMessage + } + return nil +} + type ExtendedTextMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9527,6 +9506,69 @@ func (x *AppStateFatalExceptionNotification) GetTimestamp() int64 { return 0 } +type MediaNotifyMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExpressPathUrl *string `protobuf:"bytes,1,opt,name=expressPathUrl" json:"expressPathUrl,omitempty"` + FileEncSha256 []byte `protobuf:"bytes,2,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"` + FileLength *uint64 `protobuf:"varint,3,opt,name=fileLength" json:"fileLength,omitempty"` +} + +func (x *MediaNotifyMessage) Reset() { + *x = MediaNotifyMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MediaNotifyMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MediaNotifyMessage) ProtoMessage() {} + +func (x *MediaNotifyMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MediaNotifyMessage.ProtoReflect.Descriptor instead. +func (*MediaNotifyMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{41} +} + +func (x *MediaNotifyMessage) GetExpressPathUrl() string { + if x != nil && x.ExpressPathUrl != nil { + return *x.ExpressPathUrl + } + return "" +} + +func (x *MediaNotifyMessage) GetFileEncSha256() []byte { + if x != nil { + return x.FileEncSha256 + } + return nil +} + +func (x *MediaNotifyMessage) GetFileLength() uint64 { + if x != nil && x.FileLength != nil { + return *x.FileLength + } + return 0 +} + type Location struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9540,7 +9582,7 @@ type Location struct { func (x *Location) Reset() { *x = Location{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[41] + mi := &file_binary_proto_def_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9553,7 +9595,7 @@ func (x *Location) String() string { func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[41] + mi := &file_binary_proto_def_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9566,7 +9608,7 @@ func (x *Location) ProtoReflect() protoreflect.Message { // Deprecated: Use Location.ProtoReflect.Descriptor instead. func (*Location) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{41} + return file_binary_proto_def_proto_rawDescGZIP(), []int{42} } func (x *Location) GetDegreesLatitude() float64 { @@ -9607,7 +9649,7 @@ type InteractiveAnnotation struct { func (x *InteractiveAnnotation) Reset() { *x = InteractiveAnnotation{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[42] + mi := &file_binary_proto_def_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9620,7 +9662,7 @@ func (x *InteractiveAnnotation) String() string { func (*InteractiveAnnotation) ProtoMessage() {} func (x *InteractiveAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[42] + mi := &file_binary_proto_def_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9633,7 +9675,7 @@ func (x *InteractiveAnnotation) ProtoReflect() protoreflect.Message { // Deprecated: Use InteractiveAnnotation.ProtoReflect.Descriptor instead. func (*InteractiveAnnotation) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{42} + return file_binary_proto_def_proto_rawDescGZIP(), []int{43} } func (x *InteractiveAnnotation) GetPolygonVertices() []*Point { @@ -9704,7 +9746,7 @@ type HydratedTemplateButton struct { func (x *HydratedTemplateButton) Reset() { *x = HydratedTemplateButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[43] + mi := &file_binary_proto_def_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9717,7 +9759,7 @@ func (x *HydratedTemplateButton) String() string { func (*HydratedTemplateButton) ProtoMessage() {} func (x *HydratedTemplateButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[43] + mi := &file_binary_proto_def_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9730,7 +9772,7 @@ func (x *HydratedTemplateButton) ProtoReflect() protoreflect.Message { // Deprecated: Use HydratedTemplateButton.ProtoReflect.Descriptor instead. func (*HydratedTemplateButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{43} + return file_binary_proto_def_proto_rawDescGZIP(), []int{44} } func (x *HydratedTemplateButton) GetIndex() uint32 { @@ -9802,7 +9844,7 @@ type GroupMention struct { func (x *GroupMention) Reset() { *x = GroupMention{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[44] + mi := &file_binary_proto_def_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9815,7 +9857,7 @@ func (x *GroupMention) String() string { func (*GroupMention) ProtoMessage() {} func (x *GroupMention) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[44] + mi := &file_binary_proto_def_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9828,7 +9870,7 @@ func (x *GroupMention) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMention.ProtoReflect.Descriptor instead. func (*GroupMention) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{44} + return file_binary_proto_def_proto_rawDescGZIP(), []int{45} } func (x *GroupMention) GetGroupJid() string { @@ -9859,7 +9901,7 @@ type DisappearingMode struct { func (x *DisappearingMode) Reset() { *x = DisappearingMode{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[45] + mi := &file_binary_proto_def_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9872,7 +9914,7 @@ func (x *DisappearingMode) String() string { func (*DisappearingMode) ProtoMessage() {} func (x *DisappearingMode) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[45] + mi := &file_binary_proto_def_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9885,7 +9927,7 @@ func (x *DisappearingMode) ProtoReflect() protoreflect.Message { // Deprecated: Use DisappearingMode.ProtoReflect.Descriptor instead. func (*DisappearingMode) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{45} + return file_binary_proto_def_proto_rawDescGZIP(), []int{46} } func (x *DisappearingMode) GetInitiator() DisappearingMode_Initiator { @@ -9934,7 +9976,7 @@ type DeviceListMetadata struct { func (x *DeviceListMetadata) Reset() { *x = DeviceListMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[46] + mi := &file_binary_proto_def_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9947,7 +9989,7 @@ func (x *DeviceListMetadata) String() string { func (*DeviceListMetadata) ProtoMessage() {} func (x *DeviceListMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[46] + mi := &file_binary_proto_def_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9960,7 +10002,7 @@ func (x *DeviceListMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceListMetadata.ProtoReflect.Descriptor instead. func (*DeviceListMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{46} + return file_binary_proto_def_proto_rawDescGZIP(), []int{47} } func (x *DeviceListMetadata) GetSenderKeyHash() []byte { @@ -10062,7 +10104,7 @@ type ContextInfo struct { func (x *ContextInfo) Reset() { *x = ContextInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[47] + mi := &file_binary_proto_def_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10075,7 +10117,7 @@ func (x *ContextInfo) String() string { func (*ContextInfo) ProtoMessage() {} func (x *ContextInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[47] + mi := &file_binary_proto_def_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10088,7 +10130,7 @@ func (x *ContextInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextInfo.ProtoReflect.Descriptor instead. func (*ContextInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48} } func (x *ContextInfo) GetStanzaId() string { @@ -10337,7 +10379,7 @@ type ForwardedNewsletterMessageInfo struct { func (x *ForwardedNewsletterMessageInfo) Reset() { *x = ForwardedNewsletterMessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[48] + mi := &file_binary_proto_def_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10350,7 +10392,7 @@ func (x *ForwardedNewsletterMessageInfo) String() string { func (*ForwardedNewsletterMessageInfo) ProtoMessage() {} func (x *ForwardedNewsletterMessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[48] + mi := &file_binary_proto_def_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10363,7 +10405,7 @@ func (x *ForwardedNewsletterMessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ForwardedNewsletterMessageInfo.ProtoReflect.Descriptor instead. func (*ForwardedNewsletterMessageInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{48} + return file_binary_proto_def_proto_rawDescGZIP(), []int{49} } func (x *ForwardedNewsletterMessageInfo) GetNewsletterJid() string { @@ -10413,7 +10455,7 @@ type BotSuggestedPromptMetadata struct { func (x *BotSuggestedPromptMetadata) Reset() { *x = BotSuggestedPromptMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[49] + mi := &file_binary_proto_def_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10426,7 +10468,7 @@ func (x *BotSuggestedPromptMetadata) String() string { func (*BotSuggestedPromptMetadata) ProtoMessage() {} func (x *BotSuggestedPromptMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[49] + mi := &file_binary_proto_def_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10439,7 +10481,7 @@ func (x *BotSuggestedPromptMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use BotSuggestedPromptMetadata.ProtoReflect.Descriptor instead. func (*BotSuggestedPromptMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{49} + return file_binary_proto_def_proto_rawDescGZIP(), []int{50} } func (x *BotSuggestedPromptMetadata) GetSuggestedPrompts() []string { @@ -10467,12 +10509,14 @@ type BotPluginMetadata struct { ProfilePhotoCdnUrl *string `protobuf:"bytes,4,opt,name=profilePhotoCdnUrl" json:"profilePhotoCdnUrl,omitempty"` SearchProviderUrl *string `protobuf:"bytes,5,opt,name=searchProviderUrl" json:"searchProviderUrl,omitempty"` ReferenceIndex *uint32 `protobuf:"varint,6,opt,name=referenceIndex" json:"referenceIndex,omitempty"` + ExpectedLinksCount *uint32 `protobuf:"varint,7,opt,name=expectedLinksCount" json:"expectedLinksCount,omitempty"` + PluginVersion *uint32 `protobuf:"varint,8,opt,name=pluginVersion" json:"pluginVersion,omitempty"` } func (x *BotPluginMetadata) Reset() { *x = BotPluginMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[50] + mi := &file_binary_proto_def_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10485,7 +10529,7 @@ func (x *BotPluginMetadata) String() string { func (*BotPluginMetadata) ProtoMessage() {} func (x *BotPluginMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[50] + mi := &file_binary_proto_def_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10498,7 +10542,7 @@ func (x *BotPluginMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use BotPluginMetadata.ProtoReflect.Descriptor instead. func (*BotPluginMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{50} + return file_binary_proto_def_proto_rawDescGZIP(), []int{51} } func (x *BotPluginMetadata) GetProvider() BotPluginMetadata_SearchProvider { @@ -10543,6 +10587,20 @@ func (x *BotPluginMetadata) GetReferenceIndex() uint32 { return 0 } +func (x *BotPluginMetadata) GetExpectedLinksCount() uint32 { + if x != nil && x.ExpectedLinksCount != nil { + return *x.ExpectedLinksCount + } + return 0 +} + +func (x *BotPluginMetadata) GetPluginVersion() uint32 { + if x != nil && x.PluginVersion != nil { + return *x.PluginVersion + } + return 0 +} + type BotMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -10552,12 +10610,13 @@ type BotMetadata struct { PersonaId *string `protobuf:"bytes,2,opt,name=personaId" json:"personaId,omitempty"` PluginMetadata *BotPluginMetadata `protobuf:"bytes,3,opt,name=pluginMetadata" json:"pluginMetadata,omitempty"` SuggestedPromptMetadata *BotSuggestedPromptMetadata `protobuf:"bytes,4,opt,name=suggestedPromptMetadata" json:"suggestedPromptMetadata,omitempty"` + InvokerJid *string `protobuf:"bytes,5,opt,name=invokerJid" json:"invokerJid,omitempty"` } func (x *BotMetadata) Reset() { *x = BotMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[51] + mi := &file_binary_proto_def_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10570,7 +10629,7 @@ func (x *BotMetadata) String() string { func (*BotMetadata) ProtoMessage() {} func (x *BotMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[51] + mi := &file_binary_proto_def_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10583,7 +10642,7 @@ func (x *BotMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use BotMetadata.ProtoReflect.Descriptor instead. func (*BotMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{51} + return file_binary_proto_def_proto_rawDescGZIP(), []int{52} } func (x *BotMetadata) GetAvatarMetadata() *BotAvatarMetadata { @@ -10614,6 +10673,13 @@ func (x *BotMetadata) GetSuggestedPromptMetadata() *BotSuggestedPromptMetadata { return nil } +func (x *BotMetadata) GetInvokerJid() string { + if x != nil && x.InvokerJid != nil { + return *x.InvokerJid + } + return "" +} + type BotAvatarMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -10629,7 +10695,7 @@ type BotAvatarMetadata struct { func (x *BotAvatarMetadata) Reset() { *x = BotAvatarMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[52] + mi := &file_binary_proto_def_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10642,7 +10708,7 @@ func (x *BotAvatarMetadata) String() string { func (*BotAvatarMetadata) ProtoMessage() {} func (x *BotAvatarMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[52] + mi := &file_binary_proto_def_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10655,7 +10721,7 @@ func (x *BotAvatarMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use BotAvatarMetadata.ProtoReflect.Descriptor instead. func (*BotAvatarMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{52} + return file_binary_proto_def_proto_rawDescGZIP(), []int{53} } func (x *BotAvatarMetadata) GetSentiment() uint32 { @@ -10705,7 +10771,7 @@ type ActionLink struct { func (x *ActionLink) Reset() { *x = ActionLink{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[53] + mi := &file_binary_proto_def_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10718,7 +10784,7 @@ func (x *ActionLink) String() string { func (*ActionLink) ProtoMessage() {} func (x *ActionLink) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[53] + mi := &file_binary_proto_def_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10731,7 +10797,7 @@ func (x *ActionLink) ProtoReflect() protoreflect.Message { // Deprecated: Use ActionLink.ProtoReflect.Descriptor instead. func (*ActionLink) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{53} + return file_binary_proto_def_proto_rawDescGZIP(), []int{54} } func (x *ActionLink) GetUrl() string { @@ -10765,7 +10831,7 @@ type TemplateButton struct { func (x *TemplateButton) Reset() { *x = TemplateButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[54] + mi := &file_binary_proto_def_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10778,7 +10844,7 @@ func (x *TemplateButton) String() string { func (*TemplateButton) ProtoMessage() {} func (x *TemplateButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[54] + mi := &file_binary_proto_def_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10791,7 +10857,7 @@ func (x *TemplateButton) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateButton.ProtoReflect.Descriptor instead. func (*TemplateButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{54} + return file_binary_proto_def_proto_rawDescGZIP(), []int{55} } func (x *TemplateButton) GetIndex() uint32 { @@ -10865,7 +10931,7 @@ type Point struct { func (x *Point) Reset() { *x = Point{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[55] + mi := &file_binary_proto_def_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10878,7 +10944,7 @@ func (x *Point) String() string { func (*Point) ProtoMessage() {} func (x *Point) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[55] + mi := &file_binary_proto_def_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10891,7 +10957,7 @@ func (x *Point) ProtoReflect() protoreflect.Message { // Deprecated: Use Point.ProtoReflect.Descriptor instead. func (*Point) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{55} + return file_binary_proto_def_proto_rawDescGZIP(), []int{56} } func (x *Point) GetXDeprecated() int32 { @@ -10942,7 +11008,7 @@ type PaymentBackground struct { func (x *PaymentBackground) Reset() { *x = PaymentBackground{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[56] + mi := &file_binary_proto_def_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10955,7 +11021,7 @@ func (x *PaymentBackground) String() string { func (*PaymentBackground) ProtoMessage() {} func (x *PaymentBackground) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[56] + mi := &file_binary_proto_def_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10968,7 +11034,7 @@ func (x *PaymentBackground) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentBackground.ProtoReflect.Descriptor instead. func (*PaymentBackground) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{56} + return file_binary_proto_def_proto_rawDescGZIP(), []int{57} } func (x *PaymentBackground) GetId() string { @@ -11054,7 +11120,7 @@ type Money struct { func (x *Money) Reset() { *x = Money{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[57] + mi := &file_binary_proto_def_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11067,7 +11133,7 @@ func (x *Money) String() string { func (*Money) ProtoMessage() {} func (x *Money) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[57] + mi := &file_binary_proto_def_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11080,7 +11146,7 @@ func (x *Money) ProtoReflect() protoreflect.Message { // Deprecated: Use Money.ProtoReflect.Descriptor instead. func (*Money) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{57} + return file_binary_proto_def_proto_rawDescGZIP(), []int{58} } func (x *Money) GetValue() int64 { @@ -11109,78 +11175,80 @@ type Message struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Conversation *string `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"` - SenderKeyDistributionMessage *SenderKeyDistributionMessage `protobuf:"bytes,2,opt,name=senderKeyDistributionMessage" json:"senderKeyDistributionMessage,omitempty"` - ImageMessage *ImageMessage `protobuf:"bytes,3,opt,name=imageMessage" json:"imageMessage,omitempty"` - ContactMessage *ContactMessage `protobuf:"bytes,4,opt,name=contactMessage" json:"contactMessage,omitempty"` - LocationMessage *LocationMessage `protobuf:"bytes,5,opt,name=locationMessage" json:"locationMessage,omitempty"` - ExtendedTextMessage *ExtendedTextMessage `protobuf:"bytes,6,opt,name=extendedTextMessage" json:"extendedTextMessage,omitempty"` - DocumentMessage *DocumentMessage `protobuf:"bytes,7,opt,name=documentMessage" json:"documentMessage,omitempty"` - AudioMessage *AudioMessage `protobuf:"bytes,8,opt,name=audioMessage" json:"audioMessage,omitempty"` - VideoMessage *VideoMessage `protobuf:"bytes,9,opt,name=videoMessage" json:"videoMessage,omitempty"` - Call *Call `protobuf:"bytes,10,opt,name=call" json:"call,omitempty"` - Chat *Chat `protobuf:"bytes,11,opt,name=chat" json:"chat,omitempty"` - ProtocolMessage *ProtocolMessage `protobuf:"bytes,12,opt,name=protocolMessage" json:"protocolMessage,omitempty"` - ContactsArrayMessage *ContactsArrayMessage `protobuf:"bytes,13,opt,name=contactsArrayMessage" json:"contactsArrayMessage,omitempty"` - HighlyStructuredMessage *HighlyStructuredMessage `protobuf:"bytes,14,opt,name=highlyStructuredMessage" json:"highlyStructuredMessage,omitempty"` - FastRatchetKeySenderKeyDistributionMessage *SenderKeyDistributionMessage `protobuf:"bytes,15,opt,name=fastRatchetKeySenderKeyDistributionMessage" json:"fastRatchetKeySenderKeyDistributionMessage,omitempty"` - SendPaymentMessage *SendPaymentMessage `protobuf:"bytes,16,opt,name=sendPaymentMessage" json:"sendPaymentMessage,omitempty"` - LiveLocationMessage *LiveLocationMessage `protobuf:"bytes,18,opt,name=liveLocationMessage" json:"liveLocationMessage,omitempty"` - RequestPaymentMessage *RequestPaymentMessage `protobuf:"bytes,22,opt,name=requestPaymentMessage" json:"requestPaymentMessage,omitempty"` - DeclinePaymentRequestMessage *DeclinePaymentRequestMessage `protobuf:"bytes,23,opt,name=declinePaymentRequestMessage" json:"declinePaymentRequestMessage,omitempty"` - CancelPaymentRequestMessage *CancelPaymentRequestMessage `protobuf:"bytes,24,opt,name=cancelPaymentRequestMessage" json:"cancelPaymentRequestMessage,omitempty"` - TemplateMessage *TemplateMessage `protobuf:"bytes,25,opt,name=templateMessage" json:"templateMessage,omitempty"` - StickerMessage *StickerMessage `protobuf:"bytes,26,opt,name=stickerMessage" json:"stickerMessage,omitempty"` - GroupInviteMessage *GroupInviteMessage `protobuf:"bytes,28,opt,name=groupInviteMessage" json:"groupInviteMessage,omitempty"` - TemplateButtonReplyMessage *TemplateButtonReplyMessage `protobuf:"bytes,29,opt,name=templateButtonReplyMessage" json:"templateButtonReplyMessage,omitempty"` - ProductMessage *ProductMessage `protobuf:"bytes,30,opt,name=productMessage" json:"productMessage,omitempty"` - DeviceSentMessage *DeviceSentMessage `protobuf:"bytes,31,opt,name=deviceSentMessage" json:"deviceSentMessage,omitempty"` - MessageContextInfo *MessageContextInfo `protobuf:"bytes,35,opt,name=messageContextInfo" json:"messageContextInfo,omitempty"` - ListMessage *ListMessage `protobuf:"bytes,36,opt,name=listMessage" json:"listMessage,omitempty"` - ViewOnceMessage *FutureProofMessage `protobuf:"bytes,37,opt,name=viewOnceMessage" json:"viewOnceMessage,omitempty"` - OrderMessage *OrderMessage `protobuf:"bytes,38,opt,name=orderMessage" json:"orderMessage,omitempty"` - ListResponseMessage *ListResponseMessage `protobuf:"bytes,39,opt,name=listResponseMessage" json:"listResponseMessage,omitempty"` - EphemeralMessage *FutureProofMessage `protobuf:"bytes,40,opt,name=ephemeralMessage" json:"ephemeralMessage,omitempty"` - InvoiceMessage *InvoiceMessage `protobuf:"bytes,41,opt,name=invoiceMessage" json:"invoiceMessage,omitempty"` - ButtonsMessage *ButtonsMessage `protobuf:"bytes,42,opt,name=buttonsMessage" json:"buttonsMessage,omitempty"` - ButtonsResponseMessage *ButtonsResponseMessage `protobuf:"bytes,43,opt,name=buttonsResponseMessage" json:"buttonsResponseMessage,omitempty"` - PaymentInviteMessage *PaymentInviteMessage `protobuf:"bytes,44,opt,name=paymentInviteMessage" json:"paymentInviteMessage,omitempty"` - InteractiveMessage *InteractiveMessage `protobuf:"bytes,45,opt,name=interactiveMessage" json:"interactiveMessage,omitempty"` - ReactionMessage *ReactionMessage `protobuf:"bytes,46,opt,name=reactionMessage" json:"reactionMessage,omitempty"` - StickerSyncRmrMessage *StickerSyncRMRMessage `protobuf:"bytes,47,opt,name=stickerSyncRmrMessage" json:"stickerSyncRmrMessage,omitempty"` - InteractiveResponseMessage *InteractiveResponseMessage `protobuf:"bytes,48,opt,name=interactiveResponseMessage" json:"interactiveResponseMessage,omitempty"` - PollCreationMessage *PollCreationMessage `protobuf:"bytes,49,opt,name=pollCreationMessage" json:"pollCreationMessage,omitempty"` - PollUpdateMessage *PollUpdateMessage `protobuf:"bytes,50,opt,name=pollUpdateMessage" json:"pollUpdateMessage,omitempty"` - KeepInChatMessage *KeepInChatMessage `protobuf:"bytes,51,opt,name=keepInChatMessage" json:"keepInChatMessage,omitempty"` - DocumentWithCaptionMessage *FutureProofMessage `protobuf:"bytes,53,opt,name=documentWithCaptionMessage" json:"documentWithCaptionMessage,omitempty"` - RequestPhoneNumberMessage *RequestPhoneNumberMessage `protobuf:"bytes,54,opt,name=requestPhoneNumberMessage" json:"requestPhoneNumberMessage,omitempty"` - ViewOnceMessageV2 *FutureProofMessage `protobuf:"bytes,55,opt,name=viewOnceMessageV2" json:"viewOnceMessageV2,omitempty"` - EncReactionMessage *EncReactionMessage `protobuf:"bytes,56,opt,name=encReactionMessage" json:"encReactionMessage,omitempty"` - EditedMessage *FutureProofMessage `protobuf:"bytes,58,opt,name=editedMessage" json:"editedMessage,omitempty"` - ViewOnceMessageV2Extension *FutureProofMessage `protobuf:"bytes,59,opt,name=viewOnceMessageV2Extension" json:"viewOnceMessageV2Extension,omitempty"` - PollCreationMessageV2 *PollCreationMessage `protobuf:"bytes,60,opt,name=pollCreationMessageV2" json:"pollCreationMessageV2,omitempty"` - ScheduledCallCreationMessage *ScheduledCallCreationMessage `protobuf:"bytes,61,opt,name=scheduledCallCreationMessage" json:"scheduledCallCreationMessage,omitempty"` - GroupMentionedMessage *FutureProofMessage `protobuf:"bytes,62,opt,name=groupMentionedMessage" json:"groupMentionedMessage,omitempty"` - PinInChatMessage *PinInChatMessage `protobuf:"bytes,63,opt,name=pinInChatMessage" json:"pinInChatMessage,omitempty"` - PollCreationMessageV3 *PollCreationMessage `protobuf:"bytes,64,opt,name=pollCreationMessageV3" json:"pollCreationMessageV3,omitempty"` - ScheduledCallEditMessage *ScheduledCallEditMessage `protobuf:"bytes,65,opt,name=scheduledCallEditMessage" json:"scheduledCallEditMessage,omitempty"` - PtvMessage *VideoMessage `protobuf:"bytes,66,opt,name=ptvMessage" json:"ptvMessage,omitempty"` - BotInvokeMessage *FutureProofMessage `protobuf:"bytes,67,opt,name=botInvokeMessage" json:"botInvokeMessage,omitempty"` - CallLogMesssage *CallLogMessage `protobuf:"bytes,69,opt,name=callLogMesssage" json:"callLogMesssage,omitempty"` - MessageHistoryBundle *MessageHistoryBundle `protobuf:"bytes,70,opt,name=messageHistoryBundle" json:"messageHistoryBundle,omitempty"` - EncCommentMessage *EncCommentMessage `protobuf:"bytes,71,opt,name=encCommentMessage" json:"encCommentMessage,omitempty"` - BcallMessage *BCallMessage `protobuf:"bytes,72,opt,name=bcallMessage" json:"bcallMessage,omitempty"` - LottieStickerMessage *FutureProofMessage `protobuf:"bytes,74,opt,name=lottieStickerMessage" json:"lottieStickerMessage,omitempty"` - EventMessage *EventMessage `protobuf:"bytes,75,opt,name=eventMessage" json:"eventMessage,omitempty"` - EncEventResponseMessage *EncEventResponseMessage `protobuf:"bytes,76,opt,name=encEventResponseMessage" json:"encEventResponseMessage,omitempty"` - CommentMessage *CommentMessage `protobuf:"bytes,77,opt,name=commentMessage" json:"commentMessage,omitempty"` - NewsletterAdminInviteMessage *NewsletterAdminInviteMessage `protobuf:"bytes,78,opt,name=newsletterAdminInviteMessage" json:"newsletterAdminInviteMessage,omitempty"` + Conversation *string `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"` + SenderKeyDistributionMessage *SenderKeyDistributionMessage `protobuf:"bytes,2,opt,name=senderKeyDistributionMessage" json:"senderKeyDistributionMessage,omitempty"` + ImageMessage *ImageMessage `protobuf:"bytes,3,opt,name=imageMessage" json:"imageMessage,omitempty"` + ContactMessage *ContactMessage `protobuf:"bytes,4,opt,name=contactMessage" json:"contactMessage,omitempty"` + LocationMessage *LocationMessage `protobuf:"bytes,5,opt,name=locationMessage" json:"locationMessage,omitempty"` + ExtendedTextMessage *ExtendedTextMessage `protobuf:"bytes,6,opt,name=extendedTextMessage" json:"extendedTextMessage,omitempty"` + DocumentMessage *DocumentMessage `protobuf:"bytes,7,opt,name=documentMessage" json:"documentMessage,omitempty"` + AudioMessage *AudioMessage `protobuf:"bytes,8,opt,name=audioMessage" json:"audioMessage,omitempty"` + VideoMessage *VideoMessage `protobuf:"bytes,9,opt,name=videoMessage" json:"videoMessage,omitempty"` + Call *Call `protobuf:"bytes,10,opt,name=call" json:"call,omitempty"` + Chat *Chat `protobuf:"bytes,11,opt,name=chat" json:"chat,omitempty"` + ProtocolMessage *ProtocolMessage `protobuf:"bytes,12,opt,name=protocolMessage" json:"protocolMessage,omitempty"` + ContactsArrayMessage *ContactsArrayMessage `protobuf:"bytes,13,opt,name=contactsArrayMessage" json:"contactsArrayMessage,omitempty"` + HighlyStructuredMessage *HighlyStructuredMessage `protobuf:"bytes,14,opt,name=highlyStructuredMessage" json:"highlyStructuredMessage,omitempty"` + FastRatchetKeySenderKeyDistributionMessage *SenderKeyDistributionMessage `protobuf:"bytes,15,opt,name=fastRatchetKeySenderKeyDistributionMessage" json:"fastRatchetKeySenderKeyDistributionMessage,omitempty"` + SendPaymentMessage *SendPaymentMessage `protobuf:"bytes,16,opt,name=sendPaymentMessage" json:"sendPaymentMessage,omitempty"` + LiveLocationMessage *LiveLocationMessage `protobuf:"bytes,18,opt,name=liveLocationMessage" json:"liveLocationMessage,omitempty"` + RequestPaymentMessage *RequestPaymentMessage `protobuf:"bytes,22,opt,name=requestPaymentMessage" json:"requestPaymentMessage,omitempty"` + DeclinePaymentRequestMessage *DeclinePaymentRequestMessage `protobuf:"bytes,23,opt,name=declinePaymentRequestMessage" json:"declinePaymentRequestMessage,omitempty"` + CancelPaymentRequestMessage *CancelPaymentRequestMessage `protobuf:"bytes,24,opt,name=cancelPaymentRequestMessage" json:"cancelPaymentRequestMessage,omitempty"` + TemplateMessage *TemplateMessage `protobuf:"bytes,25,opt,name=templateMessage" json:"templateMessage,omitempty"` + StickerMessage *StickerMessage `protobuf:"bytes,26,opt,name=stickerMessage" json:"stickerMessage,omitempty"` + GroupInviteMessage *GroupInviteMessage `protobuf:"bytes,28,opt,name=groupInviteMessage" json:"groupInviteMessage,omitempty"` + TemplateButtonReplyMessage *TemplateButtonReplyMessage `protobuf:"bytes,29,opt,name=templateButtonReplyMessage" json:"templateButtonReplyMessage,omitempty"` + ProductMessage *ProductMessage `protobuf:"bytes,30,opt,name=productMessage" json:"productMessage,omitempty"` + DeviceSentMessage *DeviceSentMessage `protobuf:"bytes,31,opt,name=deviceSentMessage" json:"deviceSentMessage,omitempty"` + MessageContextInfo *MessageContextInfo `protobuf:"bytes,35,opt,name=messageContextInfo" json:"messageContextInfo,omitempty"` + ListMessage *ListMessage `protobuf:"bytes,36,opt,name=listMessage" json:"listMessage,omitempty"` + ViewOnceMessage *FutureProofMessage `protobuf:"bytes,37,opt,name=viewOnceMessage" json:"viewOnceMessage,omitempty"` + OrderMessage *OrderMessage `protobuf:"bytes,38,opt,name=orderMessage" json:"orderMessage,omitempty"` + ListResponseMessage *ListResponseMessage `protobuf:"bytes,39,opt,name=listResponseMessage" json:"listResponseMessage,omitempty"` + EphemeralMessage *FutureProofMessage `protobuf:"bytes,40,opt,name=ephemeralMessage" json:"ephemeralMessage,omitempty"` + InvoiceMessage *InvoiceMessage `protobuf:"bytes,41,opt,name=invoiceMessage" json:"invoiceMessage,omitempty"` + ButtonsMessage *ButtonsMessage `protobuf:"bytes,42,opt,name=buttonsMessage" json:"buttonsMessage,omitempty"` + ButtonsResponseMessage *ButtonsResponseMessage `protobuf:"bytes,43,opt,name=buttonsResponseMessage" json:"buttonsResponseMessage,omitempty"` + PaymentInviteMessage *PaymentInviteMessage `protobuf:"bytes,44,opt,name=paymentInviteMessage" json:"paymentInviteMessage,omitempty"` + InteractiveMessage *InteractiveMessage `protobuf:"bytes,45,opt,name=interactiveMessage" json:"interactiveMessage,omitempty"` + ReactionMessage *ReactionMessage `protobuf:"bytes,46,opt,name=reactionMessage" json:"reactionMessage,omitempty"` + StickerSyncRmrMessage *StickerSyncRMRMessage `protobuf:"bytes,47,opt,name=stickerSyncRmrMessage" json:"stickerSyncRmrMessage,omitempty"` + InteractiveResponseMessage *InteractiveResponseMessage `protobuf:"bytes,48,opt,name=interactiveResponseMessage" json:"interactiveResponseMessage,omitempty"` + PollCreationMessage *PollCreationMessage `protobuf:"bytes,49,opt,name=pollCreationMessage" json:"pollCreationMessage,omitempty"` + PollUpdateMessage *PollUpdateMessage `protobuf:"bytes,50,opt,name=pollUpdateMessage" json:"pollUpdateMessage,omitempty"` + KeepInChatMessage *KeepInChatMessage `protobuf:"bytes,51,opt,name=keepInChatMessage" json:"keepInChatMessage,omitempty"` + DocumentWithCaptionMessage *FutureProofMessage `protobuf:"bytes,53,opt,name=documentWithCaptionMessage" json:"documentWithCaptionMessage,omitempty"` + RequestPhoneNumberMessage *RequestPhoneNumberMessage `protobuf:"bytes,54,opt,name=requestPhoneNumberMessage" json:"requestPhoneNumberMessage,omitempty"` + ViewOnceMessageV2 *FutureProofMessage `protobuf:"bytes,55,opt,name=viewOnceMessageV2" json:"viewOnceMessageV2,omitempty"` + EncReactionMessage *EncReactionMessage `protobuf:"bytes,56,opt,name=encReactionMessage" json:"encReactionMessage,omitempty"` + EditedMessage *FutureProofMessage `protobuf:"bytes,58,opt,name=editedMessage" json:"editedMessage,omitempty"` + ViewOnceMessageV2Extension *FutureProofMessage `protobuf:"bytes,59,opt,name=viewOnceMessageV2Extension" json:"viewOnceMessageV2Extension,omitempty"` + PollCreationMessageV2 *PollCreationMessage `protobuf:"bytes,60,opt,name=pollCreationMessageV2" json:"pollCreationMessageV2,omitempty"` + ScheduledCallCreationMessage *ScheduledCallCreationMessage `protobuf:"bytes,61,opt,name=scheduledCallCreationMessage" json:"scheduledCallCreationMessage,omitempty"` + GroupMentionedMessage *FutureProofMessage `protobuf:"bytes,62,opt,name=groupMentionedMessage" json:"groupMentionedMessage,omitempty"` + PinInChatMessage *PinInChatMessage `protobuf:"bytes,63,opt,name=pinInChatMessage" json:"pinInChatMessage,omitempty"` + PollCreationMessageV3 *PollCreationMessage `protobuf:"bytes,64,opt,name=pollCreationMessageV3" json:"pollCreationMessageV3,omitempty"` + ScheduledCallEditMessage *ScheduledCallEditMessage `protobuf:"bytes,65,opt,name=scheduledCallEditMessage" json:"scheduledCallEditMessage,omitempty"` + PtvMessage *VideoMessage `protobuf:"bytes,66,opt,name=ptvMessage" json:"ptvMessage,omitempty"` + BotInvokeMessage *FutureProofMessage `protobuf:"bytes,67,opt,name=botInvokeMessage" json:"botInvokeMessage,omitempty"` + CallLogMesssage *CallLogMessage `protobuf:"bytes,69,opt,name=callLogMesssage" json:"callLogMesssage,omitempty"` + MessageHistoryBundle *MessageHistoryBundle `protobuf:"bytes,70,opt,name=messageHistoryBundle" json:"messageHistoryBundle,omitempty"` + EncCommentMessage *EncCommentMessage `protobuf:"bytes,71,opt,name=encCommentMessage" json:"encCommentMessage,omitempty"` + BcallMessage *BCallMessage `protobuf:"bytes,72,opt,name=bcallMessage" json:"bcallMessage,omitempty"` + LottieStickerMessage *FutureProofMessage `protobuf:"bytes,74,opt,name=lottieStickerMessage" json:"lottieStickerMessage,omitempty"` + EventMessage *EventMessage `protobuf:"bytes,75,opt,name=eventMessage" json:"eventMessage,omitempty"` + EncEventResponseMessage *EncEventResponseMessage `protobuf:"bytes,76,opt,name=encEventResponseMessage" json:"encEventResponseMessage,omitempty"` + CommentMessage *CommentMessage `protobuf:"bytes,77,opt,name=commentMessage" json:"commentMessage,omitempty"` + NewsletterAdminInviteMessage *NewsletterAdminInviteMessage `protobuf:"bytes,78,opt,name=newsletterAdminInviteMessage" json:"newsletterAdminInviteMessage,omitempty"` + ExtendedTextMessageWithParentKey *ExtendedTextMessageWithParentKey `protobuf:"bytes,79,opt,name=extendedTextMessageWithParentKey" json:"extendedTextMessageWithParentKey,omitempty"` + PlaceholderMessage *PlaceholderMessage `protobuf:"bytes,80,opt,name=placeholderMessage" json:"placeholderMessage,omitempty"` } func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[58] + mi := &file_binary_proto_def_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11193,7 +11261,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[58] + mi := &file_binary_proto_def_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11206,7 +11274,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{58} + return file_binary_proto_def_proto_rawDescGZIP(), []int{59} } func (x *Message) GetConversation() string { @@ -11671,6 +11739,20 @@ func (x *Message) GetNewsletterAdminInviteMessage() *NewsletterAdminInviteMessag return nil } +func (x *Message) GetExtendedTextMessageWithParentKey() *ExtendedTextMessageWithParentKey { + if x != nil { + return x.ExtendedTextMessageWithParentKey + } + return nil +} + +func (x *Message) GetPlaceholderMessage() *PlaceholderMessage { + if x != nil { + return x.PlaceholderMessage + } + return nil +} + type MessageSecretMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -11684,7 +11766,7 @@ type MessageSecretMessage struct { func (x *MessageSecretMessage) Reset() { *x = MessageSecretMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[59] + mi := &file_binary_proto_def_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11697,7 +11779,7 @@ func (x *MessageSecretMessage) String() string { func (*MessageSecretMessage) ProtoMessage() {} func (x *MessageSecretMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[59] + mi := &file_binary_proto_def_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11710,7 +11792,7 @@ func (x *MessageSecretMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageSecretMessage.ProtoReflect.Descriptor instead. func (*MessageSecretMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{59} + return file_binary_proto_def_proto_rawDescGZIP(), []int{60} } func (x *MessageSecretMessage) GetVersion() int32 { @@ -11752,7 +11834,7 @@ type MessageContextInfo struct { func (x *MessageContextInfo) Reset() { *x = MessageContextInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[60] + mi := &file_binary_proto_def_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11765,7 +11847,7 @@ func (x *MessageContextInfo) String() string { func (*MessageContextInfo) ProtoMessage() {} func (x *MessageContextInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[60] + mi := &file_binary_proto_def_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11778,7 +11860,7 @@ func (x *MessageContextInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageContextInfo.ProtoReflect.Descriptor instead. func (*MessageContextInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{60} + return file_binary_proto_def_proto_rawDescGZIP(), []int{61} } func (x *MessageContextInfo) GetDeviceListMetadata() *DeviceListMetadata { @@ -11871,7 +11953,7 @@ type VideoMessage struct { func (x *VideoMessage) Reset() { *x = VideoMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[61] + mi := &file_binary_proto_def_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11884,7 +11966,7 @@ func (x *VideoMessage) String() string { func (*VideoMessage) ProtoMessage() {} func (x *VideoMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[61] + mi := &file_binary_proto_def_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11897,7 +11979,7 @@ func (x *VideoMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use VideoMessage.ProtoReflect.Descriptor instead. func (*VideoMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{61} + return file_binary_proto_def_proto_rawDescGZIP(), []int{62} } func (x *VideoMessage) GetUrl() string { @@ -12087,7 +12169,7 @@ type TemplateMessage struct { func (x *TemplateMessage) Reset() { *x = TemplateMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[62] + mi := &file_binary_proto_def_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12100,7 +12182,7 @@ func (x *TemplateMessage) String() string { func (*TemplateMessage) ProtoMessage() {} func (x *TemplateMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[62] + mi := &file_binary_proto_def_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12113,7 +12195,7 @@ func (x *TemplateMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateMessage.ProtoReflect.Descriptor instead. func (*TemplateMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{62} + return file_binary_proto_def_proto_rawDescGZIP(), []int{63} } func (x *TemplateMessage) GetContextInfo() *ContextInfo { @@ -12202,7 +12284,7 @@ type TemplateButtonReplyMessage struct { func (x *TemplateButtonReplyMessage) Reset() { *x = TemplateButtonReplyMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[63] + mi := &file_binary_proto_def_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12215,7 +12297,7 @@ func (x *TemplateButtonReplyMessage) String() string { func (*TemplateButtonReplyMessage) ProtoMessage() {} func (x *TemplateButtonReplyMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[63] + mi := &file_binary_proto_def_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12228,7 +12310,7 @@ func (x *TemplateButtonReplyMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateButtonReplyMessage.ProtoReflect.Descriptor instead. func (*TemplateButtonReplyMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{63} + return file_binary_proto_def_proto_rawDescGZIP(), []int{64} } func (x *TemplateButtonReplyMessage) GetSelectedId() string { @@ -12279,7 +12361,7 @@ type StickerSyncRMRMessage struct { func (x *StickerSyncRMRMessage) Reset() { *x = StickerSyncRMRMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[64] + mi := &file_binary_proto_def_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12292,7 +12374,7 @@ func (x *StickerSyncRMRMessage) String() string { func (*StickerSyncRMRMessage) ProtoMessage() {} func (x *StickerSyncRMRMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[64] + mi := &file_binary_proto_def_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12305,7 +12387,7 @@ func (x *StickerSyncRMRMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StickerSyncRMRMessage.ProtoReflect.Descriptor instead. func (*StickerSyncRMRMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{64} + return file_binary_proto_def_proto_rawDescGZIP(), []int{65} } func (x *StickerSyncRMRMessage) GetFilehash() []string { @@ -12358,7 +12440,7 @@ type StickerMessage struct { func (x *StickerMessage) Reset() { *x = StickerMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[65] + mi := &file_binary_proto_def_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12371,7 +12453,7 @@ func (x *StickerMessage) String() string { func (*StickerMessage) ProtoMessage() {} func (x *StickerMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[65] + mi := &file_binary_proto_def_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12384,7 +12466,7 @@ func (x *StickerMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StickerMessage.ProtoReflect.Descriptor instead. func (*StickerMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{65} + return file_binary_proto_def_proto_rawDescGZIP(), []int{66} } func (x *StickerMessage) GetUrl() string { @@ -12532,7 +12614,7 @@ type SenderKeyDistributionMessage struct { func (x *SenderKeyDistributionMessage) Reset() { *x = SenderKeyDistributionMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[66] + mi := &file_binary_proto_def_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12545,7 +12627,7 @@ func (x *SenderKeyDistributionMessage) String() string { func (*SenderKeyDistributionMessage) ProtoMessage() {} func (x *SenderKeyDistributionMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[66] + mi := &file_binary_proto_def_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12558,7 +12640,7 @@ func (x *SenderKeyDistributionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SenderKeyDistributionMessage.ProtoReflect.Descriptor instead. func (*SenderKeyDistributionMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{66} + return file_binary_proto_def_proto_rawDescGZIP(), []int{67} } func (x *SenderKeyDistributionMessage) GetGroupId() string { @@ -12588,7 +12670,7 @@ type SendPaymentMessage struct { func (x *SendPaymentMessage) Reset() { *x = SendPaymentMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[67] + mi := &file_binary_proto_def_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12601,7 +12683,7 @@ func (x *SendPaymentMessage) String() string { func (*SendPaymentMessage) ProtoMessage() {} func (x *SendPaymentMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[67] + mi := &file_binary_proto_def_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12614,7 +12696,7 @@ func (x *SendPaymentMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SendPaymentMessage.ProtoReflect.Descriptor instead. func (*SendPaymentMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{67} + return file_binary_proto_def_proto_rawDescGZIP(), []int{68} } func (x *SendPaymentMessage) GetNoteMessage() *Message { @@ -12650,7 +12732,7 @@ type ScheduledCallEditMessage struct { func (x *ScheduledCallEditMessage) Reset() { *x = ScheduledCallEditMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[68] + mi := &file_binary_proto_def_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12663,7 +12745,7 @@ func (x *ScheduledCallEditMessage) String() string { func (*ScheduledCallEditMessage) ProtoMessage() {} func (x *ScheduledCallEditMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[68] + mi := &file_binary_proto_def_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12676,7 +12758,7 @@ func (x *ScheduledCallEditMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ScheduledCallEditMessage.ProtoReflect.Descriptor instead. func (*ScheduledCallEditMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{68} + return file_binary_proto_def_proto_rawDescGZIP(), []int{69} } func (x *ScheduledCallEditMessage) GetKey() *MessageKey { @@ -12706,7 +12788,7 @@ type ScheduledCallCreationMessage struct { func (x *ScheduledCallCreationMessage) Reset() { *x = ScheduledCallCreationMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[69] + mi := &file_binary_proto_def_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12719,7 +12801,7 @@ func (x *ScheduledCallCreationMessage) String() string { func (*ScheduledCallCreationMessage) ProtoMessage() {} func (x *ScheduledCallCreationMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[69] + mi := &file_binary_proto_def_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12732,7 +12814,7 @@ func (x *ScheduledCallCreationMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ScheduledCallCreationMessage.ProtoReflect.Descriptor instead. func (*ScheduledCallCreationMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{69} + return file_binary_proto_def_proto_rawDescGZIP(), []int{70} } func (x *ScheduledCallCreationMessage) GetScheduledTimestampMs() int64 { @@ -12767,7 +12849,7 @@ type RequestWelcomeMessageMetadata struct { func (x *RequestWelcomeMessageMetadata) Reset() { *x = RequestWelcomeMessageMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[70] + mi := &file_binary_proto_def_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12780,7 +12862,7 @@ func (x *RequestWelcomeMessageMetadata) String() string { func (*RequestWelcomeMessageMetadata) ProtoMessage() {} func (x *RequestWelcomeMessageMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[70] + mi := &file_binary_proto_def_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12793,7 +12875,7 @@ func (x *RequestWelcomeMessageMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestWelcomeMessageMetadata.ProtoReflect.Descriptor instead. func (*RequestWelcomeMessageMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{70} + return file_binary_proto_def_proto_rawDescGZIP(), []int{71} } func (x *RequestWelcomeMessageMetadata) GetLocalChatState() RequestWelcomeMessageMetadata_LocalChatState { @@ -12814,7 +12896,7 @@ type RequestPhoneNumberMessage struct { func (x *RequestPhoneNumberMessage) Reset() { *x = RequestPhoneNumberMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[71] + mi := &file_binary_proto_def_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12827,7 +12909,7 @@ func (x *RequestPhoneNumberMessage) String() string { func (*RequestPhoneNumberMessage) ProtoMessage() {} func (x *RequestPhoneNumberMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[71] + mi := &file_binary_proto_def_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12840,7 +12922,7 @@ func (x *RequestPhoneNumberMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestPhoneNumberMessage.ProtoReflect.Descriptor instead. func (*RequestPhoneNumberMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{71} + return file_binary_proto_def_proto_rawDescGZIP(), []int{72} } func (x *RequestPhoneNumberMessage) GetContextInfo() *ContextInfo { @@ -12867,7 +12949,7 @@ type RequestPaymentMessage struct { func (x *RequestPaymentMessage) Reset() { *x = RequestPaymentMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[72] + mi := &file_binary_proto_def_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12880,7 +12962,7 @@ func (x *RequestPaymentMessage) String() string { func (*RequestPaymentMessage) ProtoMessage() {} func (x *RequestPaymentMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[72] + mi := &file_binary_proto_def_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12893,7 +12975,7 @@ func (x *RequestPaymentMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestPaymentMessage.ProtoReflect.Descriptor instead. func (*RequestPaymentMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{72} + return file_binary_proto_def_proto_rawDescGZIP(), []int{73} } func (x *RequestPaymentMessage) GetNoteMessage() *Message { @@ -12959,7 +13041,7 @@ type ReactionMessage struct { func (x *ReactionMessage) Reset() { *x = ReactionMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[73] + mi := &file_binary_proto_def_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12972,7 +13054,7 @@ func (x *ReactionMessage) String() string { func (*ReactionMessage) ProtoMessage() {} func (x *ReactionMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[73] + mi := &file_binary_proto_def_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12985,7 +13067,7 @@ func (x *ReactionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ReactionMessage.ProtoReflect.Descriptor instead. func (*ReactionMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{73} + return file_binary_proto_def_proto_rawDescGZIP(), []int{74} } func (x *ReactionMessage) GetKey() *MessageKey { @@ -13038,12 +13120,13 @@ type ProtocolMessage struct { BotFeedbackMessage *BotFeedbackMessage `protobuf:"bytes,18,opt,name=botFeedbackMessage" json:"botFeedbackMessage,omitempty"` InvokerJid *string `protobuf:"bytes,19,opt,name=invokerJid" json:"invokerJid,omitempty"` RequestWelcomeMessageMetadata *RequestWelcomeMessageMetadata `protobuf:"bytes,20,opt,name=requestWelcomeMessageMetadata" json:"requestWelcomeMessageMetadata,omitempty"` + MediaNotifyMessage *MediaNotifyMessage `protobuf:"bytes,21,opt,name=mediaNotifyMessage" json:"mediaNotifyMessage,omitempty"` } func (x *ProtocolMessage) Reset() { *x = ProtocolMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[74] + mi := &file_binary_proto_def_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13056,7 +13139,7 @@ func (x *ProtocolMessage) String() string { func (*ProtocolMessage) ProtoMessage() {} func (x *ProtocolMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[74] + mi := &file_binary_proto_def_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13069,7 +13152,7 @@ func (x *ProtocolMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtocolMessage.ProtoReflect.Descriptor instead. func (*ProtocolMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{74} + return file_binary_proto_def_proto_rawDescGZIP(), []int{75} } func (x *ProtocolMessage) GetKey() *MessageKey { @@ -13191,6 +13274,13 @@ func (x *ProtocolMessage) GetRequestWelcomeMessageMetadata() *RequestWelcomeMess return nil } +func (x *ProtocolMessage) GetMediaNotifyMessage() *MediaNotifyMessage { + if x != nil { + return x.MediaNotifyMessage + } + return nil +} + type ProductMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -13207,7 +13297,7 @@ type ProductMessage struct { func (x *ProductMessage) Reset() { *x = ProductMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[75] + mi := &file_binary_proto_def_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13220,7 +13310,7 @@ func (x *ProductMessage) String() string { func (*ProductMessage) ProtoMessage() {} func (x *ProductMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[75] + mi := &file_binary_proto_def_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13233,7 +13323,7 @@ func (x *ProductMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProductMessage.ProtoReflect.Descriptor instead. func (*ProductMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{75} + return file_binary_proto_def_proto_rawDescGZIP(), []int{76} } func (x *ProductMessage) GetProduct() *ProductMessage_ProductSnapshot { @@ -13289,7 +13379,7 @@ type PollVoteMessage struct { func (x *PollVoteMessage) Reset() { *x = PollVoteMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[76] + mi := &file_binary_proto_def_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13302,7 +13392,7 @@ func (x *PollVoteMessage) String() string { func (*PollVoteMessage) ProtoMessage() {} func (x *PollVoteMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[76] + mi := &file_binary_proto_def_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13315,7 +13405,7 @@ func (x *PollVoteMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PollVoteMessage.ProtoReflect.Descriptor instead. func (*PollVoteMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{76} + return file_binary_proto_def_proto_rawDescGZIP(), []int{77} } func (x *PollVoteMessage) GetSelectedOptions() [][]byte { @@ -13339,7 +13429,7 @@ type PollUpdateMessage struct { func (x *PollUpdateMessage) Reset() { *x = PollUpdateMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[77] + mi := &file_binary_proto_def_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13352,7 +13442,7 @@ func (x *PollUpdateMessage) String() string { func (*PollUpdateMessage) ProtoMessage() {} func (x *PollUpdateMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[77] + mi := &file_binary_proto_def_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13365,7 +13455,7 @@ func (x *PollUpdateMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PollUpdateMessage.ProtoReflect.Descriptor instead. func (*PollUpdateMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{77} + return file_binary_proto_def_proto_rawDescGZIP(), []int{78} } func (x *PollUpdateMessage) GetPollCreationMessageKey() *MessageKey { @@ -13405,7 +13495,7 @@ type PollUpdateMessageMetadata struct { func (x *PollUpdateMessageMetadata) Reset() { *x = PollUpdateMessageMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[78] + mi := &file_binary_proto_def_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13418,7 +13508,7 @@ func (x *PollUpdateMessageMetadata) String() string { func (*PollUpdateMessageMetadata) ProtoMessage() {} func (x *PollUpdateMessageMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[78] + mi := &file_binary_proto_def_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13431,7 +13521,7 @@ func (x *PollUpdateMessageMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use PollUpdateMessageMetadata.ProtoReflect.Descriptor instead. func (*PollUpdateMessageMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{78} + return file_binary_proto_def_proto_rawDescGZIP(), []int{79} } type PollEncValue struct { @@ -13446,7 +13536,7 @@ type PollEncValue struct { func (x *PollEncValue) Reset() { *x = PollEncValue{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[79] + mi := &file_binary_proto_def_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13459,7 +13549,7 @@ func (x *PollEncValue) String() string { func (*PollEncValue) ProtoMessage() {} func (x *PollEncValue) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[79] + mi := &file_binary_proto_def_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13472,7 +13562,7 @@ func (x *PollEncValue) ProtoReflect() protoreflect.Message { // Deprecated: Use PollEncValue.ProtoReflect.Descriptor instead. func (*PollEncValue) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{79} + return file_binary_proto_def_proto_rawDescGZIP(), []int{80} } func (x *PollEncValue) GetEncPayload() []byte { @@ -13504,7 +13594,7 @@ type PollCreationMessage struct { func (x *PollCreationMessage) Reset() { *x = PollCreationMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[80] + mi := &file_binary_proto_def_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13517,7 +13607,7 @@ func (x *PollCreationMessage) String() string { func (*PollCreationMessage) ProtoMessage() {} func (x *PollCreationMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[80] + mi := &file_binary_proto_def_proto_msgTypes[81] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13530,7 +13620,7 @@ func (x *PollCreationMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PollCreationMessage.ProtoReflect.Descriptor instead. func (*PollCreationMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{80} + return file_binary_proto_def_proto_rawDescGZIP(), []int{81} } func (x *PollCreationMessage) GetEncKey() []byte { @@ -13568,6 +13658,53 @@ func (x *PollCreationMessage) GetContextInfo() *ContextInfo { return nil } +type PlaceholderMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *PlaceholderMessage_PlaceholderType `protobuf:"varint,1,opt,name=type,enum=proto.PlaceholderMessage_PlaceholderType" json:"type,omitempty"` +} + +func (x *PlaceholderMessage) Reset() { + *x = PlaceholderMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlaceholderMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlaceholderMessage) ProtoMessage() {} + +func (x *PlaceholderMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[82] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlaceholderMessage.ProtoReflect.Descriptor instead. +func (*PlaceholderMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{82} +} + +func (x *PlaceholderMessage) GetType() PlaceholderMessage_PlaceholderType { + if x != nil && x.Type != nil { + return *x.Type + } + return PlaceholderMessage_MASK_LINKED_DEVICES +} + type PinInChatMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -13581,7 +13718,7 @@ type PinInChatMessage struct { func (x *PinInChatMessage) Reset() { *x = PinInChatMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[81] + mi := &file_binary_proto_def_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13594,7 +13731,7 @@ func (x *PinInChatMessage) String() string { func (*PinInChatMessage) ProtoMessage() {} func (x *PinInChatMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[81] + mi := &file_binary_proto_def_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13607,7 +13744,7 @@ func (x *PinInChatMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PinInChatMessage.ProtoReflect.Descriptor instead. func (*PinInChatMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{81} + return file_binary_proto_def_proto_rawDescGZIP(), []int{83} } func (x *PinInChatMessage) GetKey() *MessageKey { @@ -13644,7 +13781,7 @@ type PeerDataOperationRequestResponseMessage struct { func (x *PeerDataOperationRequestResponseMessage) Reset() { *x = PeerDataOperationRequestResponseMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[82] + mi := &file_binary_proto_def_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13657,7 +13794,7 @@ func (x *PeerDataOperationRequestResponseMessage) String() string { func (*PeerDataOperationRequestResponseMessage) ProtoMessage() {} func (x *PeerDataOperationRequestResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[82] + mi := &file_binary_proto_def_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13670,7 +13807,7 @@ func (x *PeerDataOperationRequestResponseMessage) ProtoReflect() protoreflect.Me // Deprecated: Use PeerDataOperationRequestResponseMessage.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestResponseMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{82} + return file_binary_proto_def_proto_rawDescGZIP(), []int{84} } func (x *PeerDataOperationRequestResponseMessage) GetPeerDataOperationRequestType() PeerDataOperationRequestType { @@ -13709,7 +13846,7 @@ type PeerDataOperationRequestMessage struct { func (x *PeerDataOperationRequestMessage) Reset() { *x = PeerDataOperationRequestMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[83] + mi := &file_binary_proto_def_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13722,7 +13859,7 @@ func (x *PeerDataOperationRequestMessage) String() string { func (*PeerDataOperationRequestMessage) ProtoMessage() {} func (x *PeerDataOperationRequestMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[83] + mi := &file_binary_proto_def_proto_msgTypes[85] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13735,7 +13872,7 @@ func (x *PeerDataOperationRequestMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerDataOperationRequestMessage.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{83} + return file_binary_proto_def_proto_rawDescGZIP(), []int{85} } func (x *PeerDataOperationRequestMessage) GetPeerDataOperationRequestType() PeerDataOperationRequestType { @@ -13785,7 +13922,7 @@ type PaymentInviteMessage struct { func (x *PaymentInviteMessage) Reset() { *x = PaymentInviteMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[84] + mi := &file_binary_proto_def_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13798,7 +13935,7 @@ func (x *PaymentInviteMessage) String() string { func (*PaymentInviteMessage) ProtoMessage() {} func (x *PaymentInviteMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[84] + mi := &file_binary_proto_def_proto_msgTypes[86] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13811,7 +13948,7 @@ func (x *PaymentInviteMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentInviteMessage.ProtoReflect.Descriptor instead. func (*PaymentInviteMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{84} + return file_binary_proto_def_proto_rawDescGZIP(), []int{86} } func (x *PaymentInviteMessage) GetServiceType() PaymentInviteMessage_ServiceType { @@ -13852,7 +13989,7 @@ type OrderMessage struct { func (x *OrderMessage) Reset() { *x = OrderMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[85] + mi := &file_binary_proto_def_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13865,7 +14002,7 @@ func (x *OrderMessage) String() string { func (*OrderMessage) ProtoMessage() {} func (x *OrderMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[85] + mi := &file_binary_proto_def_proto_msgTypes[87] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13878,7 +14015,7 @@ func (x *OrderMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderMessage.ProtoReflect.Descriptor instead. func (*OrderMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{85} + return file_binary_proto_def_proto_rawDescGZIP(), []int{87} } func (x *OrderMessage) GetOrderId() string { @@ -13994,7 +14131,7 @@ type NewsletterAdminInviteMessage struct { func (x *NewsletterAdminInviteMessage) Reset() { *x = NewsletterAdminInviteMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[86] + mi := &file_binary_proto_def_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14007,7 +14144,7 @@ func (x *NewsletterAdminInviteMessage) String() string { func (*NewsletterAdminInviteMessage) ProtoMessage() {} func (x *NewsletterAdminInviteMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[86] + mi := &file_binary_proto_def_proto_msgTypes[88] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14020,7 +14157,7 @@ func (x *NewsletterAdminInviteMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use NewsletterAdminInviteMessage.ProtoReflect.Descriptor instead. func (*NewsletterAdminInviteMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{86} + return file_binary_proto_def_proto_rawDescGZIP(), []int{88} } func (x *NewsletterAdminInviteMessage) GetNewsletterJid() string { @@ -14076,7 +14213,7 @@ type MessageHistoryBundle struct { func (x *MessageHistoryBundle) Reset() { *x = MessageHistoryBundle{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[87] + mi := &file_binary_proto_def_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14089,7 +14226,7 @@ func (x *MessageHistoryBundle) String() string { func (*MessageHistoryBundle) ProtoMessage() {} func (x *MessageHistoryBundle) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[87] + mi := &file_binary_proto_def_proto_msgTypes[89] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14102,7 +14239,7 @@ func (x *MessageHistoryBundle) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageHistoryBundle.ProtoReflect.Descriptor instead. func (*MessageHistoryBundle) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{87} + return file_binary_proto_def_proto_rawDescGZIP(), []int{89} } func (x *MessageHistoryBundle) GetMimetype() string { @@ -14183,7 +14320,7 @@ type LocationMessage struct { func (x *LocationMessage) Reset() { *x = LocationMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[88] + mi := &file_binary_proto_def_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14196,7 +14333,7 @@ func (x *LocationMessage) String() string { func (*LocationMessage) ProtoMessage() {} func (x *LocationMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[88] + mi := &file_binary_proto_def_proto_msgTypes[90] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14209,7 +14346,7 @@ func (x *LocationMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use LocationMessage.ProtoReflect.Descriptor instead. func (*LocationMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{88} + return file_binary_proto_def_proto_rawDescGZIP(), []int{90} } func (x *LocationMessage) GetDegreesLatitude() float64 { @@ -14316,7 +14453,7 @@ type LiveLocationMessage struct { func (x *LiveLocationMessage) Reset() { *x = LiveLocationMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[89] + mi := &file_binary_proto_def_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14329,7 +14466,7 @@ func (x *LiveLocationMessage) String() string { func (*LiveLocationMessage) ProtoMessage() {} func (x *LiveLocationMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[89] + mi := &file_binary_proto_def_proto_msgTypes[91] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14342,7 +14479,7 @@ func (x *LiveLocationMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use LiveLocationMessage.ProtoReflect.Descriptor instead. func (*LiveLocationMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{89} + return file_binary_proto_def_proto_rawDescGZIP(), []int{91} } func (x *LiveLocationMessage) GetDegreesLatitude() float64 { @@ -14430,7 +14567,7 @@ type ListResponseMessage struct { func (x *ListResponseMessage) Reset() { *x = ListResponseMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[90] + mi := &file_binary_proto_def_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14443,7 +14580,7 @@ func (x *ListResponseMessage) String() string { func (*ListResponseMessage) ProtoMessage() {} func (x *ListResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[90] + mi := &file_binary_proto_def_proto_msgTypes[92] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14456,7 +14593,7 @@ func (x *ListResponseMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResponseMessage.ProtoReflect.Descriptor instead. func (*ListResponseMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{90} + return file_binary_proto_def_proto_rawDescGZIP(), []int{92} } func (x *ListResponseMessage) GetTitle() string { @@ -14512,7 +14649,7 @@ type ListMessage struct { func (x *ListMessage) Reset() { *x = ListMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[91] + mi := &file_binary_proto_def_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14525,7 +14662,7 @@ func (x *ListMessage) String() string { func (*ListMessage) ProtoMessage() {} func (x *ListMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[91] + mi := &file_binary_proto_def_proto_msgTypes[93] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14538,7 +14675,7 @@ func (x *ListMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMessage.ProtoReflect.Descriptor instead. func (*ListMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93} } func (x *ListMessage) GetTitle() string { @@ -14610,7 +14747,7 @@ type KeepInChatMessage struct { func (x *KeepInChatMessage) Reset() { *x = KeepInChatMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[92] + mi := &file_binary_proto_def_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14623,7 +14760,7 @@ func (x *KeepInChatMessage) String() string { func (*KeepInChatMessage) ProtoMessage() {} func (x *KeepInChatMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[92] + mi := &file_binary_proto_def_proto_msgTypes[94] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14636,7 +14773,7 @@ func (x *KeepInChatMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use KeepInChatMessage.ProtoReflect.Descriptor instead. func (*KeepInChatMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{92} + return file_binary_proto_def_proto_rawDescGZIP(), []int{94} } func (x *KeepInChatMessage) GetKey() *MessageKey { @@ -14680,7 +14817,7 @@ type InvoiceMessage struct { func (x *InvoiceMessage) Reset() { *x = InvoiceMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[93] + mi := &file_binary_proto_def_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14693,7 +14830,7 @@ func (x *InvoiceMessage) String() string { func (*InvoiceMessage) ProtoMessage() {} func (x *InvoiceMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[93] + mi := &file_binary_proto_def_proto_msgTypes[95] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14706,7 +14843,7 @@ func (x *InvoiceMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use InvoiceMessage.ProtoReflect.Descriptor instead. func (*InvoiceMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{93} + return file_binary_proto_def_proto_rawDescGZIP(), []int{95} } func (x *InvoiceMessage) GetNote() string { @@ -14795,7 +14932,7 @@ type InteractiveResponseMessage struct { func (x *InteractiveResponseMessage) Reset() { *x = InteractiveResponseMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[94] + mi := &file_binary_proto_def_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14808,7 +14945,7 @@ func (x *InteractiveResponseMessage) String() string { func (*InteractiveResponseMessage) ProtoMessage() {} func (x *InteractiveResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[94] + mi := &file_binary_proto_def_proto_msgTypes[96] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14821,7 +14958,7 @@ func (x *InteractiveResponseMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use InteractiveResponseMessage.ProtoReflect.Descriptor instead. func (*InteractiveResponseMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{94} + return file_binary_proto_def_proto_rawDescGZIP(), []int{96} } func (x *InteractiveResponseMessage) GetBody() *InteractiveResponseMessage_Body { @@ -14863,6 +15000,147 @@ type InteractiveResponseMessage_NativeFlowResponseMessage_ struct { func (*InteractiveResponseMessage_NativeFlowResponseMessage_) isInteractiveResponseMessage_InteractiveResponseMessage() { } +type InteractiveMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *InteractiveMessage_Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + Body *InteractiveMessage_Body `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"` + Footer *InteractiveMessage_Footer `protobuf:"bytes,3,opt,name=footer" json:"footer,omitempty"` + ContextInfo *ContextInfo `protobuf:"bytes,15,opt,name=contextInfo" json:"contextInfo,omitempty"` + // Types that are assignable to InteractiveMessage: + // + // *InteractiveMessage_ShopStorefrontMessage + // *InteractiveMessage_CollectionMessage_ + // *InteractiveMessage_NativeFlowMessage_ + // *InteractiveMessage_CarouselMessage_ + InteractiveMessage isInteractiveMessage_InteractiveMessage `protobuf_oneof:"interactiveMessage"` +} + +func (x *InteractiveMessage) Reset() { + *x = InteractiveMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage) ProtoMessage() {} + +func (x *InteractiveMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[97] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage.ProtoReflect.Descriptor instead. +func (*InteractiveMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97} +} + +func (x *InteractiveMessage) GetHeader() *InteractiveMessage_Header { + if x != nil { + return x.Header + } + return nil +} + +func (x *InteractiveMessage) GetBody() *InteractiveMessage_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *InteractiveMessage) GetFooter() *InteractiveMessage_Footer { + if x != nil { + return x.Footer + } + return nil +} + +func (x *InteractiveMessage) GetContextInfo() *ContextInfo { + if x != nil { + return x.ContextInfo + } + return nil +} + +func (m *InteractiveMessage) GetInteractiveMessage() isInteractiveMessage_InteractiveMessage { + if m != nil { + return m.InteractiveMessage + } + return nil +} + +func (x *InteractiveMessage) GetShopStorefrontMessage() *InteractiveMessage_ShopMessage { + if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_ShopStorefrontMessage); ok { + return x.ShopStorefrontMessage + } + return nil +} + +func (x *InteractiveMessage) GetCollectionMessage() *InteractiveMessage_CollectionMessage { + if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_CollectionMessage_); ok { + return x.CollectionMessage + } + return nil +} + +func (x *InteractiveMessage) GetNativeFlowMessage() *InteractiveMessage_NativeFlowMessage { + if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_NativeFlowMessage_); ok { + return x.NativeFlowMessage + } + return nil +} + +func (x *InteractiveMessage) GetCarouselMessage() *InteractiveMessage_CarouselMessage { + if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_CarouselMessage_); ok { + return x.CarouselMessage + } + return nil +} + +type isInteractiveMessage_InteractiveMessage interface { + isInteractiveMessage_InteractiveMessage() +} + +type InteractiveMessage_ShopStorefrontMessage struct { + ShopStorefrontMessage *InteractiveMessage_ShopMessage `protobuf:"bytes,4,opt,name=shopStorefrontMessage,oneof"` +} + +type InteractiveMessage_CollectionMessage_ struct { + CollectionMessage *InteractiveMessage_CollectionMessage `protobuf:"bytes,5,opt,name=collectionMessage,oneof"` +} + +type InteractiveMessage_NativeFlowMessage_ struct { + NativeFlowMessage *InteractiveMessage_NativeFlowMessage `protobuf:"bytes,6,opt,name=nativeFlowMessage,oneof"` +} + +type InteractiveMessage_CarouselMessage_ struct { + CarouselMessage *InteractiveMessage_CarouselMessage `protobuf:"bytes,7,opt,name=carouselMessage,oneof"` +} + +func (*InteractiveMessage_ShopStorefrontMessage) isInteractiveMessage_InteractiveMessage() {} + +func (*InteractiveMessage_CollectionMessage_) isInteractiveMessage_InteractiveMessage() {} + +func (*InteractiveMessage_NativeFlowMessage_) isInteractiveMessage_InteractiveMessage() {} + +func (*InteractiveMessage_CarouselMessage_) isInteractiveMessage_InteractiveMessage() {} + type EphemeralSetting struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -14875,7 +15153,7 @@ type EphemeralSetting struct { func (x *EphemeralSetting) Reset() { *x = EphemeralSetting{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[95] + mi := &file_binary_proto_def_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14888,7 +15166,7 @@ func (x *EphemeralSetting) String() string { func (*EphemeralSetting) ProtoMessage() {} func (x *EphemeralSetting) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[95] + mi := &file_binary_proto_def_proto_msgTypes[98] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14901,7 +15179,7 @@ func (x *EphemeralSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use EphemeralSetting.ProtoReflect.Descriptor instead. func (*EphemeralSetting) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{95} + return file_binary_proto_def_proto_rawDescGZIP(), []int{98} } func (x *EphemeralSetting) GetDuration() int32 { @@ -14930,7 +15208,7 @@ type WallpaperSettings struct { func (x *WallpaperSettings) Reset() { *x = WallpaperSettings{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[96] + mi := &file_binary_proto_def_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14943,7 +15221,7 @@ func (x *WallpaperSettings) String() string { func (*WallpaperSettings) ProtoMessage() {} func (x *WallpaperSettings) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[96] + mi := &file_binary_proto_def_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14956,7 +15234,7 @@ func (x *WallpaperSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use WallpaperSettings.ProtoReflect.Descriptor instead. func (*WallpaperSettings) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{96} + return file_binary_proto_def_proto_rawDescGZIP(), []int{99} } func (x *WallpaperSettings) GetFilename() string { @@ -14994,7 +15272,7 @@ type StickerMetadata struct { func (x *StickerMetadata) Reset() { *x = StickerMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[97] + mi := &file_binary_proto_def_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15007,7 +15285,7 @@ func (x *StickerMetadata) String() string { func (*StickerMetadata) ProtoMessage() {} func (x *StickerMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[97] + mi := &file_binary_proto_def_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15020,7 +15298,7 @@ func (x *StickerMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use StickerMetadata.ProtoReflect.Descriptor instead. func (*StickerMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{97} + return file_binary_proto_def_proto_rawDescGZIP(), []int{100} } func (x *StickerMetadata) GetUrl() string { @@ -15112,7 +15390,7 @@ type Pushname struct { func (x *Pushname) Reset() { *x = Pushname{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[98] + mi := &file_binary_proto_def_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15125,7 +15403,7 @@ func (x *Pushname) String() string { func (*Pushname) ProtoMessage() {} func (x *Pushname) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[98] + mi := &file_binary_proto_def_proto_msgTypes[101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15138,7 +15416,7 @@ func (x *Pushname) ProtoReflect() protoreflect.Message { // Deprecated: Use Pushname.ProtoReflect.Descriptor instead. func (*Pushname) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{98} + return file_binary_proto_def_proto_rawDescGZIP(), []int{101} } func (x *Pushname) GetId() string { @@ -15167,7 +15445,7 @@ type PhoneNumberToLIDMapping struct { func (x *PhoneNumberToLIDMapping) Reset() { *x = PhoneNumberToLIDMapping{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[99] + mi := &file_binary_proto_def_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15180,7 +15458,7 @@ func (x *PhoneNumberToLIDMapping) String() string { func (*PhoneNumberToLIDMapping) ProtoMessage() {} func (x *PhoneNumberToLIDMapping) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[99] + mi := &file_binary_proto_def_proto_msgTypes[102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15193,7 +15471,7 @@ func (x *PhoneNumberToLIDMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use PhoneNumberToLIDMapping.ProtoReflect.Descriptor instead. func (*PhoneNumberToLIDMapping) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{99} + return file_binary_proto_def_proto_rawDescGZIP(), []int{102} } func (x *PhoneNumberToLIDMapping) GetPnJid() string { @@ -15222,7 +15500,7 @@ type PastParticipants struct { func (x *PastParticipants) Reset() { *x = PastParticipants{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[100] + mi := &file_binary_proto_def_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15235,7 +15513,7 @@ func (x *PastParticipants) String() string { func (*PastParticipants) ProtoMessage() {} func (x *PastParticipants) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[100] + mi := &file_binary_proto_def_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15248,7 +15526,7 @@ func (x *PastParticipants) ProtoReflect() protoreflect.Message { // Deprecated: Use PastParticipants.ProtoReflect.Descriptor instead. func (*PastParticipants) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{100} + return file_binary_proto_def_proto_rawDescGZIP(), []int{103} } func (x *PastParticipants) GetGroupJid() string { @@ -15278,7 +15556,7 @@ type PastParticipant struct { func (x *PastParticipant) Reset() { *x = PastParticipant{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[101] + mi := &file_binary_proto_def_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15291,7 +15569,7 @@ func (x *PastParticipant) String() string { func (*PastParticipant) ProtoMessage() {} func (x *PastParticipant) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[101] + mi := &file_binary_proto_def_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15304,7 +15582,7 @@ func (x *PastParticipant) ProtoReflect() protoreflect.Message { // Deprecated: Use PastParticipant.ProtoReflect.Descriptor instead. func (*PastParticipant) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{101} + return file_binary_proto_def_proto_rawDescGZIP(), []int{104} } func (x *PastParticipant) GetUserJid() string { @@ -15344,7 +15622,7 @@ type NotificationSettings struct { func (x *NotificationSettings) Reset() { *x = NotificationSettings{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[102] + mi := &file_binary_proto_def_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15357,7 +15635,7 @@ func (x *NotificationSettings) String() string { func (*NotificationSettings) ProtoMessage() {} func (x *NotificationSettings) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[102] + mi := &file_binary_proto_def_proto_msgTypes[105] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15370,7 +15648,7 @@ func (x *NotificationSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationSettings.ProtoReflect.Descriptor instead. func (*NotificationSettings) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{102} + return file_binary_proto_def_proto_rawDescGZIP(), []int{105} } func (x *NotificationSettings) GetMessageVibrate() string { @@ -15439,7 +15717,7 @@ type HistorySync struct { func (x *HistorySync) Reset() { *x = HistorySync{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[103] + mi := &file_binary_proto_def_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15452,7 +15730,7 @@ func (x *HistorySync) String() string { func (*HistorySync) ProtoMessage() {} func (x *HistorySync) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[103] + mi := &file_binary_proto_def_proto_msgTypes[106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15465,7 +15743,7 @@ func (x *HistorySync) ProtoReflect() protoreflect.Message { // Deprecated: Use HistorySync.ProtoReflect.Descriptor instead. func (*HistorySync) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{103} + return file_binary_proto_def_proto_rawDescGZIP(), []int{106} } func (x *HistorySync) GetSyncType() HistorySync_HistorySyncType { @@ -15578,7 +15856,7 @@ type HistorySyncMsg struct { func (x *HistorySyncMsg) Reset() { *x = HistorySyncMsg{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[104] + mi := &file_binary_proto_def_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15591,7 +15869,7 @@ func (x *HistorySyncMsg) String() string { func (*HistorySyncMsg) ProtoMessage() {} func (x *HistorySyncMsg) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[104] + mi := &file_binary_proto_def_proto_msgTypes[107] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15604,7 +15882,7 @@ func (x *HistorySyncMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use HistorySyncMsg.ProtoReflect.Descriptor instead. func (*HistorySyncMsg) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{104} + return file_binary_proto_def_proto_rawDescGZIP(), []int{107} } func (x *HistorySyncMsg) GetMessage() *WebMessageInfo { @@ -15633,7 +15911,7 @@ type GroupParticipant struct { func (x *GroupParticipant) Reset() { *x = GroupParticipant{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[105] + mi := &file_binary_proto_def_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15646,7 +15924,7 @@ func (x *GroupParticipant) String() string { func (*GroupParticipant) ProtoMessage() {} func (x *GroupParticipant) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[105] + mi := &file_binary_proto_def_proto_msgTypes[108] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15659,7 +15937,7 @@ func (x *GroupParticipant) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupParticipant.ProtoReflect.Descriptor instead. func (*GroupParticipant) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{105} + return file_binary_proto_def_proto_rawDescGZIP(), []int{108} } func (x *GroupParticipant) GetUserJid() string { @@ -15704,7 +15982,7 @@ type GlobalSettings struct { func (x *GlobalSettings) Reset() { *x = GlobalSettings{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[106] + mi := &file_binary_proto_def_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15717,7 +15995,7 @@ func (x *GlobalSettings) String() string { func (*GlobalSettings) ProtoMessage() {} func (x *GlobalSettings) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[106] + mi := &file_binary_proto_def_proto_msgTypes[109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15730,7 +16008,7 @@ func (x *GlobalSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use GlobalSettings.ProtoReflect.Descriptor instead. func (*GlobalSettings) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{106} + return file_binary_proto_def_proto_rawDescGZIP(), []int{109} } func (x *GlobalSettings) GetLightThemeWallpaper() *WallpaperSettings { @@ -15914,7 +16192,7 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[107] + mi := &file_binary_proto_def_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15927,7 +16205,7 @@ func (x *Conversation) String() string { func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[107] + mi := &file_binary_proto_def_proto_msgTypes[110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15940,7 +16218,7 @@ func (x *Conversation) ProtoReflect() protoreflect.Message { // Deprecated: Use Conversation.ProtoReflect.Descriptor instead. func (*Conversation) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{107} + return file_binary_proto_def_proto_rawDescGZIP(), []int{110} } func (x *Conversation) GetId() string { @@ -16270,7 +16548,7 @@ type AvatarUserSettings struct { func (x *AvatarUserSettings) Reset() { *x = AvatarUserSettings{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[108] + mi := &file_binary_proto_def_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16283,7 +16561,7 @@ func (x *AvatarUserSettings) String() string { func (*AvatarUserSettings) ProtoMessage() {} func (x *AvatarUserSettings) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[108] + mi := &file_binary_proto_def_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16296,7 +16574,7 @@ func (x *AvatarUserSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use AvatarUserSettings.ProtoReflect.Descriptor instead. func (*AvatarUserSettings) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{108} + return file_binary_proto_def_proto_rawDescGZIP(), []int{111} } func (x *AvatarUserSettings) GetFbid() string { @@ -16327,7 +16605,7 @@ type AutoDownloadSettings struct { func (x *AutoDownloadSettings) Reset() { *x = AutoDownloadSettings{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[109] + mi := &file_binary_proto_def_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16340,7 +16618,7 @@ func (x *AutoDownloadSettings) String() string { func (*AutoDownloadSettings) ProtoMessage() {} func (x *AutoDownloadSettings) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[109] + mi := &file_binary_proto_def_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16353,7 +16631,7 @@ func (x *AutoDownloadSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use AutoDownloadSettings.ProtoReflect.Descriptor instead. func (*AutoDownloadSettings) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{109} + return file_binary_proto_def_proto_rawDescGZIP(), []int{112} } func (x *AutoDownloadSettings) GetDownloadImages() bool { @@ -16395,7 +16673,7 @@ type ServerErrorReceipt struct { func (x *ServerErrorReceipt) Reset() { *x = ServerErrorReceipt{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[110] + mi := &file_binary_proto_def_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16408,7 +16686,7 @@ func (x *ServerErrorReceipt) String() string { func (*ServerErrorReceipt) ProtoMessage() {} func (x *ServerErrorReceipt) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[110] + mi := &file_binary_proto_def_proto_msgTypes[113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16421,7 +16699,7 @@ func (x *ServerErrorReceipt) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerErrorReceipt.ProtoReflect.Descriptor instead. func (*ServerErrorReceipt) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{110} + return file_binary_proto_def_proto_rawDescGZIP(), []int{113} } func (x *ServerErrorReceipt) GetStanzaId() string { @@ -16444,7 +16722,7 @@ type MediaRetryNotification struct { func (x *MediaRetryNotification) Reset() { *x = MediaRetryNotification{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[111] + mi := &file_binary_proto_def_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16457,7 +16735,7 @@ func (x *MediaRetryNotification) String() string { func (*MediaRetryNotification) ProtoMessage() {} func (x *MediaRetryNotification) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[111] + mi := &file_binary_proto_def_proto_msgTypes[114] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16470,7 +16748,7 @@ func (x *MediaRetryNotification) ProtoReflect() protoreflect.Message { // Deprecated: Use MediaRetryNotification.ProtoReflect.Descriptor instead. func (*MediaRetryNotification) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{111} + return file_binary_proto_def_proto_rawDescGZIP(), []int{114} } func (x *MediaRetryNotification) GetStanzaId() string { @@ -16508,7 +16786,7 @@ type MessageKey struct { func (x *MessageKey) Reset() { *x = MessageKey{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[112] + mi := &file_binary_proto_def_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16521,7 +16799,7 @@ func (x *MessageKey) String() string { func (*MessageKey) ProtoMessage() {} func (x *MessageKey) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[112] + mi := &file_binary_proto_def_proto_msgTypes[115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16534,7 +16812,7 @@ func (x *MessageKey) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageKey.ProtoReflect.Descriptor instead. func (*MessageKey) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{112} + return file_binary_proto_def_proto_rawDescGZIP(), []int{115} } func (x *MessageKey) GetRemoteJid() string { @@ -16576,7 +16854,7 @@ type SyncdVersion struct { func (x *SyncdVersion) Reset() { *x = SyncdVersion{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[113] + mi := &file_binary_proto_def_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16589,7 +16867,7 @@ func (x *SyncdVersion) String() string { func (*SyncdVersion) ProtoMessage() {} func (x *SyncdVersion) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[113] + mi := &file_binary_proto_def_proto_msgTypes[116] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16602,7 +16880,7 @@ func (x *SyncdVersion) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdVersion.ProtoReflect.Descriptor instead. func (*SyncdVersion) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{113} + return file_binary_proto_def_proto_rawDescGZIP(), []int{116} } func (x *SyncdVersion) GetVersion() uint64 { @@ -16623,7 +16901,7 @@ type SyncdValue struct { func (x *SyncdValue) Reset() { *x = SyncdValue{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[114] + mi := &file_binary_proto_def_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16636,7 +16914,7 @@ func (x *SyncdValue) String() string { func (*SyncdValue) ProtoMessage() {} func (x *SyncdValue) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[114] + mi := &file_binary_proto_def_proto_msgTypes[117] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16649,7 +16927,7 @@ func (x *SyncdValue) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdValue.ProtoReflect.Descriptor instead. func (*SyncdValue) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{114} + return file_binary_proto_def_proto_rawDescGZIP(), []int{117} } func (x *SyncdValue) GetBlob() []byte { @@ -16673,7 +16951,7 @@ type SyncdSnapshot struct { func (x *SyncdSnapshot) Reset() { *x = SyncdSnapshot{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[115] + mi := &file_binary_proto_def_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16686,7 +16964,7 @@ func (x *SyncdSnapshot) String() string { func (*SyncdSnapshot) ProtoMessage() {} func (x *SyncdSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[115] + mi := &file_binary_proto_def_proto_msgTypes[118] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16699,7 +16977,7 @@ func (x *SyncdSnapshot) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdSnapshot.ProtoReflect.Descriptor instead. func (*SyncdSnapshot) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{115} + return file_binary_proto_def_proto_rawDescGZIP(), []int{118} } func (x *SyncdSnapshot) GetVersion() *SyncdVersion { @@ -16743,7 +17021,7 @@ type SyncdRecord struct { func (x *SyncdRecord) Reset() { *x = SyncdRecord{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[116] + mi := &file_binary_proto_def_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16756,7 +17034,7 @@ func (x *SyncdRecord) String() string { func (*SyncdRecord) ProtoMessage() {} func (x *SyncdRecord) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[116] + mi := &file_binary_proto_def_proto_msgTypes[119] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16769,7 +17047,7 @@ func (x *SyncdRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdRecord.ProtoReflect.Descriptor instead. func (*SyncdRecord) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{116} + return file_binary_proto_def_proto_rawDescGZIP(), []int{119} } func (x *SyncdRecord) GetIndex() *SyncdIndex { @@ -16812,7 +17090,7 @@ type SyncdPatch struct { func (x *SyncdPatch) Reset() { *x = SyncdPatch{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[117] + mi := &file_binary_proto_def_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16825,7 +17103,7 @@ func (x *SyncdPatch) String() string { func (*SyncdPatch) ProtoMessage() {} func (x *SyncdPatch) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[117] + mi := &file_binary_proto_def_proto_msgTypes[120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16838,7 +17116,7 @@ func (x *SyncdPatch) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdPatch.ProtoReflect.Descriptor instead. func (*SyncdPatch) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{117} + return file_binary_proto_def_proto_rawDescGZIP(), []int{120} } func (x *SyncdPatch) GetVersion() *SyncdVersion { @@ -16915,7 +17193,7 @@ type SyncdMutations struct { func (x *SyncdMutations) Reset() { *x = SyncdMutations{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[118] + mi := &file_binary_proto_def_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16928,7 +17206,7 @@ func (x *SyncdMutations) String() string { func (*SyncdMutations) ProtoMessage() {} func (x *SyncdMutations) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[118] + mi := &file_binary_proto_def_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16941,7 +17219,7 @@ func (x *SyncdMutations) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdMutations.ProtoReflect.Descriptor instead. func (*SyncdMutations) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{118} + return file_binary_proto_def_proto_rawDescGZIP(), []int{121} } func (x *SyncdMutations) GetMutations() []*SyncdMutation { @@ -16963,7 +17241,7 @@ type SyncdMutation struct { func (x *SyncdMutation) Reset() { *x = SyncdMutation{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[119] + mi := &file_binary_proto_def_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16976,7 +17254,7 @@ func (x *SyncdMutation) String() string { func (*SyncdMutation) ProtoMessage() {} func (x *SyncdMutation) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[119] + mi := &file_binary_proto_def_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16989,7 +17267,7 @@ func (x *SyncdMutation) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdMutation.ProtoReflect.Descriptor instead. func (*SyncdMutation) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{119} + return file_binary_proto_def_proto_rawDescGZIP(), []int{122} } func (x *SyncdMutation) GetOperation() SyncdMutation_SyncdOperation { @@ -17017,7 +17295,7 @@ type SyncdIndex struct { func (x *SyncdIndex) Reset() { *x = SyncdIndex{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[120] + mi := &file_binary_proto_def_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17030,7 +17308,7 @@ func (x *SyncdIndex) String() string { func (*SyncdIndex) ProtoMessage() {} func (x *SyncdIndex) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[120] + mi := &file_binary_proto_def_proto_msgTypes[123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17043,7 +17321,7 @@ func (x *SyncdIndex) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncdIndex.ProtoReflect.Descriptor instead. func (*SyncdIndex) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{120} + return file_binary_proto_def_proto_rawDescGZIP(), []int{123} } func (x *SyncdIndex) GetBlob() []byte { @@ -17064,7 +17342,7 @@ type KeyId struct { func (x *KeyId) Reset() { *x = KeyId{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[121] + mi := &file_binary_proto_def_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17077,7 +17355,7 @@ func (x *KeyId) String() string { func (*KeyId) ProtoMessage() {} func (x *KeyId) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[121] + mi := &file_binary_proto_def_proto_msgTypes[124] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17090,7 +17368,7 @@ func (x *KeyId) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyId.ProtoReflect.Descriptor instead. func (*KeyId) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{121} + return file_binary_proto_def_proto_rawDescGZIP(), []int{124} } func (x *KeyId) GetId() []byte { @@ -17116,7 +17394,7 @@ type ExternalBlobReference struct { func (x *ExternalBlobReference) Reset() { *x = ExternalBlobReference{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[122] + mi := &file_binary_proto_def_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17129,7 +17407,7 @@ func (x *ExternalBlobReference) String() string { func (*ExternalBlobReference) ProtoMessage() {} func (x *ExternalBlobReference) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[122] + mi := &file_binary_proto_def_proto_msgTypes[125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17142,7 +17420,7 @@ func (x *ExternalBlobReference) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalBlobReference.ProtoReflect.Descriptor instead. func (*ExternalBlobReference) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{122} + return file_binary_proto_def_proto_rawDescGZIP(), []int{125} } func (x *ExternalBlobReference) GetMediaKey() []byte { @@ -17199,7 +17477,7 @@ type ExitCode struct { func (x *ExitCode) Reset() { *x = ExitCode{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[123] + mi := &file_binary_proto_def_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17212,7 +17490,7 @@ func (x *ExitCode) String() string { func (*ExitCode) ProtoMessage() {} func (x *ExitCode) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[123] + mi := &file_binary_proto_def_proto_msgTypes[126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17225,7 +17503,7 @@ func (x *ExitCode) ProtoReflect() protoreflect.Message { // Deprecated: Use ExitCode.ProtoReflect.Descriptor instead. func (*ExitCode) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{123} + return file_binary_proto_def_proto_rawDescGZIP(), []int{126} } func (x *ExitCode) GetCode() uint64 { @@ -17289,12 +17567,13 @@ type SyncActionValue struct { DeleteIndividualCallLog *DeleteIndividualCallLogAction `protobuf:"bytes,46,opt,name=deleteIndividualCallLog" json:"deleteIndividualCallLog,omitempty"` LabelReorderingAction *LabelReorderingAction `protobuf:"bytes,47,opt,name=labelReorderingAction" json:"labelReorderingAction,omitempty"` PaymentInfoAction *PaymentInfoAction `protobuf:"bytes,48,opt,name=paymentInfoAction" json:"paymentInfoAction,omitempty"` + CustomPaymentMethodsAction *CustomPaymentMethodsAction `protobuf:"bytes,49,opt,name=customPaymentMethodsAction" json:"customPaymentMethodsAction,omitempty"` } func (x *SyncActionValue) Reset() { *x = SyncActionValue{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[124] + mi := &file_binary_proto_def_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17307,7 +17586,7 @@ func (x *SyncActionValue) String() string { func (*SyncActionValue) ProtoMessage() {} func (x *SyncActionValue) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[124] + mi := &file_binary_proto_def_proto_msgTypes[127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17320,7 +17599,7 @@ func (x *SyncActionValue) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncActionValue.ProtoReflect.Descriptor instead. func (*SyncActionValue) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{124} + return file_binary_proto_def_proto_rawDescGZIP(), []int{127} } func (x *SyncActionValue) GetTimestamp() int64 { @@ -17617,6 +17896,13 @@ func (x *SyncActionValue) GetPaymentInfoAction() *PaymentInfoAction { return nil } +func (x *SyncActionValue) GetCustomPaymentMethodsAction() *CustomPaymentMethodsAction { + if x != nil { + return x.CustomPaymentMethodsAction + } + return nil +} + type UserStatusMuteAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -17628,7 +17914,7 @@ type UserStatusMuteAction struct { func (x *UserStatusMuteAction) Reset() { *x = UserStatusMuteAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[125] + mi := &file_binary_proto_def_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17641,7 +17927,7 @@ func (x *UserStatusMuteAction) String() string { func (*UserStatusMuteAction) ProtoMessage() {} func (x *UserStatusMuteAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[125] + mi := &file_binary_proto_def_proto_msgTypes[128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17654,7 +17940,7 @@ func (x *UserStatusMuteAction) ProtoReflect() protoreflect.Message { // Deprecated: Use UserStatusMuteAction.ProtoReflect.Descriptor instead. func (*UserStatusMuteAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{125} + return file_binary_proto_def_proto_rawDescGZIP(), []int{128} } func (x *UserStatusMuteAction) GetMuted() bool { @@ -17675,7 +17961,7 @@ type UnarchiveChatsSetting struct { func (x *UnarchiveChatsSetting) Reset() { *x = UnarchiveChatsSetting{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[126] + mi := &file_binary_proto_def_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17688,7 +17974,7 @@ func (x *UnarchiveChatsSetting) String() string { func (*UnarchiveChatsSetting) ProtoMessage() {} func (x *UnarchiveChatsSetting) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[126] + mi := &file_binary_proto_def_proto_msgTypes[129] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17701,7 +17987,7 @@ func (x *UnarchiveChatsSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use UnarchiveChatsSetting.ProtoReflect.Descriptor instead. func (*UnarchiveChatsSetting) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{126} + return file_binary_proto_def_proto_rawDescGZIP(), []int{129} } func (x *UnarchiveChatsSetting) GetUnarchiveChats() bool { @@ -17722,7 +18008,7 @@ type TimeFormatAction struct { func (x *TimeFormatAction) Reset() { *x = TimeFormatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[127] + mi := &file_binary_proto_def_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17735,7 +18021,7 @@ func (x *TimeFormatAction) String() string { func (*TimeFormatAction) ProtoMessage() {} func (x *TimeFormatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[127] + mi := &file_binary_proto_def_proto_msgTypes[130] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17748,7 +18034,7 @@ func (x *TimeFormatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use TimeFormatAction.ProtoReflect.Descriptor instead. func (*TimeFormatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{127} + return file_binary_proto_def_proto_rawDescGZIP(), []int{130} } func (x *TimeFormatAction) GetIsTwentyFourHourFormatEnabled() bool { @@ -17770,7 +18056,7 @@ type SyncActionMessage struct { func (x *SyncActionMessage) Reset() { *x = SyncActionMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[128] + mi := &file_binary_proto_def_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17783,7 +18069,7 @@ func (x *SyncActionMessage) String() string { func (*SyncActionMessage) ProtoMessage() {} func (x *SyncActionMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[128] + mi := &file_binary_proto_def_proto_msgTypes[131] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17796,7 +18082,7 @@ func (x *SyncActionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncActionMessage.ProtoReflect.Descriptor instead. func (*SyncActionMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{128} + return file_binary_proto_def_proto_rawDescGZIP(), []int{131} } func (x *SyncActionMessage) GetKey() *MessageKey { @@ -17826,7 +18112,7 @@ type SyncActionMessageRange struct { func (x *SyncActionMessageRange) Reset() { *x = SyncActionMessageRange{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[129] + mi := &file_binary_proto_def_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17839,7 +18125,7 @@ func (x *SyncActionMessageRange) String() string { func (*SyncActionMessageRange) ProtoMessage() {} func (x *SyncActionMessageRange) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[129] + mi := &file_binary_proto_def_proto_msgTypes[132] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17852,7 +18138,7 @@ func (x *SyncActionMessageRange) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncActionMessageRange.ProtoReflect.Descriptor instead. func (*SyncActionMessageRange) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{129} + return file_binary_proto_def_proto_rawDescGZIP(), []int{132} } func (x *SyncActionMessageRange) GetLastMessageTimestamp() int64 { @@ -17889,7 +18175,7 @@ type SubscriptionAction struct { func (x *SubscriptionAction) Reset() { *x = SubscriptionAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[130] + mi := &file_binary_proto_def_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17902,7 +18188,7 @@ func (x *SubscriptionAction) String() string { func (*SubscriptionAction) ProtoMessage() {} func (x *SubscriptionAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[130] + mi := &file_binary_proto_def_proto_msgTypes[133] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17915,7 +18201,7 @@ func (x *SubscriptionAction) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriptionAction.ProtoReflect.Descriptor instead. func (*SubscriptionAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{130} + return file_binary_proto_def_proto_rawDescGZIP(), []int{133} } func (x *SubscriptionAction) GetIsDeactivated() bool { @@ -17959,7 +18245,7 @@ type StickerAction struct { func (x *StickerAction) Reset() { *x = StickerAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[131] + mi := &file_binary_proto_def_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17972,7 +18258,7 @@ func (x *StickerAction) String() string { func (*StickerAction) ProtoMessage() {} func (x *StickerAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[131] + mi := &file_binary_proto_def_proto_msgTypes[134] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17985,7 +18271,7 @@ func (x *StickerAction) ProtoReflect() protoreflect.Message { // Deprecated: Use StickerAction.ProtoReflect.Descriptor instead. func (*StickerAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{131} + return file_binary_proto_def_proto_rawDescGZIP(), []int{134} } func (x *StickerAction) GetUrl() string { @@ -18070,7 +18356,7 @@ type StatusPrivacyAction struct { func (x *StatusPrivacyAction) Reset() { *x = StatusPrivacyAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[132] + mi := &file_binary_proto_def_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18083,7 +18369,7 @@ func (x *StatusPrivacyAction) String() string { func (*StatusPrivacyAction) ProtoMessage() {} func (x *StatusPrivacyAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[132] + mi := &file_binary_proto_def_proto_msgTypes[135] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18096,7 +18382,7 @@ func (x *StatusPrivacyAction) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusPrivacyAction.ProtoReflect.Descriptor instead. func (*StatusPrivacyAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{132} + return file_binary_proto_def_proto_rawDescGZIP(), []int{135} } func (x *StatusPrivacyAction) GetMode() StatusPrivacyAction_StatusDistributionMode { @@ -18124,7 +18410,7 @@ type StarAction struct { func (x *StarAction) Reset() { *x = StarAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[133] + mi := &file_binary_proto_def_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18137,7 +18423,7 @@ func (x *StarAction) String() string { func (*StarAction) ProtoMessage() {} func (x *StarAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[133] + mi := &file_binary_proto_def_proto_msgTypes[136] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18150,7 +18436,7 @@ func (x *StarAction) ProtoReflect() protoreflect.Message { // Deprecated: Use StarAction.ProtoReflect.Descriptor instead. func (*StarAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{133} + return file_binary_proto_def_proto_rawDescGZIP(), []int{136} } func (x *StarAction) GetStarred() bool { @@ -18171,7 +18457,7 @@ type SecurityNotificationSetting struct { func (x *SecurityNotificationSetting) Reset() { *x = SecurityNotificationSetting{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[134] + mi := &file_binary_proto_def_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18184,7 +18470,7 @@ func (x *SecurityNotificationSetting) String() string { func (*SecurityNotificationSetting) ProtoMessage() {} func (x *SecurityNotificationSetting) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[134] + mi := &file_binary_proto_def_proto_msgTypes[137] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18197,7 +18483,7 @@ func (x *SecurityNotificationSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use SecurityNotificationSetting.ProtoReflect.Descriptor instead. func (*SecurityNotificationSetting) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{134} + return file_binary_proto_def_proto_rawDescGZIP(), []int{137} } func (x *SecurityNotificationSetting) GetShowNotification() bool { @@ -18218,7 +18504,7 @@ type RemoveRecentStickerAction struct { func (x *RemoveRecentStickerAction) Reset() { *x = RemoveRecentStickerAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[135] + mi := &file_binary_proto_def_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18231,7 +18517,7 @@ func (x *RemoveRecentStickerAction) String() string { func (*RemoveRecentStickerAction) ProtoMessage() {} func (x *RemoveRecentStickerAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[135] + mi := &file_binary_proto_def_proto_msgTypes[138] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18244,7 +18530,7 @@ func (x *RemoveRecentStickerAction) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveRecentStickerAction.ProtoReflect.Descriptor instead. func (*RemoveRecentStickerAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{135} + return file_binary_proto_def_proto_rawDescGZIP(), []int{138} } func (x *RemoveRecentStickerAction) GetLastStickerSentTs() int64 { @@ -18265,7 +18551,7 @@ type RecentEmojiWeightsAction struct { func (x *RecentEmojiWeightsAction) Reset() { *x = RecentEmojiWeightsAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[136] + mi := &file_binary_proto_def_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18278,7 +18564,7 @@ func (x *RecentEmojiWeightsAction) String() string { func (*RecentEmojiWeightsAction) ProtoMessage() {} func (x *RecentEmojiWeightsAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[136] + mi := &file_binary_proto_def_proto_msgTypes[139] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18291,7 +18577,7 @@ func (x *RecentEmojiWeightsAction) ProtoReflect() protoreflect.Message { // Deprecated: Use RecentEmojiWeightsAction.ProtoReflect.Descriptor instead. func (*RecentEmojiWeightsAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{136} + return file_binary_proto_def_proto_rawDescGZIP(), []int{139} } func (x *RecentEmojiWeightsAction) GetWeights() []*RecentEmojiWeight { @@ -18316,7 +18602,7 @@ type QuickReplyAction struct { func (x *QuickReplyAction) Reset() { *x = QuickReplyAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[137] + mi := &file_binary_proto_def_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18329,7 +18615,7 @@ func (x *QuickReplyAction) String() string { func (*QuickReplyAction) ProtoMessage() {} func (x *QuickReplyAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[137] + mi := &file_binary_proto_def_proto_msgTypes[140] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18342,7 +18628,7 @@ func (x *QuickReplyAction) ProtoReflect() protoreflect.Message { // Deprecated: Use QuickReplyAction.ProtoReflect.Descriptor instead. func (*QuickReplyAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{137} + return file_binary_proto_def_proto_rawDescGZIP(), []int{140} } func (x *QuickReplyAction) GetShortcut() string { @@ -18391,7 +18677,7 @@ type PushNameSetting struct { func (x *PushNameSetting) Reset() { *x = PushNameSetting{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[138] + mi := &file_binary_proto_def_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18404,7 +18690,7 @@ func (x *PushNameSetting) String() string { func (*PushNameSetting) ProtoMessage() {} func (x *PushNameSetting) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[138] + mi := &file_binary_proto_def_proto_msgTypes[141] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18417,7 +18703,7 @@ func (x *PushNameSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use PushNameSetting.ProtoReflect.Descriptor instead. func (*PushNameSetting) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{138} + return file_binary_proto_def_proto_rawDescGZIP(), []int{141} } func (x *PushNameSetting) GetName() string { @@ -18438,7 +18724,7 @@ type PrivacySettingRelayAllCalls struct { func (x *PrivacySettingRelayAllCalls) Reset() { *x = PrivacySettingRelayAllCalls{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[139] + mi := &file_binary_proto_def_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18451,7 +18737,7 @@ func (x *PrivacySettingRelayAllCalls) String() string { func (*PrivacySettingRelayAllCalls) ProtoMessage() {} func (x *PrivacySettingRelayAllCalls) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[139] + mi := &file_binary_proto_def_proto_msgTypes[142] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18464,7 +18750,7 @@ func (x *PrivacySettingRelayAllCalls) ProtoReflect() protoreflect.Message { // Deprecated: Use PrivacySettingRelayAllCalls.ProtoReflect.Descriptor instead. func (*PrivacySettingRelayAllCalls) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{139} + return file_binary_proto_def_proto_rawDescGZIP(), []int{142} } func (x *PrivacySettingRelayAllCalls) GetIsEnabled() bool { @@ -18485,7 +18771,7 @@ type PrimaryVersionAction struct { func (x *PrimaryVersionAction) Reset() { *x = PrimaryVersionAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[140] + mi := &file_binary_proto_def_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18498,7 +18784,7 @@ func (x *PrimaryVersionAction) String() string { func (*PrimaryVersionAction) ProtoMessage() {} func (x *PrimaryVersionAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[140] + mi := &file_binary_proto_def_proto_msgTypes[143] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18511,7 +18797,7 @@ func (x *PrimaryVersionAction) ProtoReflect() protoreflect.Message { // Deprecated: Use PrimaryVersionAction.ProtoReflect.Descriptor instead. func (*PrimaryVersionAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{140} + return file_binary_proto_def_proto_rawDescGZIP(), []int{143} } func (x *PrimaryVersionAction) GetVersion() string { @@ -18532,7 +18818,7 @@ type PrimaryFeature struct { func (x *PrimaryFeature) Reset() { *x = PrimaryFeature{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[141] + mi := &file_binary_proto_def_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18545,7 +18831,7 @@ func (x *PrimaryFeature) String() string { func (*PrimaryFeature) ProtoMessage() {} func (x *PrimaryFeature) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[141] + mi := &file_binary_proto_def_proto_msgTypes[144] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18558,7 +18844,7 @@ func (x *PrimaryFeature) ProtoReflect() protoreflect.Message { // Deprecated: Use PrimaryFeature.ProtoReflect.Descriptor instead. func (*PrimaryFeature) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{141} + return file_binary_proto_def_proto_rawDescGZIP(), []int{144} } func (x *PrimaryFeature) GetFlags() []string { @@ -18579,7 +18865,7 @@ type PnForLidChatAction struct { func (x *PnForLidChatAction) Reset() { *x = PnForLidChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[142] + mi := &file_binary_proto_def_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18592,7 +18878,7 @@ func (x *PnForLidChatAction) String() string { func (*PnForLidChatAction) ProtoMessage() {} func (x *PnForLidChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[142] + mi := &file_binary_proto_def_proto_msgTypes[145] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18605,7 +18891,7 @@ func (x *PnForLidChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use PnForLidChatAction.ProtoReflect.Descriptor instead. func (*PnForLidChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{142} + return file_binary_proto_def_proto_rawDescGZIP(), []int{145} } func (x *PnForLidChatAction) GetPnJid() string { @@ -18626,7 +18912,7 @@ type PinAction struct { func (x *PinAction) Reset() { *x = PinAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[143] + mi := &file_binary_proto_def_proto_msgTypes[146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18639,7 +18925,7 @@ func (x *PinAction) String() string { func (*PinAction) ProtoMessage() {} func (x *PinAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[143] + mi := &file_binary_proto_def_proto_msgTypes[146] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18652,7 +18938,7 @@ func (x *PinAction) ProtoReflect() protoreflect.Message { // Deprecated: Use PinAction.ProtoReflect.Descriptor instead. func (*PinAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{143} + return file_binary_proto_def_proto_rawDescGZIP(), []int{146} } func (x *PinAction) GetPinned() bool { @@ -18673,7 +18959,7 @@ type PaymentInfoAction struct { func (x *PaymentInfoAction) Reset() { *x = PaymentInfoAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[144] + mi := &file_binary_proto_def_proto_msgTypes[147] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18686,7 +18972,7 @@ func (x *PaymentInfoAction) String() string { func (*PaymentInfoAction) ProtoMessage() {} func (x *PaymentInfoAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[144] + mi := &file_binary_proto_def_proto_msgTypes[147] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18699,7 +18985,7 @@ func (x *PaymentInfoAction) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentInfoAction.ProtoReflect.Descriptor instead. func (*PaymentInfoAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{144} + return file_binary_proto_def_proto_rawDescGZIP(), []int{147} } func (x *PaymentInfoAction) GetCpi() string { @@ -18720,7 +19006,7 @@ type NuxAction struct { func (x *NuxAction) Reset() { *x = NuxAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[145] + mi := &file_binary_proto_def_proto_msgTypes[148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18733,7 +19019,7 @@ func (x *NuxAction) String() string { func (*NuxAction) ProtoMessage() {} func (x *NuxAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[145] + mi := &file_binary_proto_def_proto_msgTypes[148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18746,7 +19032,7 @@ func (x *NuxAction) ProtoReflect() protoreflect.Message { // Deprecated: Use NuxAction.ProtoReflect.Descriptor instead. func (*NuxAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{145} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148} } func (x *NuxAction) GetAcknowledged() bool { @@ -18769,7 +19055,7 @@ type MuteAction struct { func (x *MuteAction) Reset() { *x = MuteAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[146] + mi := &file_binary_proto_def_proto_msgTypes[149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18782,7 +19068,7 @@ func (x *MuteAction) String() string { func (*MuteAction) ProtoMessage() {} func (x *MuteAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[146] + mi := &file_binary_proto_def_proto_msgTypes[149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18795,7 +19081,7 @@ func (x *MuteAction) ProtoReflect() protoreflect.Message { // Deprecated: Use MuteAction.ProtoReflect.Descriptor instead. func (*MuteAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{146} + return file_binary_proto_def_proto_rawDescGZIP(), []int{149} } func (x *MuteAction) GetMuted() bool { @@ -18830,7 +19116,7 @@ type MarketingMessageBroadcastAction struct { func (x *MarketingMessageBroadcastAction) Reset() { *x = MarketingMessageBroadcastAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[147] + mi := &file_binary_proto_def_proto_msgTypes[150] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18843,7 +19129,7 @@ func (x *MarketingMessageBroadcastAction) String() string { func (*MarketingMessageBroadcastAction) ProtoMessage() {} func (x *MarketingMessageBroadcastAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[147] + mi := &file_binary_proto_def_proto_msgTypes[150] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18856,7 +19142,7 @@ func (x *MarketingMessageBroadcastAction) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketingMessageBroadcastAction.ProtoReflect.Descriptor instead. func (*MarketingMessageBroadcastAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147} + return file_binary_proto_def_proto_rawDescGZIP(), []int{150} } func (x *MarketingMessageBroadcastAction) GetRepliedCount() int32 { @@ -18883,7 +19169,7 @@ type MarketingMessageAction struct { func (x *MarketingMessageAction) Reset() { *x = MarketingMessageAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[148] + mi := &file_binary_proto_def_proto_msgTypes[151] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18896,7 +19182,7 @@ func (x *MarketingMessageAction) String() string { func (*MarketingMessageAction) ProtoMessage() {} func (x *MarketingMessageAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[148] + mi := &file_binary_proto_def_proto_msgTypes[151] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18909,7 +19195,7 @@ func (x *MarketingMessageAction) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketingMessageAction.ProtoReflect.Descriptor instead. func (*MarketingMessageAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{148} + return file_binary_proto_def_proto_rawDescGZIP(), []int{151} } func (x *MarketingMessageAction) GetName() string { @@ -18973,7 +19259,7 @@ type MarkChatAsReadAction struct { func (x *MarkChatAsReadAction) Reset() { *x = MarkChatAsReadAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[149] + mi := &file_binary_proto_def_proto_msgTypes[152] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18986,7 +19272,7 @@ func (x *MarkChatAsReadAction) String() string { func (*MarkChatAsReadAction) ProtoMessage() {} func (x *MarkChatAsReadAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[149] + mi := &file_binary_proto_def_proto_msgTypes[152] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18999,7 +19285,7 @@ func (x *MarkChatAsReadAction) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkChatAsReadAction.ProtoReflect.Descriptor instead. func (*MarkChatAsReadAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{149} + return file_binary_proto_def_proto_rawDescGZIP(), []int{152} } func (x *MarkChatAsReadAction) GetRead() bool { @@ -19027,7 +19313,7 @@ type LocaleSetting struct { func (x *LocaleSetting) Reset() { *x = LocaleSetting{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[150] + mi := &file_binary_proto_def_proto_msgTypes[153] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19040,7 +19326,7 @@ func (x *LocaleSetting) String() string { func (*LocaleSetting) ProtoMessage() {} func (x *LocaleSetting) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[150] + mi := &file_binary_proto_def_proto_msgTypes[153] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19053,7 +19339,7 @@ func (x *LocaleSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use LocaleSetting.ProtoReflect.Descriptor instead. func (*LocaleSetting) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{150} + return file_binary_proto_def_proto_rawDescGZIP(), []int{153} } func (x *LocaleSetting) GetLocale() string { @@ -19074,7 +19360,7 @@ type LabelReorderingAction struct { func (x *LabelReorderingAction) Reset() { *x = LabelReorderingAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[151] + mi := &file_binary_proto_def_proto_msgTypes[154] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19087,7 +19373,7 @@ func (x *LabelReorderingAction) String() string { func (*LabelReorderingAction) ProtoMessage() {} func (x *LabelReorderingAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[151] + mi := &file_binary_proto_def_proto_msgTypes[154] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19100,7 +19386,7 @@ func (x *LabelReorderingAction) ProtoReflect() protoreflect.Message { // Deprecated: Use LabelReorderingAction.ProtoReflect.Descriptor instead. func (*LabelReorderingAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{151} + return file_binary_proto_def_proto_rawDescGZIP(), []int{154} } func (x *LabelReorderingAction) GetSortedLabelIds() []int32 { @@ -19125,7 +19411,7 @@ type LabelEditAction struct { func (x *LabelEditAction) Reset() { *x = LabelEditAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[152] + mi := &file_binary_proto_def_proto_msgTypes[155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19138,7 +19424,7 @@ func (x *LabelEditAction) String() string { func (*LabelEditAction) ProtoMessage() {} func (x *LabelEditAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[152] + mi := &file_binary_proto_def_proto_msgTypes[155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19151,7 +19437,7 @@ func (x *LabelEditAction) ProtoReflect() protoreflect.Message { // Deprecated: Use LabelEditAction.ProtoReflect.Descriptor instead. func (*LabelEditAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{152} + return file_binary_proto_def_proto_rawDescGZIP(), []int{155} } func (x *LabelEditAction) GetName() string { @@ -19200,7 +19486,7 @@ type LabelAssociationAction struct { func (x *LabelAssociationAction) Reset() { *x = LabelAssociationAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[153] + mi := &file_binary_proto_def_proto_msgTypes[156] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19213,7 +19499,7 @@ func (x *LabelAssociationAction) String() string { func (*LabelAssociationAction) ProtoMessage() {} func (x *LabelAssociationAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[153] + mi := &file_binary_proto_def_proto_msgTypes[156] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19226,7 +19512,7 @@ func (x *LabelAssociationAction) ProtoReflect() protoreflect.Message { // Deprecated: Use LabelAssociationAction.ProtoReflect.Descriptor instead. func (*LabelAssociationAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{153} + return file_binary_proto_def_proto_rawDescGZIP(), []int{156} } func (x *LabelAssociationAction) GetLabeled() bool { @@ -19247,7 +19533,7 @@ type KeyExpiration struct { func (x *KeyExpiration) Reset() { *x = KeyExpiration{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[154] + mi := &file_binary_proto_def_proto_msgTypes[157] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19260,7 +19546,7 @@ func (x *KeyExpiration) String() string { func (*KeyExpiration) ProtoMessage() {} func (x *KeyExpiration) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[154] + mi := &file_binary_proto_def_proto_msgTypes[157] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19273,7 +19559,7 @@ func (x *KeyExpiration) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyExpiration.ProtoReflect.Descriptor instead. func (*KeyExpiration) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{154} + return file_binary_proto_def_proto_rawDescGZIP(), []int{157} } func (x *KeyExpiration) GetExpiredKeyEpoch() int32 { @@ -19294,7 +19580,7 @@ type ExternalWebBetaAction struct { func (x *ExternalWebBetaAction) Reset() { *x = ExternalWebBetaAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[155] + mi := &file_binary_proto_def_proto_msgTypes[158] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19307,7 +19593,7 @@ func (x *ExternalWebBetaAction) String() string { func (*ExternalWebBetaAction) ProtoMessage() {} func (x *ExternalWebBetaAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[155] + mi := &file_binary_proto_def_proto_msgTypes[158] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19320,7 +19606,7 @@ func (x *ExternalWebBetaAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalWebBetaAction.ProtoReflect.Descriptor instead. func (*ExternalWebBetaAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{155} + return file_binary_proto_def_proto_rawDescGZIP(), []int{158} } func (x *ExternalWebBetaAction) GetIsOptIn() bool { @@ -19342,7 +19628,7 @@ type DeleteMessageForMeAction struct { func (x *DeleteMessageForMeAction) Reset() { *x = DeleteMessageForMeAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[156] + mi := &file_binary_proto_def_proto_msgTypes[159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19355,7 +19641,7 @@ func (x *DeleteMessageForMeAction) String() string { func (*DeleteMessageForMeAction) ProtoMessage() {} func (x *DeleteMessageForMeAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[156] + mi := &file_binary_proto_def_proto_msgTypes[159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19368,7 +19654,7 @@ func (x *DeleteMessageForMeAction) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMessageForMeAction.ProtoReflect.Descriptor instead. func (*DeleteMessageForMeAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{156} + return file_binary_proto_def_proto_rawDescGZIP(), []int{159} } func (x *DeleteMessageForMeAction) GetDeleteMedia() bool { @@ -19397,7 +19683,7 @@ type DeleteIndividualCallLogAction struct { func (x *DeleteIndividualCallLogAction) Reset() { *x = DeleteIndividualCallLogAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[157] + mi := &file_binary_proto_def_proto_msgTypes[160] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19410,7 +19696,7 @@ func (x *DeleteIndividualCallLogAction) String() string { func (*DeleteIndividualCallLogAction) ProtoMessage() {} func (x *DeleteIndividualCallLogAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[157] + mi := &file_binary_proto_def_proto_msgTypes[160] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19423,7 +19709,7 @@ func (x *DeleteIndividualCallLogAction) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteIndividualCallLogAction.ProtoReflect.Descriptor instead. func (*DeleteIndividualCallLogAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{157} + return file_binary_proto_def_proto_rawDescGZIP(), []int{160} } func (x *DeleteIndividualCallLogAction) GetPeerJid() string { @@ -19451,7 +19737,7 @@ type DeleteChatAction struct { func (x *DeleteChatAction) Reset() { *x = DeleteChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[158] + mi := &file_binary_proto_def_proto_msgTypes[161] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19464,7 +19750,7 @@ func (x *DeleteChatAction) String() string { func (*DeleteChatAction) ProtoMessage() {} func (x *DeleteChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[158] + mi := &file_binary_proto_def_proto_msgTypes[161] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19477,7 +19763,7 @@ func (x *DeleteChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteChatAction.ProtoReflect.Descriptor instead. func (*DeleteChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{158} + return file_binary_proto_def_proto_rawDescGZIP(), []int{161} } func (x *DeleteChatAction) GetMessageRange() *SyncActionMessageRange { @@ -19487,6 +19773,179 @@ func (x *DeleteChatAction) GetMessageRange() *SyncActionMessageRange { return nil } +type CustomPaymentMethodsAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CustomPaymentMethods []*CustomPaymentMethod `protobuf:"bytes,1,rep,name=customPaymentMethods" json:"customPaymentMethods,omitempty"` +} + +func (x *CustomPaymentMethodsAction) Reset() { + *x = CustomPaymentMethodsAction{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomPaymentMethodsAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomPaymentMethodsAction) ProtoMessage() {} + +func (x *CustomPaymentMethodsAction) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[162] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomPaymentMethodsAction.ProtoReflect.Descriptor instead. +func (*CustomPaymentMethodsAction) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{162} +} + +func (x *CustomPaymentMethodsAction) GetCustomPaymentMethods() []*CustomPaymentMethod { + if x != nil { + return x.CustomPaymentMethods + } + return nil +} + +type CustomPaymentMethod struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CredentialId *string `protobuf:"bytes,1,req,name=credentialId" json:"credentialId,omitempty"` + Country *string `protobuf:"bytes,2,req,name=country" json:"country,omitempty"` + Type *string `protobuf:"bytes,3,req,name=type" json:"type,omitempty"` + Metadata []*CustomPaymentMethodMetadata `protobuf:"bytes,4,rep,name=metadata" json:"metadata,omitempty"` +} + +func (x *CustomPaymentMethod) Reset() { + *x = CustomPaymentMethod{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomPaymentMethod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomPaymentMethod) ProtoMessage() {} + +func (x *CustomPaymentMethod) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[163] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomPaymentMethod.ProtoReflect.Descriptor instead. +func (*CustomPaymentMethod) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{163} +} + +func (x *CustomPaymentMethod) GetCredentialId() string { + if x != nil && x.CredentialId != nil { + return *x.CredentialId + } + return "" +} + +func (x *CustomPaymentMethod) GetCountry() string { + if x != nil && x.Country != nil { + return *x.Country + } + return "" +} + +func (x *CustomPaymentMethod) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +func (x *CustomPaymentMethod) GetMetadata() []*CustomPaymentMethodMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +type CustomPaymentMethodMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` +} + +func (x *CustomPaymentMethodMetadata) Reset() { + *x = CustomPaymentMethodMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomPaymentMethodMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomPaymentMethodMetadata) ProtoMessage() {} + +func (x *CustomPaymentMethodMetadata) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[164] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomPaymentMethodMetadata.ProtoReflect.Descriptor instead. +func (*CustomPaymentMethodMetadata) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{164} +} + +func (x *CustomPaymentMethodMetadata) GetKey() string { + if x != nil && x.Key != nil { + return *x.Key + } + return "" +} + +func (x *CustomPaymentMethodMetadata) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + type ContactAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -19501,7 +19960,7 @@ type ContactAction struct { func (x *ContactAction) Reset() { *x = ContactAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[159] + mi := &file_binary_proto_def_proto_msgTypes[165] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19514,7 +19973,7 @@ func (x *ContactAction) String() string { func (*ContactAction) ProtoMessage() {} func (x *ContactAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[159] + mi := &file_binary_proto_def_proto_msgTypes[165] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19527,7 +19986,7 @@ func (x *ContactAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactAction.ProtoReflect.Descriptor instead. func (*ContactAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{159} + return file_binary_proto_def_proto_rawDescGZIP(), []int{165} } func (x *ContactAction) GetFullName() string { @@ -19569,7 +20028,7 @@ type ClearChatAction struct { func (x *ClearChatAction) Reset() { *x = ClearChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[160] + mi := &file_binary_proto_def_proto_msgTypes[166] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19582,7 +20041,7 @@ func (x *ClearChatAction) String() string { func (*ClearChatAction) ProtoMessage() {} func (x *ClearChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[160] + mi := &file_binary_proto_def_proto_msgTypes[166] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19595,7 +20054,7 @@ func (x *ClearChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearChatAction.ProtoReflect.Descriptor instead. func (*ClearChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{160} + return file_binary_proto_def_proto_rawDescGZIP(), []int{166} } func (x *ClearChatAction) GetMessageRange() *SyncActionMessageRange { @@ -19616,7 +20075,7 @@ type ChatAssignmentOpenedStatusAction struct { func (x *ChatAssignmentOpenedStatusAction) Reset() { *x = ChatAssignmentOpenedStatusAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[161] + mi := &file_binary_proto_def_proto_msgTypes[167] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19629,7 +20088,7 @@ func (x *ChatAssignmentOpenedStatusAction) String() string { func (*ChatAssignmentOpenedStatusAction) ProtoMessage() {} func (x *ChatAssignmentOpenedStatusAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[161] + mi := &file_binary_proto_def_proto_msgTypes[167] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19642,7 +20101,7 @@ func (x *ChatAssignmentOpenedStatusAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatAssignmentOpenedStatusAction.ProtoReflect.Descriptor instead. func (*ChatAssignmentOpenedStatusAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{161} + return file_binary_proto_def_proto_rawDescGZIP(), []int{167} } func (x *ChatAssignmentOpenedStatusAction) GetChatOpened() bool { @@ -19663,7 +20122,7 @@ type ChatAssignmentAction struct { func (x *ChatAssignmentAction) Reset() { *x = ChatAssignmentAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[162] + mi := &file_binary_proto_def_proto_msgTypes[168] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19676,7 +20135,7 @@ func (x *ChatAssignmentAction) String() string { func (*ChatAssignmentAction) ProtoMessage() {} func (x *ChatAssignmentAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[162] + mi := &file_binary_proto_def_proto_msgTypes[168] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19689,7 +20148,7 @@ func (x *ChatAssignmentAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatAssignmentAction.ProtoReflect.Descriptor instead. func (*ChatAssignmentAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{162} + return file_binary_proto_def_proto_rawDescGZIP(), []int{168} } func (x *ChatAssignmentAction) GetDeviceAgentID() string { @@ -19710,7 +20169,7 @@ type CallLogAction struct { func (x *CallLogAction) Reset() { *x = CallLogAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[163] + mi := &file_binary_proto_def_proto_msgTypes[169] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19723,7 +20182,7 @@ func (x *CallLogAction) String() string { func (*CallLogAction) ProtoMessage() {} func (x *CallLogAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[163] + mi := &file_binary_proto_def_proto_msgTypes[169] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19736,7 +20195,7 @@ func (x *CallLogAction) ProtoReflect() protoreflect.Message { // Deprecated: Use CallLogAction.ProtoReflect.Descriptor instead. func (*CallLogAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{163} + return file_binary_proto_def_proto_rawDescGZIP(), []int{169} } func (x *CallLogAction) GetCallLogRecord() *CallLogRecord { @@ -19757,7 +20216,7 @@ type BotWelcomeRequestAction struct { func (x *BotWelcomeRequestAction) Reset() { *x = BotWelcomeRequestAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[164] + mi := &file_binary_proto_def_proto_msgTypes[170] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19770,7 +20229,7 @@ func (x *BotWelcomeRequestAction) String() string { func (*BotWelcomeRequestAction) ProtoMessage() {} func (x *BotWelcomeRequestAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[164] + mi := &file_binary_proto_def_proto_msgTypes[170] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19783,7 +20242,7 @@ func (x *BotWelcomeRequestAction) ProtoReflect() protoreflect.Message { // Deprecated: Use BotWelcomeRequestAction.ProtoReflect.Descriptor instead. func (*BotWelcomeRequestAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{164} + return file_binary_proto_def_proto_rawDescGZIP(), []int{170} } func (x *BotWelcomeRequestAction) GetIsSent() bool { @@ -19805,7 +20264,7 @@ type ArchiveChatAction struct { func (x *ArchiveChatAction) Reset() { *x = ArchiveChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[165] + mi := &file_binary_proto_def_proto_msgTypes[171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19818,7 +20277,7 @@ func (x *ArchiveChatAction) String() string { func (*ArchiveChatAction) ProtoMessage() {} func (x *ArchiveChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[165] + mi := &file_binary_proto_def_proto_msgTypes[171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19831,7 +20290,7 @@ func (x *ArchiveChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ArchiveChatAction.ProtoReflect.Descriptor instead. func (*ArchiveChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{165} + return file_binary_proto_def_proto_rawDescGZIP(), []int{171} } func (x *ArchiveChatAction) GetArchived() bool { @@ -19859,7 +20318,7 @@ type AndroidUnsupportedActions struct { func (x *AndroidUnsupportedActions) Reset() { *x = AndroidUnsupportedActions{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[166] + mi := &file_binary_proto_def_proto_msgTypes[172] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19872,7 +20331,7 @@ func (x *AndroidUnsupportedActions) String() string { func (*AndroidUnsupportedActions) ProtoMessage() {} func (x *AndroidUnsupportedActions) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[166] + mi := &file_binary_proto_def_proto_msgTypes[172] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19885,7 +20344,7 @@ func (x *AndroidUnsupportedActions) ProtoReflect() protoreflect.Message { // Deprecated: Use AndroidUnsupportedActions.ProtoReflect.Descriptor instead. func (*AndroidUnsupportedActions) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{166} + return file_binary_proto_def_proto_rawDescGZIP(), []int{172} } func (x *AndroidUnsupportedActions) GetAllowed() bool { @@ -19908,7 +20367,7 @@ type AgentAction struct { func (x *AgentAction) Reset() { *x = AgentAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[167] + mi := &file_binary_proto_def_proto_msgTypes[173] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19921,7 +20380,7 @@ func (x *AgentAction) String() string { func (*AgentAction) ProtoMessage() {} func (x *AgentAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[167] + mi := &file_binary_proto_def_proto_msgTypes[173] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19934,7 +20393,7 @@ func (x *AgentAction) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentAction.ProtoReflect.Descriptor instead. func (*AgentAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{167} + return file_binary_proto_def_proto_rawDescGZIP(), []int{173} } func (x *AgentAction) GetName() string { @@ -19972,7 +20431,7 @@ type SyncActionData struct { func (x *SyncActionData) Reset() { *x = SyncActionData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[168] + mi := &file_binary_proto_def_proto_msgTypes[174] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19985,7 +20444,7 @@ func (x *SyncActionData) String() string { func (*SyncActionData) ProtoMessage() {} func (x *SyncActionData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[168] + mi := &file_binary_proto_def_proto_msgTypes[174] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19998,7 +20457,7 @@ func (x *SyncActionData) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncActionData.ProtoReflect.Descriptor instead. func (*SyncActionData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{168} + return file_binary_proto_def_proto_rawDescGZIP(), []int{174} } func (x *SyncActionData) GetIndex() []byte { @@ -20041,7 +20500,7 @@ type RecentEmojiWeight struct { func (x *RecentEmojiWeight) Reset() { *x = RecentEmojiWeight{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[169] + mi := &file_binary_proto_def_proto_msgTypes[175] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20054,7 +20513,7 @@ func (x *RecentEmojiWeight) String() string { func (*RecentEmojiWeight) ProtoMessage() {} func (x *RecentEmojiWeight) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[169] + mi := &file_binary_proto_def_proto_msgTypes[175] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20067,7 +20526,7 @@ func (x *RecentEmojiWeight) ProtoReflect() protoreflect.Message { // Deprecated: Use RecentEmojiWeight.ProtoReflect.Descriptor instead. func (*RecentEmojiWeight) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{169} + return file_binary_proto_def_proto_rawDescGZIP(), []int{175} } func (x *RecentEmojiWeight) GetEmoji() string { @@ -20105,7 +20564,7 @@ type PatchDebugData struct { func (x *PatchDebugData) Reset() { *x = PatchDebugData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[170] + mi := &file_binary_proto_def_proto_msgTypes[176] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20118,7 +20577,7 @@ func (x *PatchDebugData) String() string { func (*PatchDebugData) ProtoMessage() {} func (x *PatchDebugData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[170] + mi := &file_binary_proto_def_proto_msgTypes[176] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20131,7 +20590,7 @@ func (x *PatchDebugData) ProtoReflect() protoreflect.Message { // Deprecated: Use PatchDebugData.ProtoReflect.Descriptor instead. func (*PatchDebugData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{170} + return file_binary_proto_def_proto_rawDescGZIP(), []int{176} } func (x *PatchDebugData) GetCurrentLthash() []byte { @@ -20236,7 +20695,7 @@ type CallLogRecord struct { func (x *CallLogRecord) Reset() { *x = CallLogRecord{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[171] + mi := &file_binary_proto_def_proto_msgTypes[177] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20249,7 +20708,7 @@ func (x *CallLogRecord) String() string { func (*CallLogRecord) ProtoMessage() {} func (x *CallLogRecord) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[171] + mi := &file_binary_proto_def_proto_msgTypes[177] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20262,7 +20721,7 @@ func (x *CallLogRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use CallLogRecord.ProtoReflect.Descriptor instead. func (*CallLogRecord) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{171} + return file_binary_proto_def_proto_rawDescGZIP(), []int{177} } func (x *CallLogRecord) GetCallResult() CallLogRecord_CallResult { @@ -20383,7 +20842,7 @@ type VerifiedNameCertificate struct { func (x *VerifiedNameCertificate) Reset() { *x = VerifiedNameCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[172] + mi := &file_binary_proto_def_proto_msgTypes[178] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20396,7 +20855,7 @@ func (x *VerifiedNameCertificate) String() string { func (*VerifiedNameCertificate) ProtoMessage() {} func (x *VerifiedNameCertificate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[172] + mi := &file_binary_proto_def_proto_msgTypes[178] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20409,7 +20868,7 @@ func (x *VerifiedNameCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifiedNameCertificate.ProtoReflect.Descriptor instead. func (*VerifiedNameCertificate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{172} + return file_binary_proto_def_proto_rawDescGZIP(), []int{178} } func (x *VerifiedNameCertificate) GetDetails() []byte { @@ -20446,7 +20905,7 @@ type LocalizedName struct { func (x *LocalizedName) Reset() { *x = LocalizedName{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[173] + mi := &file_binary_proto_def_proto_msgTypes[179] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20459,7 +20918,7 @@ func (x *LocalizedName) String() string { func (*LocalizedName) ProtoMessage() {} func (x *LocalizedName) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[173] + mi := &file_binary_proto_def_proto_msgTypes[179] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20472,7 +20931,7 @@ func (x *LocalizedName) ProtoReflect() protoreflect.Message { // Deprecated: Use LocalizedName.ProtoReflect.Descriptor instead. func (*LocalizedName) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{173} + return file_binary_proto_def_proto_rawDescGZIP(), []int{179} } func (x *LocalizedName) GetLg() string { @@ -20514,7 +20973,7 @@ type BizIdentityInfo struct { func (x *BizIdentityInfo) Reset() { *x = BizIdentityInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[174] + mi := &file_binary_proto_def_proto_msgTypes[180] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20527,7 +20986,7 @@ func (x *BizIdentityInfo) String() string { func (*BizIdentityInfo) ProtoMessage() {} func (x *BizIdentityInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[174] + mi := &file_binary_proto_def_proto_msgTypes[180] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20540,7 +20999,7 @@ func (x *BizIdentityInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BizIdentityInfo.ProtoReflect.Descriptor instead. func (*BizIdentityInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{174} + return file_binary_proto_def_proto_rawDescGZIP(), []int{180} } func (x *BizIdentityInfo) GetVlevel() BizIdentityInfo_VerifiedLevelValue { @@ -20611,7 +21070,7 @@ type BizAccountPayload struct { func (x *BizAccountPayload) Reset() { *x = BizAccountPayload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[175] + mi := &file_binary_proto_def_proto_msgTypes[181] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20624,7 +21083,7 @@ func (x *BizAccountPayload) String() string { func (*BizAccountPayload) ProtoMessage() {} func (x *BizAccountPayload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[175] + mi := &file_binary_proto_def_proto_msgTypes[181] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20637,7 +21096,7 @@ func (x *BizAccountPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use BizAccountPayload.ProtoReflect.Descriptor instead. func (*BizAccountPayload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{175} + return file_binary_proto_def_proto_rawDescGZIP(), []int{181} } func (x *BizAccountPayload) GetVnameCert() *VerifiedNameCertificate { @@ -20669,7 +21128,7 @@ type BizAccountLinkInfo struct { func (x *BizAccountLinkInfo) Reset() { *x = BizAccountLinkInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[176] + mi := &file_binary_proto_def_proto_msgTypes[182] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20682,7 +21141,7 @@ func (x *BizAccountLinkInfo) String() string { func (*BizAccountLinkInfo) ProtoMessage() {} func (x *BizAccountLinkInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[176] + mi := &file_binary_proto_def_proto_msgTypes[182] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20695,7 +21154,7 @@ func (x *BizAccountLinkInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BizAccountLinkInfo.ProtoReflect.Descriptor instead. func (*BizAccountLinkInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{176} + return file_binary_proto_def_proto_rawDescGZIP(), []int{182} } func (x *BizAccountLinkInfo) GetWhatsappBizAcctFbid() uint64 { @@ -20746,7 +21205,7 @@ type HandshakeMessage struct { func (x *HandshakeMessage) Reset() { *x = HandshakeMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[177] + mi := &file_binary_proto_def_proto_msgTypes[183] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20759,7 +21218,7 @@ func (x *HandshakeMessage) String() string { func (*HandshakeMessage) ProtoMessage() {} func (x *HandshakeMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[177] + mi := &file_binary_proto_def_proto_msgTypes[183] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20772,7 +21231,7 @@ func (x *HandshakeMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeMessage.ProtoReflect.Descriptor instead. func (*HandshakeMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{177} + return file_binary_proto_def_proto_rawDescGZIP(), []int{183} } func (x *HandshakeMessage) GetClientHello() *HandshakeClientHello { @@ -20809,7 +21268,7 @@ type HandshakeServerHello struct { func (x *HandshakeServerHello) Reset() { *x = HandshakeServerHello{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[178] + mi := &file_binary_proto_def_proto_msgTypes[184] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20822,7 +21281,7 @@ func (x *HandshakeServerHello) String() string { func (*HandshakeServerHello) ProtoMessage() {} func (x *HandshakeServerHello) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[178] + mi := &file_binary_proto_def_proto_msgTypes[184] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20835,7 +21294,7 @@ func (x *HandshakeServerHello) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeServerHello.ProtoReflect.Descriptor instead. func (*HandshakeServerHello) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{178} + return file_binary_proto_def_proto_rawDescGZIP(), []int{184} } func (x *HandshakeServerHello) GetEphemeral() []byte { @@ -20872,7 +21331,7 @@ type HandshakeClientHello struct { func (x *HandshakeClientHello) Reset() { *x = HandshakeClientHello{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[179] + mi := &file_binary_proto_def_proto_msgTypes[185] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20885,7 +21344,7 @@ func (x *HandshakeClientHello) String() string { func (*HandshakeClientHello) ProtoMessage() {} func (x *HandshakeClientHello) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[179] + mi := &file_binary_proto_def_proto_msgTypes[185] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20898,7 +21357,7 @@ func (x *HandshakeClientHello) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeClientHello.ProtoReflect.Descriptor instead. func (*HandshakeClientHello) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{179} + return file_binary_proto_def_proto_rawDescGZIP(), []int{185} } func (x *HandshakeClientHello) GetEphemeral() []byte { @@ -20934,7 +21393,7 @@ type HandshakeClientFinish struct { func (x *HandshakeClientFinish) Reset() { *x = HandshakeClientFinish{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[180] + mi := &file_binary_proto_def_proto_msgTypes[186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20947,7 +21406,7 @@ func (x *HandshakeClientFinish) String() string { func (*HandshakeClientFinish) ProtoMessage() {} func (x *HandshakeClientFinish) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[180] + mi := &file_binary_proto_def_proto_msgTypes[186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20960,7 +21419,7 @@ func (x *HandshakeClientFinish) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeClientFinish.ProtoReflect.Descriptor instead. func (*HandshakeClientFinish) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{180} + return file_binary_proto_def_proto_rawDescGZIP(), []int{186} } func (x *HandshakeClientFinish) GetStatic() []byte { @@ -21014,7 +21473,7 @@ type ClientPayload struct { func (x *ClientPayload) Reset() { *x = ClientPayload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[181] + mi := &file_binary_proto_def_proto_msgTypes[187] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21027,7 +21486,7 @@ func (x *ClientPayload) String() string { func (*ClientPayload) ProtoMessage() {} func (x *ClientPayload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[181] + mi := &file_binary_proto_def_proto_msgTypes[187] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21040,7 +21499,7 @@ func (x *ClientPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload.ProtoReflect.Descriptor instead. func (*ClientPayload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187} } func (x *ClientPayload) GetUsername() uint64 { @@ -21246,7 +21705,7 @@ type WebNotificationsInfo struct { func (x *WebNotificationsInfo) Reset() { *x = WebNotificationsInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[182] + mi := &file_binary_proto_def_proto_msgTypes[188] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21259,7 +21718,7 @@ func (x *WebNotificationsInfo) String() string { func (*WebNotificationsInfo) ProtoMessage() {} func (x *WebNotificationsInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[182] + mi := &file_binary_proto_def_proto_msgTypes[188] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21272,7 +21731,7 @@ func (x *WebNotificationsInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WebNotificationsInfo.ProtoReflect.Descriptor instead. func (*WebNotificationsInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{182} + return file_binary_proto_def_proto_rawDescGZIP(), []int{188} } func (x *WebNotificationsInfo) GetTimestamp() uint64 { @@ -21365,7 +21824,7 @@ type WebMessageInfo struct { func (x *WebMessageInfo) Reset() { *x = WebMessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[183] + mi := &file_binary_proto_def_proto_msgTypes[189] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21378,7 +21837,7 @@ func (x *WebMessageInfo) String() string { func (*WebMessageInfo) ProtoMessage() {} func (x *WebMessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[183] + mi := &file_binary_proto_def_proto_msgTypes[189] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21391,7 +21850,7 @@ func (x *WebMessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WebMessageInfo.ProtoReflect.Descriptor instead. func (*WebMessageInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{183} + return file_binary_proto_def_proto_rawDescGZIP(), []int{189} } func (x *WebMessageInfo) GetKey() *MessageKey { @@ -21813,7 +22272,7 @@ type WebFeatures struct { func (x *WebFeatures) Reset() { *x = WebFeatures{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[184] + mi := &file_binary_proto_def_proto_msgTypes[190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21826,7 +22285,7 @@ func (x *WebFeatures) String() string { func (*WebFeatures) ProtoMessage() {} func (x *WebFeatures) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[184] + mi := &file_binary_proto_def_proto_msgTypes[190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21839,7 +22298,7 @@ func (x *WebFeatures) ProtoReflect() protoreflect.Message { // Deprecated: Use WebFeatures.ProtoReflect.Descriptor instead. func (*WebFeatures) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{184} + return file_binary_proto_def_proto_rawDescGZIP(), []int{190} } func (x *WebFeatures) GetLabelsDisplay() WebFeatures_Flag { @@ -22173,7 +22632,7 @@ type UserReceipt struct { func (x *UserReceipt) Reset() { *x = UserReceipt{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[185] + mi := &file_binary_proto_def_proto_msgTypes[191] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22186,7 +22645,7 @@ func (x *UserReceipt) String() string { func (*UserReceipt) ProtoMessage() {} func (x *UserReceipt) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[185] + mi := &file_binary_proto_def_proto_msgTypes[191] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22199,7 +22658,7 @@ func (x *UserReceipt) ProtoReflect() protoreflect.Message { // Deprecated: Use UserReceipt.ProtoReflect.Descriptor instead. func (*UserReceipt) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{185} + return file_binary_proto_def_proto_rawDescGZIP(), []int{191} } func (x *UserReceipt) GetUserJid() string { @@ -22256,7 +22715,7 @@ type StatusPSA struct { func (x *StatusPSA) Reset() { *x = StatusPSA{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[186] + mi := &file_binary_proto_def_proto_msgTypes[192] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22269,7 +22728,7 @@ func (x *StatusPSA) String() string { func (*StatusPSA) ProtoMessage() {} func (x *StatusPSA) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[186] + mi := &file_binary_proto_def_proto_msgTypes[192] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22282,7 +22741,7 @@ func (x *StatusPSA) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusPSA.ProtoReflect.Descriptor instead. func (*StatusPSA) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{186} + return file_binary_proto_def_proto_rawDescGZIP(), []int{192} } func (x *StatusPSA) GetCampaignId() uint64 { @@ -22310,7 +22769,7 @@ type ReportingTokenInfo struct { func (x *ReportingTokenInfo) Reset() { *x = ReportingTokenInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[187] + mi := &file_binary_proto_def_proto_msgTypes[193] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22323,7 +22782,7 @@ func (x *ReportingTokenInfo) String() string { func (*ReportingTokenInfo) ProtoMessage() {} func (x *ReportingTokenInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[187] + mi := &file_binary_proto_def_proto_msgTypes[193] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22336,7 +22795,7 @@ func (x *ReportingTokenInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ReportingTokenInfo.ProtoReflect.Descriptor instead. func (*ReportingTokenInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{187} + return file_binary_proto_def_proto_rawDescGZIP(), []int{193} } func (x *ReportingTokenInfo) GetReportingTag() []byte { @@ -22361,7 +22820,7 @@ type Reaction struct { func (x *Reaction) Reset() { *x = Reaction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[188] + mi := &file_binary_proto_def_proto_msgTypes[194] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22374,7 +22833,7 @@ func (x *Reaction) String() string { func (*Reaction) ProtoMessage() {} func (x *Reaction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[188] + mi := &file_binary_proto_def_proto_msgTypes[194] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22387,7 +22846,7 @@ func (x *Reaction) ProtoReflect() protoreflect.Message { // Deprecated: Use Reaction.ProtoReflect.Descriptor instead. func (*Reaction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{188} + return file_binary_proto_def_proto_rawDescGZIP(), []int{194} } func (x *Reaction) GetKey() *MessageKey { @@ -22436,7 +22895,7 @@ type PremiumMessageInfo struct { func (x *PremiumMessageInfo) Reset() { *x = PremiumMessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[189] + mi := &file_binary_proto_def_proto_msgTypes[195] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22449,7 +22908,7 @@ func (x *PremiumMessageInfo) String() string { func (*PremiumMessageInfo) ProtoMessage() {} func (x *PremiumMessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[189] + mi := &file_binary_proto_def_proto_msgTypes[195] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22462,7 +22921,7 @@ func (x *PremiumMessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PremiumMessageInfo.ProtoReflect.Descriptor instead. func (*PremiumMessageInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{189} + return file_binary_proto_def_proto_rawDescGZIP(), []int{195} } func (x *PremiumMessageInfo) GetServerCampaignId() string { @@ -22487,7 +22946,7 @@ type PollUpdate struct { func (x *PollUpdate) Reset() { *x = PollUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[190] + mi := &file_binary_proto_def_proto_msgTypes[196] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22500,7 +22959,7 @@ func (x *PollUpdate) String() string { func (*PollUpdate) ProtoMessage() {} func (x *PollUpdate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[190] + mi := &file_binary_proto_def_proto_msgTypes[196] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22513,7 +22972,7 @@ func (x *PollUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use PollUpdate.ProtoReflect.Descriptor instead. func (*PollUpdate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{190} + return file_binary_proto_def_proto_rawDescGZIP(), []int{196} } func (x *PollUpdate) GetPollUpdateMessageKey() *MessageKey { @@ -22562,7 +23021,7 @@ type PollAdditionalMetadata struct { func (x *PollAdditionalMetadata) Reset() { *x = PollAdditionalMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[191] + mi := &file_binary_proto_def_proto_msgTypes[197] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22575,7 +23034,7 @@ func (x *PollAdditionalMetadata) String() string { func (*PollAdditionalMetadata) ProtoMessage() {} func (x *PollAdditionalMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[191] + mi := &file_binary_proto_def_proto_msgTypes[197] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22588,7 +23047,7 @@ func (x *PollAdditionalMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use PollAdditionalMetadata.ProtoReflect.Descriptor instead. func (*PollAdditionalMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{191} + return file_binary_proto_def_proto_rawDescGZIP(), []int{197} } func (x *PollAdditionalMetadata) GetPollInvalidated() bool { @@ -22613,7 +23072,7 @@ type PinInChat struct { func (x *PinInChat) Reset() { *x = PinInChat{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[192] + mi := &file_binary_proto_def_proto_msgTypes[198] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22626,7 +23085,7 @@ func (x *PinInChat) String() string { func (*PinInChat) ProtoMessage() {} func (x *PinInChat) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[192] + mi := &file_binary_proto_def_proto_msgTypes[198] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22639,7 +23098,7 @@ func (x *PinInChat) ProtoReflect() protoreflect.Message { // Deprecated: Use PinInChat.ProtoReflect.Descriptor instead. func (*PinInChat) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{192} + return file_binary_proto_def_proto_rawDescGZIP(), []int{198} } func (x *PinInChat) GetType() PinInChat_Type { @@ -22690,7 +23149,7 @@ type PhotoChange struct { func (x *PhotoChange) Reset() { *x = PhotoChange{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[193] + mi := &file_binary_proto_def_proto_msgTypes[199] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22703,7 +23162,7 @@ func (x *PhotoChange) String() string { func (*PhotoChange) ProtoMessage() {} func (x *PhotoChange) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[193] + mi := &file_binary_proto_def_proto_msgTypes[199] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22716,7 +23175,7 @@ func (x *PhotoChange) ProtoReflect() protoreflect.Message { // Deprecated: Use PhotoChange.ProtoReflect.Descriptor instead. func (*PhotoChange) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{193} + return file_binary_proto_def_proto_rawDescGZIP(), []int{199} } func (x *PhotoChange) GetOldPhoto() []byte { @@ -22763,7 +23222,7 @@ type PaymentInfo struct { func (x *PaymentInfo) Reset() { *x = PaymentInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[194] + mi := &file_binary_proto_def_proto_msgTypes[200] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22776,7 +23235,7 @@ func (x *PaymentInfo) String() string { func (*PaymentInfo) ProtoMessage() {} func (x *PaymentInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[194] + mi := &file_binary_proto_def_proto_msgTypes[200] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22789,7 +23248,7 @@ func (x *PaymentInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentInfo.ProtoReflect.Descriptor instead. func (*PaymentInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{194} + return file_binary_proto_def_proto_rawDescGZIP(), []int{200} } func (x *PaymentInfo) GetCurrencyDeprecated() PaymentInfo_Currency { @@ -22897,7 +23356,7 @@ type NotificationMessageInfo struct { func (x *NotificationMessageInfo) Reset() { *x = NotificationMessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[195] + mi := &file_binary_proto_def_proto_msgTypes[201] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22910,7 +23369,7 @@ func (x *NotificationMessageInfo) String() string { func (*NotificationMessageInfo) ProtoMessage() {} func (x *NotificationMessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[195] + mi := &file_binary_proto_def_proto_msgTypes[201] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22923,7 +23382,7 @@ func (x *NotificationMessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationMessageInfo.ProtoReflect.Descriptor instead. func (*NotificationMessageInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{195} + return file_binary_proto_def_proto_rawDescGZIP(), []int{201} } func (x *NotificationMessageInfo) GetKey() *MessageKey { @@ -22965,7 +23424,7 @@ type MessageAddOnContextInfo struct { func (x *MessageAddOnContextInfo) Reset() { *x = MessageAddOnContextInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[196] + mi := &file_binary_proto_def_proto_msgTypes[202] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22978,7 +23437,7 @@ func (x *MessageAddOnContextInfo) String() string { func (*MessageAddOnContextInfo) ProtoMessage() {} func (x *MessageAddOnContextInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[196] + mi := &file_binary_proto_def_proto_msgTypes[202] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22991,7 +23450,7 @@ func (x *MessageAddOnContextInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageAddOnContextInfo.ProtoReflect.Descriptor instead. func (*MessageAddOnContextInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{196} + return file_binary_proto_def_proto_rawDescGZIP(), []int{202} } func (x *MessageAddOnContextInfo) GetMessageAddOnDurationInSecs() uint32 { @@ -23012,7 +23471,7 @@ type MediaData struct { func (x *MediaData) Reset() { *x = MediaData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[197] + mi := &file_binary_proto_def_proto_msgTypes[203] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23025,7 +23484,7 @@ func (x *MediaData) String() string { func (*MediaData) ProtoMessage() {} func (x *MediaData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[197] + mi := &file_binary_proto_def_proto_msgTypes[203] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23038,7 +23497,7 @@ func (x *MediaData) ProtoReflect() protoreflect.Message { // Deprecated: Use MediaData.ProtoReflect.Descriptor instead. func (*MediaData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{197} + return file_binary_proto_def_proto_rawDescGZIP(), []int{203} } func (x *MediaData) GetLocalPath() string { @@ -23064,7 +23523,7 @@ type KeepInChat struct { func (x *KeepInChat) Reset() { *x = KeepInChat{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[198] + mi := &file_binary_proto_def_proto_msgTypes[204] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23077,7 +23536,7 @@ func (x *KeepInChat) String() string { func (*KeepInChat) ProtoMessage() {} func (x *KeepInChat) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[198] + mi := &file_binary_proto_def_proto_msgTypes[204] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23090,7 +23549,7 @@ func (x *KeepInChat) ProtoReflect() protoreflect.Message { // Deprecated: Use KeepInChat.ProtoReflect.Descriptor instead. func (*KeepInChat) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{198} + return file_binary_proto_def_proto_rawDescGZIP(), []int{204} } func (x *KeepInChat) GetKeepType() KeepType { @@ -23149,7 +23608,7 @@ type EventResponse struct { func (x *EventResponse) Reset() { *x = EventResponse{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[199] + mi := &file_binary_proto_def_proto_msgTypes[205] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23162,7 +23621,7 @@ func (x *EventResponse) String() string { func (*EventResponse) ProtoMessage() {} func (x *EventResponse) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[199] + mi := &file_binary_proto_def_proto_msgTypes[205] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23175,7 +23634,7 @@ func (x *EventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EventResponse.ProtoReflect.Descriptor instead. func (*EventResponse) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{199} + return file_binary_proto_def_proto_rawDescGZIP(), []int{205} } func (x *EventResponse) GetEventResponseMessageKey() *MessageKey { @@ -23218,7 +23677,7 @@ type CommentMetadata struct { func (x *CommentMetadata) Reset() { *x = CommentMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[200] + mi := &file_binary_proto_def_proto_msgTypes[206] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23231,7 +23690,7 @@ func (x *CommentMetadata) String() string { func (*CommentMetadata) ProtoMessage() {} func (x *CommentMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[200] + mi := &file_binary_proto_def_proto_msgTypes[206] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23244,7 +23703,7 @@ func (x *CommentMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentMetadata.ProtoReflect.Descriptor instead. func (*CommentMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{200} + return file_binary_proto_def_proto_rawDescGZIP(), []int{206} } func (x *CommentMetadata) GetCommentParentKey() *MessageKey { @@ -23273,7 +23732,7 @@ type NoiseCertificate struct { func (x *NoiseCertificate) Reset() { *x = NoiseCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[201] + mi := &file_binary_proto_def_proto_msgTypes[207] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23286,7 +23745,7 @@ func (x *NoiseCertificate) String() string { func (*NoiseCertificate) ProtoMessage() {} func (x *NoiseCertificate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[201] + mi := &file_binary_proto_def_proto_msgTypes[207] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23299,7 +23758,7 @@ func (x *NoiseCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use NoiseCertificate.ProtoReflect.Descriptor instead. func (*NoiseCertificate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{201} + return file_binary_proto_def_proto_rawDescGZIP(), []int{207} } func (x *NoiseCertificate) GetDetails() []byte { @@ -23328,7 +23787,7 @@ type CertChain struct { func (x *CertChain) Reset() { *x = CertChain{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[202] + mi := &file_binary_proto_def_proto_msgTypes[208] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23341,7 +23800,7 @@ func (x *CertChain) String() string { func (*CertChain) ProtoMessage() {} func (x *CertChain) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[202] + mi := &file_binary_proto_def_proto_msgTypes[208] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23354,7 +23813,7 @@ func (x *CertChain) ProtoReflect() protoreflect.Message { // Deprecated: Use CertChain.ProtoReflect.Descriptor instead. func (*CertChain) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{202} + return file_binary_proto_def_proto_rawDescGZIP(), []int{208} } func (x *CertChain) GetLeaf() *CertChain_NoiseCertificate { @@ -23380,7 +23839,7 @@ type QP struct { func (x *QP) Reset() { *x = QP{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[203] + mi := &file_binary_proto_def_proto_msgTypes[209] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23393,7 +23852,7 @@ func (x *QP) String() string { func (*QP) ProtoMessage() {} func (x *QP) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[203] + mi := &file_binary_proto_def_proto_msgTypes[209] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23406,7 +23865,7 @@ func (x *QP) ProtoReflect() protoreflect.Message { // Deprecated: Use QP.ProtoReflect.Descriptor instead. func (*QP) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209} } type DeviceProps_HistorySyncConfig struct { @@ -23427,7 +23886,7 @@ type DeviceProps_HistorySyncConfig struct { func (x *DeviceProps_HistorySyncConfig) Reset() { *x = DeviceProps_HistorySyncConfig{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[204] + mi := &file_binary_proto_def_proto_msgTypes[210] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23440,7 +23899,7 @@ func (x *DeviceProps_HistorySyncConfig) String() string { func (*DeviceProps_HistorySyncConfig) ProtoMessage() {} func (x *DeviceProps_HistorySyncConfig) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[204] + mi := &file_binary_proto_def_proto_msgTypes[210] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23527,7 +23986,7 @@ type DeviceProps_AppVersion struct { func (x *DeviceProps_AppVersion) Reset() { *x = DeviceProps_AppVersion{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[205] + mi := &file_binary_proto_def_proto_msgTypes[211] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23540,7 +23999,7 @@ func (x *DeviceProps_AppVersion) String() string { func (*DeviceProps_AppVersion) ProtoMessage() {} func (x *DeviceProps_AppVersion) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[205] + mi := &file_binary_proto_def_proto_msgTypes[211] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23591,546 +24050,6 @@ func (x *DeviceProps_AppVersion) GetQuinary() uint32 { return 0 } -type InteractiveMessage_ShopMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Surface *InteractiveMessage_ShopMessage_Surface `protobuf:"varint,2,opt,name=surface,enum=proto.InteractiveMessage_ShopMessage_Surface" json:"surface,omitempty"` - MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"` -} - -func (x *InteractiveMessage_ShopMessage) Reset() { - *x = InteractiveMessage_ShopMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_ShopMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_ShopMessage) ProtoMessage() {} - -func (x *InteractiveMessage_ShopMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[206] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_ShopMessage.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_ShopMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *InteractiveMessage_ShopMessage) GetId() string { - if x != nil && x.Id != nil { - return *x.Id - } - return "" -} - -func (x *InteractiveMessage_ShopMessage) GetSurface() InteractiveMessage_ShopMessage_Surface { - if x != nil && x.Surface != nil { - return *x.Surface - } - return InteractiveMessage_ShopMessage_UNKNOWN_SURFACE -} - -func (x *InteractiveMessage_ShopMessage) GetMessageVersion() int32 { - if x != nil && x.MessageVersion != nil { - return *x.MessageVersion - } - return 0 -} - -type InteractiveMessage_NativeFlowMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Buttons []*InteractiveMessage_NativeFlowMessage_NativeFlowButton `protobuf:"bytes,1,rep,name=buttons" json:"buttons,omitempty"` - MessageParamsJson *string `protobuf:"bytes,2,opt,name=messageParamsJson" json:"messageParamsJson,omitempty"` - MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"` -} - -func (x *InteractiveMessage_NativeFlowMessage) Reset() { - *x = InteractiveMessage_NativeFlowMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_NativeFlowMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_NativeFlowMessage) ProtoMessage() {} - -func (x *InteractiveMessage_NativeFlowMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[207] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_NativeFlowMessage.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_NativeFlowMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *InteractiveMessage_NativeFlowMessage) GetButtons() []*InteractiveMessage_NativeFlowMessage_NativeFlowButton { - if x != nil { - return x.Buttons - } - return nil -} - -func (x *InteractiveMessage_NativeFlowMessage) GetMessageParamsJson() string { - if x != nil && x.MessageParamsJson != nil { - return *x.MessageParamsJson - } - return "" -} - -func (x *InteractiveMessage_NativeFlowMessage) GetMessageVersion() int32 { - if x != nil && x.MessageVersion != nil { - return *x.MessageVersion - } - return 0 -} - -type InteractiveMessage_Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` - Subtitle *string `protobuf:"bytes,2,opt,name=subtitle" json:"subtitle,omitempty"` - HasMediaAttachment *bool `protobuf:"varint,5,opt,name=hasMediaAttachment" json:"hasMediaAttachment,omitempty"` - // Types that are assignable to Media: - // - // *InteractiveMessage_Header_DocumentMessage - // *InteractiveMessage_Header_ImageMessage - // *InteractiveMessage_Header_JpegThumbnail - // *InteractiveMessage_Header_VideoMessage - // *InteractiveMessage_Header_LocationMessage - Media isInteractiveMessage_Header_Media `protobuf_oneof:"media"` -} - -func (x *InteractiveMessage_Header) Reset() { - *x = InteractiveMessage_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[208] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_Header) ProtoMessage() {} - -func (x *InteractiveMessage_Header) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[208] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_Header.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_Header) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 2} -} - -func (x *InteractiveMessage_Header) GetTitle() string { - if x != nil && x.Title != nil { - return *x.Title - } - return "" -} - -func (x *InteractiveMessage_Header) GetSubtitle() string { - if x != nil && x.Subtitle != nil { - return *x.Subtitle - } - return "" -} - -func (x *InteractiveMessage_Header) GetHasMediaAttachment() bool { - if x != nil && x.HasMediaAttachment != nil { - return *x.HasMediaAttachment - } - return false -} - -func (m *InteractiveMessage_Header) GetMedia() isInteractiveMessage_Header_Media { - if m != nil { - return m.Media - } - return nil -} - -func (x *InteractiveMessage_Header) GetDocumentMessage() *DocumentMessage { - if x, ok := x.GetMedia().(*InteractiveMessage_Header_DocumentMessage); ok { - return x.DocumentMessage - } - return nil -} - -func (x *InteractiveMessage_Header) GetImageMessage() *ImageMessage { - if x, ok := x.GetMedia().(*InteractiveMessage_Header_ImageMessage); ok { - return x.ImageMessage - } - return nil -} - -func (x *InteractiveMessage_Header) GetJpegThumbnail() []byte { - if x, ok := x.GetMedia().(*InteractiveMessage_Header_JpegThumbnail); ok { - return x.JpegThumbnail - } - return nil -} - -func (x *InteractiveMessage_Header) GetVideoMessage() *VideoMessage { - if x, ok := x.GetMedia().(*InteractiveMessage_Header_VideoMessage); ok { - return x.VideoMessage - } - return nil -} - -func (x *InteractiveMessage_Header) GetLocationMessage() *LocationMessage { - if x, ok := x.GetMedia().(*InteractiveMessage_Header_LocationMessage); ok { - return x.LocationMessage - } - return nil -} - -type isInteractiveMessage_Header_Media interface { - isInteractiveMessage_Header_Media() -} - -type InteractiveMessage_Header_DocumentMessage struct { - DocumentMessage *DocumentMessage `protobuf:"bytes,3,opt,name=documentMessage,oneof"` -} - -type InteractiveMessage_Header_ImageMessage struct { - ImageMessage *ImageMessage `protobuf:"bytes,4,opt,name=imageMessage,oneof"` -} - -type InteractiveMessage_Header_JpegThumbnail struct { - JpegThumbnail []byte `protobuf:"bytes,6,opt,name=jpegThumbnail,oneof"` -} - -type InteractiveMessage_Header_VideoMessage struct { - VideoMessage *VideoMessage `protobuf:"bytes,7,opt,name=videoMessage,oneof"` -} - -type InteractiveMessage_Header_LocationMessage struct { - LocationMessage *LocationMessage `protobuf:"bytes,8,opt,name=locationMessage,oneof"` -} - -func (*InteractiveMessage_Header_DocumentMessage) isInteractiveMessage_Header_Media() {} - -func (*InteractiveMessage_Header_ImageMessage) isInteractiveMessage_Header_Media() {} - -func (*InteractiveMessage_Header_JpegThumbnail) isInteractiveMessage_Header_Media() {} - -func (*InteractiveMessage_Header_VideoMessage) isInteractiveMessage_Header_Media() {} - -func (*InteractiveMessage_Header_LocationMessage) isInteractiveMessage_Header_Media() {} - -type InteractiveMessage_Footer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"` -} - -func (x *InteractiveMessage_Footer) Reset() { - *x = InteractiveMessage_Footer{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[209] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_Footer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_Footer) ProtoMessage() {} - -func (x *InteractiveMessage_Footer) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[209] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_Footer.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_Footer) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 3} -} - -func (x *InteractiveMessage_Footer) GetText() string { - if x != nil && x.Text != nil { - return *x.Text - } - return "" -} - -type InteractiveMessage_CollectionMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BizJid *string `protobuf:"bytes,1,opt,name=bizJid" json:"bizJid,omitempty"` - Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"` -} - -func (x *InteractiveMessage_CollectionMessage) Reset() { - *x = InteractiveMessage_CollectionMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[210] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_CollectionMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_CollectionMessage) ProtoMessage() {} - -func (x *InteractiveMessage_CollectionMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[210] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_CollectionMessage.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_CollectionMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 4} -} - -func (x *InteractiveMessage_CollectionMessage) GetBizJid() string { - if x != nil && x.BizJid != nil { - return *x.BizJid - } - return "" -} - -func (x *InteractiveMessage_CollectionMessage) GetId() string { - if x != nil && x.Id != nil { - return *x.Id - } - return "" -} - -func (x *InteractiveMessage_CollectionMessage) GetMessageVersion() int32 { - if x != nil && x.MessageVersion != nil { - return *x.MessageVersion - } - return 0 -} - -type InteractiveMessage_CarouselMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cards []*InteractiveMessage `protobuf:"bytes,1,rep,name=cards" json:"cards,omitempty"` - MessageVersion *int32 `protobuf:"varint,2,opt,name=messageVersion" json:"messageVersion,omitempty"` -} - -func (x *InteractiveMessage_CarouselMessage) Reset() { - *x = InteractiveMessage_CarouselMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_CarouselMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_CarouselMessage) ProtoMessage() {} - -func (x *InteractiveMessage_CarouselMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[211] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_CarouselMessage.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_CarouselMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 5} -} - -func (x *InteractiveMessage_CarouselMessage) GetCards() []*InteractiveMessage { - if x != nil { - return x.Cards - } - return nil -} - -func (x *InteractiveMessage_CarouselMessage) GetMessageVersion() int32 { - if x != nil && x.MessageVersion != nil { - return *x.MessageVersion - } - return 0 -} - -type InteractiveMessage_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"` -} - -func (x *InteractiveMessage_Body) Reset() { - *x = InteractiveMessage_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_Body) ProtoMessage() {} - -func (x *InteractiveMessage_Body) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[212] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_Body.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_Body) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 6} -} - -func (x *InteractiveMessage_Body) GetText() string { - if x != nil && x.Text != nil { - return *x.Text - } - return "" -} - -type InteractiveMessage_NativeFlowMessage_NativeFlowButton struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - ButtonParamsJson *string `protobuf:"bytes,2,opt,name=buttonParamsJson" json:"buttonParamsJson,omitempty"` -} - -func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) Reset() { - *x = InteractiveMessage_NativeFlowMessage_NativeFlowButton{} - if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InteractiveMessage_NativeFlowMessage_NativeFlowButton) ProtoMessage() {} - -func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[213] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InteractiveMessage_NativeFlowMessage_NativeFlowButton.ProtoReflect.Descriptor instead. -func (*InteractiveMessage_NativeFlowMessage_NativeFlowButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 1, 0} -} - -func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) GetButtonParamsJson() string { - if x != nil && x.ButtonParamsJson != nil { - return *x.ButtonParamsJson - } - return "" -} - type HighlyStructuredMessage_HSMLocalizableParameter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -24147,7 +24066,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter struct { func (x *HighlyStructuredMessage_HSMLocalizableParameter) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[214] + mi := &file_binary_proto_def_proto_msgTypes[212] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24160,7 +24079,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter) String() string { func (*HighlyStructuredMessage_HSMLocalizableParameter) ProtoMessage() {} func (x *HighlyStructuredMessage_HSMLocalizableParameter) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[214] + mi := &file_binary_proto_def_proto_msgTypes[212] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24173,7 +24092,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter) ProtoReflect() protore // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter.ProtoReflect.Descriptor instead. func (*HighlyStructuredMessage_HSMLocalizableParameter) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0} } func (x *HighlyStructuredMessage_HSMLocalizableParameter) GetDefault() string { @@ -24237,7 +24156,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime struct { func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[215] + mi := &file_binary_proto_def_proto_msgTypes[213] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24250,7 +24169,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) String() s func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) ProtoMessage() {} func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[215] + mi := &file_binary_proto_def_proto_msgTypes[213] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24263,7 +24182,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) ProtoRefle // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime.ProtoReflect.Descriptor instead. func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0, 0} } func (m *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) GetDatetimeOneof() isHighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_DatetimeOneof { @@ -24317,7 +24236,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency struct { func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[216] + mi := &file_binary_proto_def_proto_msgTypes[214] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24330,7 +24249,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) String() s func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) ProtoMessage() {} func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[216] + mi := &file_binary_proto_def_proto_msgTypes[214] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24343,7 +24262,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) ProtoRefle // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency.ProtoReflect.Descriptor instead. func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0, 1} } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) GetCurrencyCode() string { @@ -24371,7 +24290,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnix func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[217] + mi := &file_binary_proto_def_proto_msgTypes[215] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24385,7 +24304,7 @@ func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUn } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[217] + mi := &file_binary_proto_def_proto_msgTypes[215] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24398,7 +24317,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTime // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch.ProtoReflect.Descriptor instead. func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0, 0, 0} } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch) GetTimestamp() int64 { @@ -24425,7 +24344,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComp func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[218] + mi := &file_binary_proto_def_proto_msgTypes[216] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24439,7 +24358,7 @@ func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeCo } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[218] + mi := &file_binary_proto_def_proto_msgTypes[216] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24452,7 +24371,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTime // Deprecated: Use HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent.ProtoReflect.Descriptor instead. func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{10, 0, 0, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{9, 0, 0, 1} } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent) GetDayOfWeek() HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType { @@ -24516,7 +24435,7 @@ type CallLogMessage_CallParticipant struct { func (x *CallLogMessage_CallParticipant) Reset() { *x = CallLogMessage_CallParticipant{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[219] + mi := &file_binary_proto_def_proto_msgTypes[217] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24529,7 +24448,7 @@ func (x *CallLogMessage_CallParticipant) String() string { func (*CallLogMessage_CallParticipant) ProtoMessage() {} func (x *CallLogMessage_CallParticipant) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[219] + mi := &file_binary_proto_def_proto_msgTypes[217] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24573,7 +24492,7 @@ type ButtonsMessage_Button struct { func (x *ButtonsMessage_Button) Reset() { *x = ButtonsMessage_Button{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[220] + mi := &file_binary_proto_def_proto_msgTypes[218] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24586,7 +24505,7 @@ func (x *ButtonsMessage_Button) String() string { func (*ButtonsMessage_Button) ProtoMessage() {} func (x *ButtonsMessage_Button) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[220] + mi := &file_binary_proto_def_proto_msgTypes[218] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24642,7 +24561,7 @@ type ButtonsMessage_Button_NativeFlowInfo struct { func (x *ButtonsMessage_Button_NativeFlowInfo) Reset() { *x = ButtonsMessage_Button_NativeFlowInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[221] + mi := &file_binary_proto_def_proto_msgTypes[219] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24655,7 +24574,7 @@ func (x *ButtonsMessage_Button_NativeFlowInfo) String() string { func (*ButtonsMessage_Button_NativeFlowInfo) ProtoMessage() {} func (x *ButtonsMessage_Button_NativeFlowInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[221] + mi := &file_binary_proto_def_proto_msgTypes[219] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24696,7 +24615,7 @@ type ButtonsMessage_Button_ButtonText struct { func (x *ButtonsMessage_Button_ButtonText) Reset() { *x = ButtonsMessage_Button_ButtonText{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[222] + mi := &file_binary_proto_def_proto_msgTypes[220] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24709,7 +24628,7 @@ func (x *ButtonsMessage_Button_ButtonText) String() string { func (*ButtonsMessage_Button_ButtonText) ProtoMessage() {} func (x *ButtonsMessage_Button_ButtonText) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[222] + mi := &file_binary_proto_def_proto_msgTypes[220] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24746,7 +24665,7 @@ type HydratedTemplateButton_HydratedURLButton struct { func (x *HydratedTemplateButton_HydratedURLButton) Reset() { *x = HydratedTemplateButton_HydratedURLButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[223] + mi := &file_binary_proto_def_proto_msgTypes[221] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24759,7 +24678,7 @@ func (x *HydratedTemplateButton_HydratedURLButton) String() string { func (*HydratedTemplateButton_HydratedURLButton) ProtoMessage() {} func (x *HydratedTemplateButton_HydratedURLButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[223] + mi := &file_binary_proto_def_proto_msgTypes[221] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24772,7 +24691,7 @@ func (x *HydratedTemplateButton_HydratedURLButton) ProtoReflect() protoreflect.M // Deprecated: Use HydratedTemplateButton_HydratedURLButton.ProtoReflect.Descriptor instead. func (*HydratedTemplateButton_HydratedURLButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{43, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{44, 0} } func (x *HydratedTemplateButton_HydratedURLButton) GetDisplayText() string { @@ -24815,7 +24734,7 @@ type HydratedTemplateButton_HydratedQuickReplyButton struct { func (x *HydratedTemplateButton_HydratedQuickReplyButton) Reset() { *x = HydratedTemplateButton_HydratedQuickReplyButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[224] + mi := &file_binary_proto_def_proto_msgTypes[222] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24828,7 +24747,7 @@ func (x *HydratedTemplateButton_HydratedQuickReplyButton) String() string { func (*HydratedTemplateButton_HydratedQuickReplyButton) ProtoMessage() {} func (x *HydratedTemplateButton_HydratedQuickReplyButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[224] + mi := &file_binary_proto_def_proto_msgTypes[222] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24841,7 +24760,7 @@ func (x *HydratedTemplateButton_HydratedQuickReplyButton) ProtoReflect() protore // Deprecated: Use HydratedTemplateButton_HydratedQuickReplyButton.ProtoReflect.Descriptor instead. func (*HydratedTemplateButton_HydratedQuickReplyButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{43, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{44, 1} } func (x *HydratedTemplateButton_HydratedQuickReplyButton) GetDisplayText() string { @@ -24870,7 +24789,7 @@ type HydratedTemplateButton_HydratedCallButton struct { func (x *HydratedTemplateButton_HydratedCallButton) Reset() { *x = HydratedTemplateButton_HydratedCallButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[225] + mi := &file_binary_proto_def_proto_msgTypes[223] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24883,7 +24802,7 @@ func (x *HydratedTemplateButton_HydratedCallButton) String() string { func (*HydratedTemplateButton_HydratedCallButton) ProtoMessage() {} func (x *HydratedTemplateButton_HydratedCallButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[225] + mi := &file_binary_proto_def_proto_msgTypes[223] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24896,7 +24815,7 @@ func (x *HydratedTemplateButton_HydratedCallButton) ProtoReflect() protoreflect. // Deprecated: Use HydratedTemplateButton_HydratedCallButton.ProtoReflect.Descriptor instead. func (*HydratedTemplateButton_HydratedCallButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{43, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{44, 2} } func (x *HydratedTemplateButton_HydratedCallButton) GetDisplayText() string { @@ -24925,7 +24844,7 @@ type ContextInfo_UTMInfo struct { func (x *ContextInfo_UTMInfo) Reset() { *x = ContextInfo_UTMInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[226] + mi := &file_binary_proto_def_proto_msgTypes[224] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -24938,7 +24857,7 @@ func (x *ContextInfo_UTMInfo) String() string { func (*ContextInfo_UTMInfo) ProtoMessage() {} func (x *ContextInfo_UTMInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[226] + mi := &file_binary_proto_def_proto_msgTypes[224] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24951,7 +24870,7 @@ func (x *ContextInfo_UTMInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextInfo_UTMInfo.ProtoReflect.Descriptor instead. func (*ContextInfo_UTMInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 0} } func (x *ContextInfo_UTMInfo) GetUtmSource() string { @@ -24992,7 +24911,7 @@ type ContextInfo_ExternalAdReplyInfo struct { func (x *ContextInfo_ExternalAdReplyInfo) Reset() { *x = ContextInfo_ExternalAdReplyInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[227] + mi := &file_binary_proto_def_proto_msgTypes[225] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25005,7 +24924,7 @@ func (x *ContextInfo_ExternalAdReplyInfo) String() string { func (*ContextInfo_ExternalAdReplyInfo) ProtoMessage() {} func (x *ContextInfo_ExternalAdReplyInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[227] + mi := &file_binary_proto_def_proto_msgTypes[225] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25018,7 +24937,7 @@ func (x *ContextInfo_ExternalAdReplyInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextInfo_ExternalAdReplyInfo.ProtoReflect.Descriptor instead. func (*ContextInfo_ExternalAdReplyInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 1} } func (x *ContextInfo_ExternalAdReplyInfo) GetTitle() string { @@ -25130,7 +25049,7 @@ type ContextInfo_DataSharingContext struct { func (x *ContextInfo_DataSharingContext) Reset() { *x = ContextInfo_DataSharingContext{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[228] + mi := &file_binary_proto_def_proto_msgTypes[226] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25143,7 +25062,7 @@ func (x *ContextInfo_DataSharingContext) String() string { func (*ContextInfo_DataSharingContext) ProtoMessage() {} func (x *ContextInfo_DataSharingContext) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[228] + mi := &file_binary_proto_def_proto_msgTypes[226] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25156,7 +25075,7 @@ func (x *ContextInfo_DataSharingContext) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextInfo_DataSharingContext.ProtoReflect.Descriptor instead. func (*ContextInfo_DataSharingContext) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 2} } func (x *ContextInfo_DataSharingContext) GetShowMmDisclosure() bool { @@ -25177,7 +25096,7 @@ type ContextInfo_BusinessMessageForwardInfo struct { func (x *ContextInfo_BusinessMessageForwardInfo) Reset() { *x = ContextInfo_BusinessMessageForwardInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[229] + mi := &file_binary_proto_def_proto_msgTypes[227] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25190,7 +25109,7 @@ func (x *ContextInfo_BusinessMessageForwardInfo) String() string { func (*ContextInfo_BusinessMessageForwardInfo) ProtoMessage() {} func (x *ContextInfo_BusinessMessageForwardInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[229] + mi := &file_binary_proto_def_proto_msgTypes[227] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25203,7 +25122,7 @@ func (x *ContextInfo_BusinessMessageForwardInfo) ProtoReflect() protoreflect.Mes // Deprecated: Use ContextInfo_BusinessMessageForwardInfo.ProtoReflect.Descriptor instead. func (*ContextInfo_BusinessMessageForwardInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 3} } func (x *ContextInfo_BusinessMessageForwardInfo) GetBusinessOwnerJid() string { @@ -25227,7 +25146,7 @@ type ContextInfo_AdReplyInfo struct { func (x *ContextInfo_AdReplyInfo) Reset() { *x = ContextInfo_AdReplyInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[230] + mi := &file_binary_proto_def_proto_msgTypes[228] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25240,7 +25159,7 @@ func (x *ContextInfo_AdReplyInfo) String() string { func (*ContextInfo_AdReplyInfo) ProtoMessage() {} func (x *ContextInfo_AdReplyInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[230] + mi := &file_binary_proto_def_proto_msgTypes[228] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25253,7 +25172,7 @@ func (x *ContextInfo_AdReplyInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextInfo_AdReplyInfo.ProtoReflect.Descriptor instead. func (*ContextInfo_AdReplyInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{47, 4} + return file_binary_proto_def_proto_rawDescGZIP(), []int{48, 4} } func (x *ContextInfo_AdReplyInfo) GetAdvertiserName() string { @@ -25296,7 +25215,7 @@ type TemplateButton_URLButton struct { func (x *TemplateButton_URLButton) Reset() { *x = TemplateButton_URLButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[231] + mi := &file_binary_proto_def_proto_msgTypes[229] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25309,7 +25228,7 @@ func (x *TemplateButton_URLButton) String() string { func (*TemplateButton_URLButton) ProtoMessage() {} func (x *TemplateButton_URLButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[231] + mi := &file_binary_proto_def_proto_msgTypes[229] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25322,7 +25241,7 @@ func (x *TemplateButton_URLButton) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateButton_URLButton.ProtoReflect.Descriptor instead. func (*TemplateButton_URLButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{54, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{55, 0} } func (x *TemplateButton_URLButton) GetDisplayText() *HighlyStructuredMessage { @@ -25351,7 +25270,7 @@ type TemplateButton_QuickReplyButton struct { func (x *TemplateButton_QuickReplyButton) Reset() { *x = TemplateButton_QuickReplyButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[232] + mi := &file_binary_proto_def_proto_msgTypes[230] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25364,7 +25283,7 @@ func (x *TemplateButton_QuickReplyButton) String() string { func (*TemplateButton_QuickReplyButton) ProtoMessage() {} func (x *TemplateButton_QuickReplyButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[232] + mi := &file_binary_proto_def_proto_msgTypes[230] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25377,7 +25296,7 @@ func (x *TemplateButton_QuickReplyButton) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateButton_QuickReplyButton.ProtoReflect.Descriptor instead. func (*TemplateButton_QuickReplyButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{54, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{55, 1} } func (x *TemplateButton_QuickReplyButton) GetDisplayText() *HighlyStructuredMessage { @@ -25406,7 +25325,7 @@ type TemplateButton_CallButton struct { func (x *TemplateButton_CallButton) Reset() { *x = TemplateButton_CallButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[233] + mi := &file_binary_proto_def_proto_msgTypes[231] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25419,7 +25338,7 @@ func (x *TemplateButton_CallButton) String() string { func (*TemplateButton_CallButton) ProtoMessage() {} func (x *TemplateButton_CallButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[233] + mi := &file_binary_proto_def_proto_msgTypes[231] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25432,7 +25351,7 @@ func (x *TemplateButton_CallButton) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateButton_CallButton.ProtoReflect.Descriptor instead. func (*TemplateButton_CallButton) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{54, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{55, 2} } func (x *TemplateButton_CallButton) GetDisplayText() *HighlyStructuredMessage { @@ -25464,7 +25383,7 @@ type PaymentBackground_MediaData struct { func (x *PaymentBackground_MediaData) Reset() { *x = PaymentBackground_MediaData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[234] + mi := &file_binary_proto_def_proto_msgTypes[232] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25477,7 +25396,7 @@ func (x *PaymentBackground_MediaData) String() string { func (*PaymentBackground_MediaData) ProtoMessage() {} func (x *PaymentBackground_MediaData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[234] + mi := &file_binary_proto_def_proto_msgTypes[232] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25490,7 +25409,7 @@ func (x *PaymentBackground_MediaData) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentBackground_MediaData.ProtoReflect.Descriptor instead. func (*PaymentBackground_MediaData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{56, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{57, 0} } func (x *PaymentBackground_MediaData) GetMediaKey() []byte { @@ -25537,6 +25456,7 @@ type TemplateMessage_HydratedFourRowTemplate struct { HydratedFooterText *string `protobuf:"bytes,7,opt,name=hydratedFooterText" json:"hydratedFooterText,omitempty"` HydratedButtons []*HydratedTemplateButton `protobuf:"bytes,8,rep,name=hydratedButtons" json:"hydratedButtons,omitempty"` TemplateId *string `protobuf:"bytes,9,opt,name=templateId" json:"templateId,omitempty"` + MaskLinkedDevices *bool `protobuf:"varint,10,opt,name=maskLinkedDevices" json:"maskLinkedDevices,omitempty"` // Types that are assignable to Title: // // *TemplateMessage_HydratedFourRowTemplate_DocumentMessage @@ -25550,7 +25470,7 @@ type TemplateMessage_HydratedFourRowTemplate struct { func (x *TemplateMessage_HydratedFourRowTemplate) Reset() { *x = TemplateMessage_HydratedFourRowTemplate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[235] + mi := &file_binary_proto_def_proto_msgTypes[233] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25563,7 +25483,7 @@ func (x *TemplateMessage_HydratedFourRowTemplate) String() string { func (*TemplateMessage_HydratedFourRowTemplate) ProtoMessage() {} func (x *TemplateMessage_HydratedFourRowTemplate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[235] + mi := &file_binary_proto_def_proto_msgTypes[233] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25576,7 +25496,7 @@ func (x *TemplateMessage_HydratedFourRowTemplate) ProtoReflect() protoreflect.Me // Deprecated: Use TemplateMessage_HydratedFourRowTemplate.ProtoReflect.Descriptor instead. func (*TemplateMessage_HydratedFourRowTemplate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{62, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{63, 0} } func (x *TemplateMessage_HydratedFourRowTemplate) GetHydratedContentText() string { @@ -25607,6 +25527,13 @@ func (x *TemplateMessage_HydratedFourRowTemplate) GetTemplateId() string { return "" } +func (x *TemplateMessage_HydratedFourRowTemplate) GetMaskLinkedDevices() bool { + if x != nil && x.MaskLinkedDevices != nil { + return *x.MaskLinkedDevices + } + return false +} + func (m *TemplateMessage_HydratedFourRowTemplate) GetTitle() isTemplateMessage_HydratedFourRowTemplate_Title { if m != nil { return m.Title @@ -25709,7 +25636,7 @@ type TemplateMessage_FourRowTemplate struct { func (x *TemplateMessage_FourRowTemplate) Reset() { *x = TemplateMessage_FourRowTemplate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[236] + mi := &file_binary_proto_def_proto_msgTypes[234] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25722,7 +25649,7 @@ func (x *TemplateMessage_FourRowTemplate) String() string { func (*TemplateMessage_FourRowTemplate) ProtoMessage() {} func (x *TemplateMessage_FourRowTemplate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[236] + mi := &file_binary_proto_def_proto_msgTypes[234] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25735,7 +25662,7 @@ func (x *TemplateMessage_FourRowTemplate) ProtoReflect() protoreflect.Message { // Deprecated: Use TemplateMessage_FourRowTemplate.ProtoReflect.Descriptor instead. func (*TemplateMessage_FourRowTemplate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{62, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{63, 1} } func (x *TemplateMessage_FourRowTemplate) GetContent() *HighlyStructuredMessage { @@ -25857,7 +25784,7 @@ type ProductMessage_ProductSnapshot struct { func (x *ProductMessage_ProductSnapshot) Reset() { *x = ProductMessage_ProductSnapshot{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[237] + mi := &file_binary_proto_def_proto_msgTypes[235] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25870,7 +25797,7 @@ func (x *ProductMessage_ProductSnapshot) String() string { func (*ProductMessage_ProductSnapshot) ProtoMessage() {} func (x *ProductMessage_ProductSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[237] + mi := &file_binary_proto_def_proto_msgTypes[235] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25883,7 +25810,7 @@ func (x *ProductMessage_ProductSnapshot) ProtoReflect() protoreflect.Message { // Deprecated: Use ProductMessage_ProductSnapshot.ProtoReflect.Descriptor instead. func (*ProductMessage_ProductSnapshot) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{75, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{76, 0} } func (x *ProductMessage_ProductSnapshot) GetProductImage() *ImageMessage { @@ -25976,7 +25903,7 @@ type ProductMessage_CatalogSnapshot struct { func (x *ProductMessage_CatalogSnapshot) Reset() { *x = ProductMessage_CatalogSnapshot{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[238] + mi := &file_binary_proto_def_proto_msgTypes[236] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -25989,7 +25916,7 @@ func (x *ProductMessage_CatalogSnapshot) String() string { func (*ProductMessage_CatalogSnapshot) ProtoMessage() {} func (x *ProductMessage_CatalogSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[238] + mi := &file_binary_proto_def_proto_msgTypes[236] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26002,7 +25929,7 @@ func (x *ProductMessage_CatalogSnapshot) ProtoReflect() protoreflect.Message { // Deprecated: Use ProductMessage_CatalogSnapshot.ProtoReflect.Descriptor instead. func (*ProductMessage_CatalogSnapshot) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{75, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{76, 1} } func (x *ProductMessage_CatalogSnapshot) GetCatalogImage() *ImageMessage { @@ -26037,7 +25964,7 @@ type PollCreationMessage_Option struct { func (x *PollCreationMessage_Option) Reset() { *x = PollCreationMessage_Option{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[239] + mi := &file_binary_proto_def_proto_msgTypes[237] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26050,7 +25977,7 @@ func (x *PollCreationMessage_Option) String() string { func (*PollCreationMessage_Option) ProtoMessage() {} func (x *PollCreationMessage_Option) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[239] + mi := &file_binary_proto_def_proto_msgTypes[237] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26063,7 +25990,7 @@ func (x *PollCreationMessage_Option) ProtoReflect() protoreflect.Message { // Deprecated: Use PollCreationMessage_Option.ProtoReflect.Descriptor instead. func (*PollCreationMessage_Option) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{80, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{81, 0} } func (x *PollCreationMessage_Option) GetOptionName() string { @@ -26087,7 +26014,7 @@ type PeerDataOperationRequestResponseMessage_PeerDataOperationResult struct { func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) Reset() { *x = PeerDataOperationRequestResponseMessage_PeerDataOperationResult{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[240] + mi := &file_binary_proto_def_proto_msgTypes[238] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26100,7 +26027,7 @@ func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) String func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult) ProtoMessage() {} func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[240] + mi := &file_binary_proto_def_proto_msgTypes[238] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26113,7 +26040,7 @@ func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) ProtoR // Deprecated: Use PeerDataOperationRequestResponseMessage_PeerDataOperationResult.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{84, 0} } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) GetMediaUploadResult() MediaRetryNotification_ResultType { @@ -26155,7 +26082,7 @@ type PeerDataOperationRequestResponseMessage_PeerDataOperationResult_Placeholder func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse) Reset() { *x = PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[241] + mi := &file_binary_proto_def_proto_msgTypes[239] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26169,7 +26096,7 @@ func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_Placehold } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[241] + mi := &file_binary_proto_def_proto_msgTypes[239] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26182,7 +26109,7 @@ func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_Placeho // Deprecated: Use PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{84, 0, 0} } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse) GetWebMessageInfoBytes() []byte { @@ -26210,7 +26137,7 @@ type PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreview func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse) Reset() { *x = PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[242] + mi := &file_binary_proto_def_proto_msgTypes[240] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26224,7 +26151,7 @@ func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPrevi } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[242] + mi := &file_binary_proto_def_proto_msgTypes[240] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26237,7 +26164,7 @@ func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPre // Deprecated: Use PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 0, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{84, 0, 1} } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse) GetUrl() string { @@ -26313,7 +26240,7 @@ type PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreview func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail) Reset() { *x = PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[243] + mi := &file_binary_proto_def_proto_msgTypes[241] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26327,7 +26254,7 @@ func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPrevi } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[243] + mi := &file_binary_proto_def_proto_msgTypes[241] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26340,7 +26267,7 @@ func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPre // Deprecated: Use PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 0, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{84, 0, 1, 0} } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail) GetDirectPath() string { @@ -26404,7 +26331,7 @@ type PeerDataOperationRequestMessage_RequestUrlPreview struct { func (x *PeerDataOperationRequestMessage_RequestUrlPreview) Reset() { *x = PeerDataOperationRequestMessage_RequestUrlPreview{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[244] + mi := &file_binary_proto_def_proto_msgTypes[242] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26417,7 +26344,7 @@ func (x *PeerDataOperationRequestMessage_RequestUrlPreview) String() string { func (*PeerDataOperationRequestMessage_RequestUrlPreview) ProtoMessage() {} func (x *PeerDataOperationRequestMessage_RequestUrlPreview) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[244] + mi := &file_binary_proto_def_proto_msgTypes[242] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26430,7 +26357,7 @@ func (x *PeerDataOperationRequestMessage_RequestUrlPreview) ProtoReflect() proto // Deprecated: Use PeerDataOperationRequestMessage_RequestUrlPreview.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestMessage_RequestUrlPreview) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{83, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 0} } func (x *PeerDataOperationRequestMessage_RequestUrlPreview) GetUrl() string { @@ -26458,7 +26385,7 @@ type PeerDataOperationRequestMessage_RequestStickerReupload struct { func (x *PeerDataOperationRequestMessage_RequestStickerReupload) Reset() { *x = PeerDataOperationRequestMessage_RequestStickerReupload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[245] + mi := &file_binary_proto_def_proto_msgTypes[243] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26471,7 +26398,7 @@ func (x *PeerDataOperationRequestMessage_RequestStickerReupload) String() string func (*PeerDataOperationRequestMessage_RequestStickerReupload) ProtoMessage() {} func (x *PeerDataOperationRequestMessage_RequestStickerReupload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[245] + mi := &file_binary_proto_def_proto_msgTypes[243] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26484,7 +26411,7 @@ func (x *PeerDataOperationRequestMessage_RequestStickerReupload) ProtoReflect() // Deprecated: Use PeerDataOperationRequestMessage_RequestStickerReupload.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestMessage_RequestStickerReupload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{83, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 1} } func (x *PeerDataOperationRequestMessage_RequestStickerReupload) GetFileSha256() string { @@ -26505,7 +26432,7 @@ type PeerDataOperationRequestMessage_PlaceholderMessageResendRequest struct { func (x *PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) Reset() { *x = PeerDataOperationRequestMessage_PlaceholderMessageResendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[246] + mi := &file_binary_proto_def_proto_msgTypes[244] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26518,7 +26445,7 @@ func (x *PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) String func (*PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) ProtoMessage() {} func (x *PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[246] + mi := &file_binary_proto_def_proto_msgTypes[244] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26531,7 +26458,7 @@ func (x *PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) ProtoR // Deprecated: Use PeerDataOperationRequestMessage_PlaceholderMessageResendRequest.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{83, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 2} } func (x *PeerDataOperationRequestMessage_PlaceholderMessageResendRequest) GetMessageKey() *MessageKey { @@ -26556,7 +26483,7 @@ type PeerDataOperationRequestMessage_HistorySyncOnDemandRequest struct { func (x *PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) Reset() { *x = PeerDataOperationRequestMessage_HistorySyncOnDemandRequest{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[247] + mi := &file_binary_proto_def_proto_msgTypes[245] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26569,7 +26496,7 @@ func (x *PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) String() st func (*PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) ProtoMessage() {} func (x *PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[247] + mi := &file_binary_proto_def_proto_msgTypes[245] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26582,7 +26509,7 @@ func (x *PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) ProtoReflec // Deprecated: Use PeerDataOperationRequestMessage_HistorySyncOnDemandRequest.ProtoReflect.Descriptor instead. func (*PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{83, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 3} } func (x *PeerDataOperationRequestMessage_HistorySyncOnDemandRequest) GetChatJid() string { @@ -26631,7 +26558,7 @@ type ListResponseMessage_SingleSelectReply struct { func (x *ListResponseMessage_SingleSelectReply) Reset() { *x = ListResponseMessage_SingleSelectReply{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[248] + mi := &file_binary_proto_def_proto_msgTypes[246] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26644,7 +26571,7 @@ func (x *ListResponseMessage_SingleSelectReply) String() string { func (*ListResponseMessage_SingleSelectReply) ProtoMessage() {} func (x *ListResponseMessage_SingleSelectReply) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[248] + mi := &file_binary_proto_def_proto_msgTypes[246] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26657,7 +26584,7 @@ func (x *ListResponseMessage_SingleSelectReply) ProtoReflect() protoreflect.Mess // Deprecated: Use ListResponseMessage_SingleSelectReply.ProtoReflect.Descriptor instead. func (*ListResponseMessage_SingleSelectReply) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{90, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{92, 0} } func (x *ListResponseMessage_SingleSelectReply) GetSelectedRowId() string { @@ -26679,7 +26606,7 @@ type ListMessage_Section struct { func (x *ListMessage_Section) Reset() { *x = ListMessage_Section{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[249] + mi := &file_binary_proto_def_proto_msgTypes[247] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26692,7 +26619,7 @@ func (x *ListMessage_Section) String() string { func (*ListMessage_Section) ProtoMessage() {} func (x *ListMessage_Section) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[249] + mi := &file_binary_proto_def_proto_msgTypes[247] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26705,7 +26632,7 @@ func (x *ListMessage_Section) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMessage_Section.ProtoReflect.Descriptor instead. func (*ListMessage_Section) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 0} } func (x *ListMessage_Section) GetTitle() string { @@ -26735,7 +26662,7 @@ type ListMessage_Row struct { func (x *ListMessage_Row) Reset() { *x = ListMessage_Row{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[250] + mi := &file_binary_proto_def_proto_msgTypes[248] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26748,7 +26675,7 @@ func (x *ListMessage_Row) String() string { func (*ListMessage_Row) ProtoMessage() {} func (x *ListMessage_Row) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[250] + mi := &file_binary_proto_def_proto_msgTypes[248] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26761,7 +26688,7 @@ func (x *ListMessage_Row) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMessage_Row.ProtoReflect.Descriptor instead. func (*ListMessage_Row) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 1} } func (x *ListMessage_Row) GetTitle() string { @@ -26796,7 +26723,7 @@ type ListMessage_Product struct { func (x *ListMessage_Product) Reset() { *x = ListMessage_Product{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[251] + mi := &file_binary_proto_def_proto_msgTypes[249] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26809,7 +26736,7 @@ func (x *ListMessage_Product) String() string { func (*ListMessage_Product) ProtoMessage() {} func (x *ListMessage_Product) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[251] + mi := &file_binary_proto_def_proto_msgTypes[249] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26822,7 +26749,7 @@ func (x *ListMessage_Product) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMessage_Product.ProtoReflect.Descriptor instead. func (*ListMessage_Product) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 2} } func (x *ListMessage_Product) GetProductId() string { @@ -26844,7 +26771,7 @@ type ListMessage_ProductSection struct { func (x *ListMessage_ProductSection) Reset() { *x = ListMessage_ProductSection{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[252] + mi := &file_binary_proto_def_proto_msgTypes[250] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26857,7 +26784,7 @@ func (x *ListMessage_ProductSection) String() string { func (*ListMessage_ProductSection) ProtoMessage() {} func (x *ListMessage_ProductSection) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[252] + mi := &file_binary_proto_def_proto_msgTypes[250] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26870,7 +26797,7 @@ func (x *ListMessage_ProductSection) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMessage_ProductSection.ProtoReflect.Descriptor instead. func (*ListMessage_ProductSection) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 3} } func (x *ListMessage_ProductSection) GetTitle() string { @@ -26900,7 +26827,7 @@ type ListMessage_ProductListInfo struct { func (x *ListMessage_ProductListInfo) Reset() { *x = ListMessage_ProductListInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[253] + mi := &file_binary_proto_def_proto_msgTypes[251] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26913,7 +26840,7 @@ func (x *ListMessage_ProductListInfo) String() string { func (*ListMessage_ProductListInfo) ProtoMessage() {} func (x *ListMessage_ProductListInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[253] + mi := &file_binary_proto_def_proto_msgTypes[251] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26926,7 +26853,7 @@ func (x *ListMessage_ProductListInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMessage_ProductListInfo.ProtoReflect.Descriptor instead. func (*ListMessage_ProductListInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 4} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 4} } func (x *ListMessage_ProductListInfo) GetProductSections() []*ListMessage_ProductSection { @@ -26962,7 +26889,7 @@ type ListMessage_ProductListHeaderImage struct { func (x *ListMessage_ProductListHeaderImage) Reset() { *x = ListMessage_ProductListHeaderImage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[254] + mi := &file_binary_proto_def_proto_msgTypes[252] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -26975,7 +26902,7 @@ func (x *ListMessage_ProductListHeaderImage) String() string { func (*ListMessage_ProductListHeaderImage) ProtoMessage() {} func (x *ListMessage_ProductListHeaderImage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[254] + mi := &file_binary_proto_def_proto_msgTypes[252] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26988,7 +26915,7 @@ func (x *ListMessage_ProductListHeaderImage) ProtoReflect() protoreflect.Message // Deprecated: Use ListMessage_ProductListHeaderImage.ProtoReflect.Descriptor instead. func (*ListMessage_ProductListHeaderImage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{91, 5} + return file_binary_proto_def_proto_rawDescGZIP(), []int{93, 5} } func (x *ListMessage_ProductListHeaderImage) GetProductId() string { @@ -27018,7 +26945,7 @@ type InteractiveResponseMessage_NativeFlowResponseMessage struct { func (x *InteractiveResponseMessage_NativeFlowResponseMessage) Reset() { *x = InteractiveResponseMessage_NativeFlowResponseMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[255] + mi := &file_binary_proto_def_proto_msgTypes[253] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27031,7 +26958,7 @@ func (x *InteractiveResponseMessage_NativeFlowResponseMessage) String() string { func (*InteractiveResponseMessage_NativeFlowResponseMessage) ProtoMessage() {} func (x *InteractiveResponseMessage_NativeFlowResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[255] + mi := &file_binary_proto_def_proto_msgTypes[253] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27044,7 +26971,7 @@ func (x *InteractiveResponseMessage_NativeFlowResponseMessage) ProtoReflect() pr // Deprecated: Use InteractiveResponseMessage_NativeFlowResponseMessage.ProtoReflect.Descriptor instead. func (*InteractiveResponseMessage_NativeFlowResponseMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{94, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{96, 0} } func (x *InteractiveResponseMessage_NativeFlowResponseMessage) GetName() string { @@ -27080,7 +27007,7 @@ type InteractiveResponseMessage_Body struct { func (x *InteractiveResponseMessage_Body) Reset() { *x = InteractiveResponseMessage_Body{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[256] + mi := &file_binary_proto_def_proto_msgTypes[254] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27093,7 +27020,7 @@ func (x *InteractiveResponseMessage_Body) String() string { func (*InteractiveResponseMessage_Body) ProtoMessage() {} func (x *InteractiveResponseMessage_Body) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[256] + mi := &file_binary_proto_def_proto_msgTypes[254] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27106,7 +27033,7 @@ func (x *InteractiveResponseMessage_Body) ProtoReflect() protoreflect.Message { // Deprecated: Use InteractiveResponseMessage_Body.ProtoReflect.Descriptor instead. func (*InteractiveResponseMessage_Body) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{94, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{96, 1} } func (x *InteractiveResponseMessage_Body) GetText() string { @@ -27123,6 +27050,546 @@ func (x *InteractiveResponseMessage_Body) GetFormat() InteractiveResponseMessage return InteractiveResponseMessage_Body_DEFAULT } +type InteractiveMessage_NativeFlowMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Buttons []*InteractiveMessage_NativeFlowMessage_NativeFlowButton `protobuf:"bytes,1,rep,name=buttons" json:"buttons,omitempty"` + MessageParamsJson *string `protobuf:"bytes,2,opt,name=messageParamsJson" json:"messageParamsJson,omitempty"` + MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"` +} + +func (x *InteractiveMessage_NativeFlowMessage) Reset() { + *x = InteractiveMessage_NativeFlowMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[255] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_NativeFlowMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_NativeFlowMessage) ProtoMessage() {} + +func (x *InteractiveMessage_NativeFlowMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[255] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_NativeFlowMessage.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_NativeFlowMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 0} +} + +func (x *InteractiveMessage_NativeFlowMessage) GetButtons() []*InteractiveMessage_NativeFlowMessage_NativeFlowButton { + if x != nil { + return x.Buttons + } + return nil +} + +func (x *InteractiveMessage_NativeFlowMessage) GetMessageParamsJson() string { + if x != nil && x.MessageParamsJson != nil { + return *x.MessageParamsJson + } + return "" +} + +func (x *InteractiveMessage_NativeFlowMessage) GetMessageVersion() int32 { + if x != nil && x.MessageVersion != nil { + return *x.MessageVersion + } + return 0 +} + +type InteractiveMessage_Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` + Subtitle *string `protobuf:"bytes,2,opt,name=subtitle" json:"subtitle,omitempty"` + HasMediaAttachment *bool `protobuf:"varint,5,opt,name=hasMediaAttachment" json:"hasMediaAttachment,omitempty"` + // Types that are assignable to Media: + // + // *InteractiveMessage_Header_DocumentMessage + // *InteractiveMessage_Header_ImageMessage + // *InteractiveMessage_Header_JpegThumbnail + // *InteractiveMessage_Header_VideoMessage + // *InteractiveMessage_Header_LocationMessage + Media isInteractiveMessage_Header_Media `protobuf_oneof:"media"` +} + +func (x *InteractiveMessage_Header) Reset() { + *x = InteractiveMessage_Header{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[256] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_Header) ProtoMessage() {} + +func (x *InteractiveMessage_Header) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[256] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_Header.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_Header) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 1} +} + +func (x *InteractiveMessage_Header) GetTitle() string { + if x != nil && x.Title != nil { + return *x.Title + } + return "" +} + +func (x *InteractiveMessage_Header) GetSubtitle() string { + if x != nil && x.Subtitle != nil { + return *x.Subtitle + } + return "" +} + +func (x *InteractiveMessage_Header) GetHasMediaAttachment() bool { + if x != nil && x.HasMediaAttachment != nil { + return *x.HasMediaAttachment + } + return false +} + +func (m *InteractiveMessage_Header) GetMedia() isInteractiveMessage_Header_Media { + if m != nil { + return m.Media + } + return nil +} + +func (x *InteractiveMessage_Header) GetDocumentMessage() *DocumentMessage { + if x, ok := x.GetMedia().(*InteractiveMessage_Header_DocumentMessage); ok { + return x.DocumentMessage + } + return nil +} + +func (x *InteractiveMessage_Header) GetImageMessage() *ImageMessage { + if x, ok := x.GetMedia().(*InteractiveMessage_Header_ImageMessage); ok { + return x.ImageMessage + } + return nil +} + +func (x *InteractiveMessage_Header) GetJpegThumbnail() []byte { + if x, ok := x.GetMedia().(*InteractiveMessage_Header_JpegThumbnail); ok { + return x.JpegThumbnail + } + return nil +} + +func (x *InteractiveMessage_Header) GetVideoMessage() *VideoMessage { + if x, ok := x.GetMedia().(*InteractiveMessage_Header_VideoMessage); ok { + return x.VideoMessage + } + return nil +} + +func (x *InteractiveMessage_Header) GetLocationMessage() *LocationMessage { + if x, ok := x.GetMedia().(*InteractiveMessage_Header_LocationMessage); ok { + return x.LocationMessage + } + return nil +} + +type isInteractiveMessage_Header_Media interface { + isInteractiveMessage_Header_Media() +} + +type InteractiveMessage_Header_DocumentMessage struct { + DocumentMessage *DocumentMessage `protobuf:"bytes,3,opt,name=documentMessage,oneof"` +} + +type InteractiveMessage_Header_ImageMessage struct { + ImageMessage *ImageMessage `protobuf:"bytes,4,opt,name=imageMessage,oneof"` +} + +type InteractiveMessage_Header_JpegThumbnail struct { + JpegThumbnail []byte `protobuf:"bytes,6,opt,name=jpegThumbnail,oneof"` +} + +type InteractiveMessage_Header_VideoMessage struct { + VideoMessage *VideoMessage `protobuf:"bytes,7,opt,name=videoMessage,oneof"` +} + +type InteractiveMessage_Header_LocationMessage struct { + LocationMessage *LocationMessage `protobuf:"bytes,8,opt,name=locationMessage,oneof"` +} + +func (*InteractiveMessage_Header_DocumentMessage) isInteractiveMessage_Header_Media() {} + +func (*InteractiveMessage_Header_ImageMessage) isInteractiveMessage_Header_Media() {} + +func (*InteractiveMessage_Header_JpegThumbnail) isInteractiveMessage_Header_Media() {} + +func (*InteractiveMessage_Header_VideoMessage) isInteractiveMessage_Header_Media() {} + +func (*InteractiveMessage_Header_LocationMessage) isInteractiveMessage_Header_Media() {} + +type InteractiveMessage_Footer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"` +} + +func (x *InteractiveMessage_Footer) Reset() { + *x = InteractiveMessage_Footer{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[257] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_Footer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_Footer) ProtoMessage() {} + +func (x *InteractiveMessage_Footer) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[257] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_Footer.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_Footer) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 2} +} + +func (x *InteractiveMessage_Footer) GetText() string { + if x != nil && x.Text != nil { + return *x.Text + } + return "" +} + +type InteractiveMessage_CollectionMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BizJid *string `protobuf:"bytes,1,opt,name=bizJid" json:"bizJid,omitempty"` + Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"` +} + +func (x *InteractiveMessage_CollectionMessage) Reset() { + *x = InteractiveMessage_CollectionMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[258] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_CollectionMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_CollectionMessage) ProtoMessage() {} + +func (x *InteractiveMessage_CollectionMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[258] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_CollectionMessage.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_CollectionMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 3} +} + +func (x *InteractiveMessage_CollectionMessage) GetBizJid() string { + if x != nil && x.BizJid != nil { + return *x.BizJid + } + return "" +} + +func (x *InteractiveMessage_CollectionMessage) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +func (x *InteractiveMessage_CollectionMessage) GetMessageVersion() int32 { + if x != nil && x.MessageVersion != nil { + return *x.MessageVersion + } + return 0 +} + +type InteractiveMessage_CarouselMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cards []*InteractiveMessage `protobuf:"bytes,1,rep,name=cards" json:"cards,omitempty"` + MessageVersion *int32 `protobuf:"varint,2,opt,name=messageVersion" json:"messageVersion,omitempty"` +} + +func (x *InteractiveMessage_CarouselMessage) Reset() { + *x = InteractiveMessage_CarouselMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[259] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_CarouselMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_CarouselMessage) ProtoMessage() {} + +func (x *InteractiveMessage_CarouselMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[259] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_CarouselMessage.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_CarouselMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 4} +} + +func (x *InteractiveMessage_CarouselMessage) GetCards() []*InteractiveMessage { + if x != nil { + return x.Cards + } + return nil +} + +func (x *InteractiveMessage_CarouselMessage) GetMessageVersion() int32 { + if x != nil && x.MessageVersion != nil { + return *x.MessageVersion + } + return 0 +} + +type InteractiveMessage_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"` +} + +func (x *InteractiveMessage_Body) Reset() { + *x = InteractiveMessage_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[260] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_Body) ProtoMessage() {} + +func (x *InteractiveMessage_Body) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[260] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_Body.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_Body) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 5} +} + +func (x *InteractiveMessage_Body) GetText() string { + if x != nil && x.Text != nil { + return *x.Text + } + return "" +} + +type InteractiveMessage_ShopMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Surface *InteractiveMessage_ShopMessage_Surface `protobuf:"varint,2,opt,name=surface,enum=proto.InteractiveMessage_ShopMessage_Surface" json:"surface,omitempty"` + MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"` +} + +func (x *InteractiveMessage_ShopMessage) Reset() { + *x = InteractiveMessage_ShopMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[261] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_ShopMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_ShopMessage) ProtoMessage() {} + +func (x *InteractiveMessage_ShopMessage) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[261] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_ShopMessage.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_ShopMessage) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 6} +} + +func (x *InteractiveMessage_ShopMessage) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +func (x *InteractiveMessage_ShopMessage) GetSurface() InteractiveMessage_ShopMessage_Surface { + if x != nil && x.Surface != nil { + return *x.Surface + } + return InteractiveMessage_ShopMessage_UNKNOWN_SURFACE +} + +func (x *InteractiveMessage_ShopMessage) GetMessageVersion() int32 { + if x != nil && x.MessageVersion != nil { + return *x.MessageVersion + } + return 0 +} + +type InteractiveMessage_NativeFlowMessage_NativeFlowButton struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + ButtonParamsJson *string `protobuf:"bytes,2,opt,name=buttonParamsJson" json:"buttonParamsJson,omitempty"` +} + +func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) Reset() { + *x = InteractiveMessage_NativeFlowMessage_NativeFlowButton{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[262] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InteractiveMessage_NativeFlowMessage_NativeFlowButton) ProtoMessage() {} + +func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[262] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InteractiveMessage_NativeFlowMessage_NativeFlowButton.ProtoReflect.Descriptor instead. +func (*InteractiveMessage_NativeFlowMessage_NativeFlowButton) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{97, 0, 0} +} + +func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) GetButtonParamsJson() string { + if x != nil && x.ButtonParamsJson != nil { + return *x.ButtonParamsJson + } + return "" +} + type CallLogRecord_ParticipantInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -27135,7 +27602,7 @@ type CallLogRecord_ParticipantInfo struct { func (x *CallLogRecord_ParticipantInfo) Reset() { *x = CallLogRecord_ParticipantInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[257] + mi := &file_binary_proto_def_proto_msgTypes[263] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27148,7 +27615,7 @@ func (x *CallLogRecord_ParticipantInfo) String() string { func (*CallLogRecord_ParticipantInfo) ProtoMessage() {} func (x *CallLogRecord_ParticipantInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[257] + mi := &file_binary_proto_def_proto_msgTypes[263] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27161,7 +27628,7 @@ func (x *CallLogRecord_ParticipantInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CallLogRecord_ParticipantInfo.ProtoReflect.Descriptor instead. func (*CallLogRecord_ParticipantInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{171, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{177, 0} } func (x *CallLogRecord_ParticipantInfo) GetUserJid() string { @@ -27193,7 +27660,7 @@ type VerifiedNameCertificate_Details struct { func (x *VerifiedNameCertificate_Details) Reset() { *x = VerifiedNameCertificate_Details{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[258] + mi := &file_binary_proto_def_proto_msgTypes[264] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27206,7 +27673,7 @@ func (x *VerifiedNameCertificate_Details) String() string { func (*VerifiedNameCertificate_Details) ProtoMessage() {} func (x *VerifiedNameCertificate_Details) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[258] + mi := &file_binary_proto_def_proto_msgTypes[264] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27219,7 +27686,7 @@ func (x *VerifiedNameCertificate_Details) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifiedNameCertificate_Details.ProtoReflect.Descriptor instead. func (*VerifiedNameCertificate_Details) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{172, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{178, 0} } func (x *VerifiedNameCertificate_Details) GetSerial() uint64 { @@ -27271,7 +27738,7 @@ type ClientPayload_WebInfo struct { func (x *ClientPayload_WebInfo) Reset() { *x = ClientPayload_WebInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[259] + mi := &file_binary_proto_def_proto_msgTypes[265] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27284,7 +27751,7 @@ func (x *ClientPayload_WebInfo) String() string { func (*ClientPayload_WebInfo) ProtoMessage() {} func (x *ClientPayload_WebInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[259] + mi := &file_binary_proto_def_proto_msgTypes[265] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27297,7 +27764,7 @@ func (x *ClientPayload_WebInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_WebInfo.ProtoReflect.Descriptor instead. func (*ClientPayload_WebInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 0} } func (x *ClientPayload_WebInfo) GetRefToken() string { @@ -27353,7 +27820,7 @@ type ClientPayload_UserAgent struct { func (x *ClientPayload_UserAgent) Reset() { *x = ClientPayload_UserAgent{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[260] + mi := &file_binary_proto_def_proto_msgTypes[266] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27366,7 +27833,7 @@ func (x *ClientPayload_UserAgent) String() string { func (*ClientPayload_UserAgent) ProtoMessage() {} func (x *ClientPayload_UserAgent) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[260] + mi := &file_binary_proto_def_proto_msgTypes[266] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27379,7 +27846,7 @@ func (x *ClientPayload_UserAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_UserAgent.ProtoReflect.Descriptor instead. func (*ClientPayload_UserAgent) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 1} } func (x *ClientPayload_UserAgent) GetPlatform() ClientPayload_UserAgent_Platform { @@ -27499,7 +27966,7 @@ type ClientPayload_InteropData struct { func (x *ClientPayload_InteropData) Reset() { *x = ClientPayload_InteropData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[261] + mi := &file_binary_proto_def_proto_msgTypes[267] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27512,7 +27979,7 @@ func (x *ClientPayload_InteropData) String() string { func (*ClientPayload_InteropData) ProtoMessage() {} func (x *ClientPayload_InteropData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[261] + mi := &file_binary_proto_def_proto_msgTypes[267] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27525,7 +27992,7 @@ func (x *ClientPayload_InteropData) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_InteropData.ProtoReflect.Descriptor instead. func (*ClientPayload_InteropData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 2} } func (x *ClientPayload_InteropData) GetAccountId() uint64 { @@ -27560,7 +28027,7 @@ type ClientPayload_DevicePairingRegistrationData struct { func (x *ClientPayload_DevicePairingRegistrationData) Reset() { *x = ClientPayload_DevicePairingRegistrationData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[262] + mi := &file_binary_proto_def_proto_msgTypes[268] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27573,7 +28040,7 @@ func (x *ClientPayload_DevicePairingRegistrationData) String() string { func (*ClientPayload_DevicePairingRegistrationData) ProtoMessage() {} func (x *ClientPayload_DevicePairingRegistrationData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[262] + mi := &file_binary_proto_def_proto_msgTypes[268] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27586,7 +28053,7 @@ func (x *ClientPayload_DevicePairingRegistrationData) ProtoReflect() protoreflec // Deprecated: Use ClientPayload_DevicePairingRegistrationData.ProtoReflect.Descriptor instead. func (*ClientPayload_DevicePairingRegistrationData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 3} } func (x *ClientPayload_DevicePairingRegistrationData) GetERegid() []byte { @@ -27657,7 +28124,7 @@ type ClientPayload_DNSSource struct { func (x *ClientPayload_DNSSource) Reset() { *x = ClientPayload_DNSSource{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[263] + mi := &file_binary_proto_def_proto_msgTypes[269] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27670,7 +28137,7 @@ func (x *ClientPayload_DNSSource) String() string { func (*ClientPayload_DNSSource) ProtoMessage() {} func (x *ClientPayload_DNSSource) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[263] + mi := &file_binary_proto_def_proto_msgTypes[269] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27683,7 +28150,7 @@ func (x *ClientPayload_DNSSource) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_DNSSource.ProtoReflect.Descriptor instead. func (*ClientPayload_DNSSource) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 4} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 4} } func (x *ClientPayload_DNSSource) GetDnsMethod() ClientPayload_DNSSource_DNSResolutionMethod { @@ -27721,7 +28188,7 @@ type ClientPayload_WebInfo_WebdPayload struct { func (x *ClientPayload_WebInfo_WebdPayload) Reset() { *x = ClientPayload_WebInfo_WebdPayload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[264] + mi := &file_binary_proto_def_proto_msgTypes[270] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27734,7 +28201,7 @@ func (x *ClientPayload_WebInfo_WebdPayload) String() string { func (*ClientPayload_WebInfo_WebdPayload) ProtoMessage() {} func (x *ClientPayload_WebInfo_WebdPayload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[264] + mi := &file_binary_proto_def_proto_msgTypes[270] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27747,7 +28214,7 @@ func (x *ClientPayload_WebInfo_WebdPayload) ProtoReflect() protoreflect.Message // Deprecated: Use ClientPayload_WebInfo_WebdPayload.ProtoReflect.Descriptor instead. func (*ClientPayload_WebInfo_WebdPayload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 0, 0} } func (x *ClientPayload_WebInfo_WebdPayload) GetUsesParticipantInKey() bool { @@ -27842,7 +28309,7 @@ type ClientPayload_UserAgent_AppVersion struct { func (x *ClientPayload_UserAgent_AppVersion) Reset() { *x = ClientPayload_UserAgent_AppVersion{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[265] + mi := &file_binary_proto_def_proto_msgTypes[271] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27855,7 +28322,7 @@ func (x *ClientPayload_UserAgent_AppVersion) String() string { func (*ClientPayload_UserAgent_AppVersion) ProtoMessage() {} func (x *ClientPayload_UserAgent_AppVersion) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[265] + mi := &file_binary_proto_def_proto_msgTypes[271] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27868,7 +28335,7 @@ func (x *ClientPayload_UserAgent_AppVersion) ProtoReflect() protoreflect.Message // Deprecated: Use ClientPayload_UserAgent_AppVersion.ProtoReflect.Descriptor instead. func (*ClientPayload_UserAgent_AppVersion) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{181, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{187, 1, 0} } func (x *ClientPayload_UserAgent_AppVersion) GetPrimary() uint32 { @@ -27921,7 +28388,7 @@ type NoiseCertificate_Details struct { func (x *NoiseCertificate_Details) Reset() { *x = NoiseCertificate_Details{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[266] + mi := &file_binary_proto_def_proto_msgTypes[272] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -27934,7 +28401,7 @@ func (x *NoiseCertificate_Details) String() string { func (*NoiseCertificate_Details) ProtoMessage() {} func (x *NoiseCertificate_Details) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[266] + mi := &file_binary_proto_def_proto_msgTypes[272] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27947,7 +28414,7 @@ func (x *NoiseCertificate_Details) ProtoReflect() protoreflect.Message { // Deprecated: Use NoiseCertificate_Details.ProtoReflect.Descriptor instead. func (*NoiseCertificate_Details) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{201, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{207, 0} } func (x *NoiseCertificate_Details) GetSerial() uint32 { @@ -27997,7 +28464,7 @@ type CertChain_NoiseCertificate struct { func (x *CertChain_NoiseCertificate) Reset() { *x = CertChain_NoiseCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[267] + mi := &file_binary_proto_def_proto_msgTypes[273] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -28010,7 +28477,7 @@ func (x *CertChain_NoiseCertificate) String() string { func (*CertChain_NoiseCertificate) ProtoMessage() {} func (x *CertChain_NoiseCertificate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[267] + mi := &file_binary_proto_def_proto_msgTypes[273] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28023,7 +28490,7 @@ func (x *CertChain_NoiseCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use CertChain_NoiseCertificate.ProtoReflect.Descriptor instead. func (*CertChain_NoiseCertificate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{202, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{208, 0} } func (x *CertChain_NoiseCertificate) GetDetails() []byte { @@ -28055,7 +28522,7 @@ type CertChain_NoiseCertificate_Details struct { func (x *CertChain_NoiseCertificate_Details) Reset() { *x = CertChain_NoiseCertificate_Details{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[268] + mi := &file_binary_proto_def_proto_msgTypes[274] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -28068,7 +28535,7 @@ func (x *CertChain_NoiseCertificate_Details) String() string { func (*CertChain_NoiseCertificate_Details) ProtoMessage() {} func (x *CertChain_NoiseCertificate_Details) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[268] + mi := &file_binary_proto_def_proto_msgTypes[274] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28081,7 +28548,7 @@ func (x *CertChain_NoiseCertificate_Details) ProtoReflect() protoreflect.Message // Deprecated: Use CertChain_NoiseCertificate_Details.ProtoReflect.Descriptor instead. func (*CertChain_NoiseCertificate_Details) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{202, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{208, 0, 0} } func (x *CertChain_NoiseCertificate_Details) GetSerial() uint32 { @@ -28133,7 +28600,7 @@ type QP_Filter struct { func (x *QP_Filter) Reset() { *x = QP_Filter{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[269] + mi := &file_binary_proto_def_proto_msgTypes[275] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -28146,7 +28613,7 @@ func (x *QP_Filter) String() string { func (*QP_Filter) ProtoMessage() {} func (x *QP_Filter) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[269] + mi := &file_binary_proto_def_proto_msgTypes[275] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28159,7 +28626,7 @@ func (x *QP_Filter) ProtoReflect() protoreflect.Message { // Deprecated: Use QP_Filter.ProtoReflect.Descriptor instead. func (*QP_Filter) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209, 0} } func (x *QP_Filter) GetFilterName() string { @@ -28202,7 +28669,7 @@ type QP_FilterParameters struct { func (x *QP_FilterParameters) Reset() { *x = QP_FilterParameters{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[270] + mi := &file_binary_proto_def_proto_msgTypes[276] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -28215,7 +28682,7 @@ func (x *QP_FilterParameters) String() string { func (*QP_FilterParameters) ProtoMessage() {} func (x *QP_FilterParameters) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[270] + mi := &file_binary_proto_def_proto_msgTypes[276] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28228,7 +28695,7 @@ func (x *QP_FilterParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use QP_FilterParameters.ProtoReflect.Descriptor instead. func (*QP_FilterParameters) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209, 1} } func (x *QP_FilterParameters) GetKey() string { @@ -28258,7 +28725,7 @@ type QP_FilterClause struct { func (x *QP_FilterClause) Reset() { *x = QP_FilterClause{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[271] + mi := &file_binary_proto_def_proto_msgTypes[277] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -28271,7 +28738,7 @@ func (x *QP_FilterClause) String() string { func (*QP_FilterClause) ProtoMessage() {} func (x *QP_FilterClause) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[271] + mi := &file_binary_proto_def_proto_msgTypes[277] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28284,7 +28751,7 @@ func (x *QP_FilterClause) ProtoReflect() protoreflect.Message { // Deprecated: Use QP_FilterClause.ProtoReflect.Descriptor instead. func (*QP_FilterClause) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{203, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{209, 2} } func (x *QP_FilterClause) GetClauseType() QP_ClauseType { @@ -28325,46 +28792,46 @@ func file_binary_proto_def_proto_rawDescGZIP() []byte { return file_binary_proto_def_proto_rawDescData } -var file_binary_proto_def_proto_enumTypes = make([]protoimpl.EnumInfo, 83) -var file_binary_proto_def_proto_msgTypes = make([]protoimpl.MessageInfo, 272) +var file_binary_proto_def_proto_enumTypes = make([]protoimpl.EnumInfo, 84) +var file_binary_proto_def_proto_msgTypes = make([]protoimpl.MessageInfo, 278) var file_binary_proto_def_proto_goTypes = []interface{}{ (ADVEncryptionType)(0), // 0: proto.ADVEncryptionType (KeepType)(0), // 1: proto.KeepType (PeerDataOperationRequestType)(0), // 2: proto.PeerDataOperationRequestType (MediaVisibility)(0), // 3: proto.MediaVisibility (DeviceProps_PlatformType)(0), // 4: proto.DeviceProps.PlatformType - (InteractiveMessage_ShopMessage_Surface)(0), // 5: proto.InteractiveMessage.ShopMessage.Surface - (HistorySyncNotification_HistorySyncType)(0), // 6: proto.HistorySyncNotification.HistorySyncType - (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType)(0), // 7: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType - (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType)(0), // 8: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType - (GroupInviteMessage_GroupType)(0), // 9: proto.GroupInviteMessage.GroupType - (ExtendedTextMessage_PreviewType)(0), // 10: proto.ExtendedTextMessage.PreviewType - (ExtendedTextMessage_InviteLinkGroupType)(0), // 11: proto.ExtendedTextMessage.InviteLinkGroupType - (ExtendedTextMessage_FontType)(0), // 12: proto.ExtendedTextMessage.FontType - (EventResponseMessage_EventResponseType)(0), // 13: proto.EventResponseMessage.EventResponseType - (CallLogMessage_CallType)(0), // 14: proto.CallLogMessage.CallType - (CallLogMessage_CallOutcome)(0), // 15: proto.CallLogMessage.CallOutcome - (ButtonsResponseMessage_Type)(0), // 16: proto.ButtonsResponseMessage.Type - (ButtonsMessage_HeaderType)(0), // 17: proto.ButtonsMessage.HeaderType - (ButtonsMessage_Button_Type)(0), // 18: proto.ButtonsMessage.Button.Type - (BotFeedbackMessage_BotFeedbackKindMultiplePositive)(0), // 19: proto.BotFeedbackMessage.BotFeedbackKindMultiplePositive - (BotFeedbackMessage_BotFeedbackKindMultipleNegative)(0), // 20: proto.BotFeedbackMessage.BotFeedbackKindMultipleNegative - (BotFeedbackMessage_BotFeedbackKind)(0), // 21: proto.BotFeedbackMessage.BotFeedbackKind - (BCallMessage_MediaType)(0), // 22: proto.BCallMessage.MediaType - (HydratedTemplateButton_HydratedURLButton_WebviewPresentationType)(0), // 23: proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType - (DisappearingMode_Trigger)(0), // 24: proto.DisappearingMode.Trigger - (DisappearingMode_Initiator)(0), // 25: proto.DisappearingMode.Initiator - (ContextInfo_ExternalAdReplyInfo_MediaType)(0), // 26: proto.ContextInfo.ExternalAdReplyInfo.MediaType - (ContextInfo_AdReplyInfo_MediaType)(0), // 27: proto.ContextInfo.AdReplyInfo.MediaType - (ForwardedNewsletterMessageInfo_ContentType)(0), // 28: proto.ForwardedNewsletterMessageInfo.ContentType - (BotPluginMetadata_SearchProvider)(0), // 29: proto.BotPluginMetadata.SearchProvider - (BotPluginMetadata_PluginType)(0), // 30: proto.BotPluginMetadata.PluginType - (PaymentBackground_Type)(0), // 31: proto.PaymentBackground.Type - (VideoMessage_Attribution)(0), // 32: proto.VideoMessage.Attribution - (ScheduledCallEditMessage_EditType)(0), // 33: proto.ScheduledCallEditMessage.EditType - (ScheduledCallCreationMessage_CallType)(0), // 34: proto.ScheduledCallCreationMessage.CallType - (RequestWelcomeMessageMetadata_LocalChatState)(0), // 35: proto.RequestWelcomeMessageMetadata.LocalChatState - (ProtocolMessage_Type)(0), // 36: proto.ProtocolMessage.Type + (HistorySyncNotification_HistorySyncType)(0), // 5: proto.HistorySyncNotification.HistorySyncType + (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType)(0), // 6: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType + (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType)(0), // 7: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType + (GroupInviteMessage_GroupType)(0), // 8: proto.GroupInviteMessage.GroupType + (ExtendedTextMessage_PreviewType)(0), // 9: proto.ExtendedTextMessage.PreviewType + (ExtendedTextMessage_InviteLinkGroupType)(0), // 10: proto.ExtendedTextMessage.InviteLinkGroupType + (ExtendedTextMessage_FontType)(0), // 11: proto.ExtendedTextMessage.FontType + (EventResponseMessage_EventResponseType)(0), // 12: proto.EventResponseMessage.EventResponseType + (CallLogMessage_CallType)(0), // 13: proto.CallLogMessage.CallType + (CallLogMessage_CallOutcome)(0), // 14: proto.CallLogMessage.CallOutcome + (ButtonsResponseMessage_Type)(0), // 15: proto.ButtonsResponseMessage.Type + (ButtonsMessage_HeaderType)(0), // 16: proto.ButtonsMessage.HeaderType + (ButtonsMessage_Button_Type)(0), // 17: proto.ButtonsMessage.Button.Type + (BotFeedbackMessage_BotFeedbackKindMultiplePositive)(0), // 18: proto.BotFeedbackMessage.BotFeedbackKindMultiplePositive + (BotFeedbackMessage_BotFeedbackKindMultipleNegative)(0), // 19: proto.BotFeedbackMessage.BotFeedbackKindMultipleNegative + (BotFeedbackMessage_BotFeedbackKind)(0), // 20: proto.BotFeedbackMessage.BotFeedbackKind + (BCallMessage_MediaType)(0), // 21: proto.BCallMessage.MediaType + (HydratedTemplateButton_HydratedURLButton_WebviewPresentationType)(0), // 22: proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType + (DisappearingMode_Trigger)(0), // 23: proto.DisappearingMode.Trigger + (DisappearingMode_Initiator)(0), // 24: proto.DisappearingMode.Initiator + (ContextInfo_ExternalAdReplyInfo_MediaType)(0), // 25: proto.ContextInfo.ExternalAdReplyInfo.MediaType + (ContextInfo_AdReplyInfo_MediaType)(0), // 26: proto.ContextInfo.AdReplyInfo.MediaType + (ForwardedNewsletterMessageInfo_ContentType)(0), // 27: proto.ForwardedNewsletterMessageInfo.ContentType + (BotPluginMetadata_SearchProvider)(0), // 28: proto.BotPluginMetadata.SearchProvider + (BotPluginMetadata_PluginType)(0), // 29: proto.BotPluginMetadata.PluginType + (PaymentBackground_Type)(0), // 30: proto.PaymentBackground.Type + (VideoMessage_Attribution)(0), // 31: proto.VideoMessage.Attribution + (ScheduledCallEditMessage_EditType)(0), // 32: proto.ScheduledCallEditMessage.EditType + (ScheduledCallCreationMessage_CallType)(0), // 33: proto.ScheduledCallCreationMessage.CallType + (RequestWelcomeMessageMetadata_LocalChatState)(0), // 34: proto.RequestWelcomeMessageMetadata.LocalChatState + (ProtocolMessage_Type)(0), // 35: proto.ProtocolMessage.Type + (PlaceholderMessage_PlaceholderType)(0), // 36: proto.PlaceholderMessage.PlaceholderType (PinInChatMessage_Type)(0), // 37: proto.PinInChatMessage.Type (PaymentInviteMessage_ServiceType)(0), // 38: proto.PaymentInviteMessage.ServiceType (OrderMessage_OrderSurface)(0), // 39: proto.OrderMessage.OrderSurface @@ -28373,836 +28840,852 @@ var file_binary_proto_def_proto_goTypes = []interface{}{ (ListMessage_ListType)(0), // 42: proto.ListMessage.ListType (InvoiceMessage_AttachmentType)(0), // 43: proto.InvoiceMessage.AttachmentType (InteractiveResponseMessage_Body_Format)(0), // 44: proto.InteractiveResponseMessage.Body.Format - (PastParticipant_LeaveReason)(0), // 45: proto.PastParticipant.LeaveReason - (HistorySync_HistorySyncType)(0), // 46: proto.HistorySync.HistorySyncType - (HistorySync_BotAIWaitListState)(0), // 47: proto.HistorySync.BotAIWaitListState - (GroupParticipant_Rank)(0), // 48: proto.GroupParticipant.Rank - (Conversation_EndOfHistoryTransferType)(0), // 49: proto.Conversation.EndOfHistoryTransferType - (MediaRetryNotification_ResultType)(0), // 50: proto.MediaRetryNotification.ResultType - (SyncdMutation_SyncdOperation)(0), // 51: proto.SyncdMutation.SyncdOperation - (StatusPrivacyAction_StatusDistributionMode)(0), // 52: proto.StatusPrivacyAction.StatusDistributionMode - (MarketingMessageAction_MarketingMessagePrototypeType)(0), // 53: proto.MarketingMessageAction.MarketingMessagePrototypeType - (PatchDebugData_Platform)(0), // 54: proto.PatchDebugData.Platform - (CallLogRecord_SilenceReason)(0), // 55: proto.CallLogRecord.SilenceReason - (CallLogRecord_CallType)(0), // 56: proto.CallLogRecord.CallType - (CallLogRecord_CallResult)(0), // 57: proto.CallLogRecord.CallResult - (BizIdentityInfo_VerifiedLevelValue)(0), // 58: proto.BizIdentityInfo.VerifiedLevelValue - (BizIdentityInfo_HostStorageType)(0), // 59: proto.BizIdentityInfo.HostStorageType - (BizIdentityInfo_ActualActorsType)(0), // 60: proto.BizIdentityInfo.ActualActorsType - (BizAccountLinkInfo_HostStorageType)(0), // 61: proto.BizAccountLinkInfo.HostStorageType - (BizAccountLinkInfo_AccountType)(0), // 62: proto.BizAccountLinkInfo.AccountType - (ClientPayload_Product)(0), // 63: proto.ClientPayload.Product - (ClientPayload_IOSAppExtension)(0), // 64: proto.ClientPayload.IOSAppExtension - (ClientPayload_ConnectType)(0), // 65: proto.ClientPayload.ConnectType - (ClientPayload_ConnectReason)(0), // 66: proto.ClientPayload.ConnectReason - (ClientPayload_WebInfo_WebSubPlatform)(0), // 67: proto.ClientPayload.WebInfo.WebSubPlatform - (ClientPayload_UserAgent_ReleaseChannel)(0), // 68: proto.ClientPayload.UserAgent.ReleaseChannel - (ClientPayload_UserAgent_Platform)(0), // 69: proto.ClientPayload.UserAgent.Platform - (ClientPayload_UserAgent_DeviceType)(0), // 70: proto.ClientPayload.UserAgent.DeviceType - (ClientPayload_DNSSource_DNSResolutionMethod)(0), // 71: proto.ClientPayload.DNSSource.DNSResolutionMethod - (WebMessageInfo_StubType)(0), // 72: proto.WebMessageInfo.StubType - (WebMessageInfo_Status)(0), // 73: proto.WebMessageInfo.Status - (WebMessageInfo_BizPrivacyStatus)(0), // 74: proto.WebMessageInfo.BizPrivacyStatus - (WebFeatures_Flag)(0), // 75: proto.WebFeatures.Flag - (PinInChat_Type)(0), // 76: proto.PinInChat.Type - (PaymentInfo_TxnStatus)(0), // 77: proto.PaymentInfo.TxnStatus - (PaymentInfo_Status)(0), // 78: proto.PaymentInfo.Status - (PaymentInfo_Currency)(0), // 79: proto.PaymentInfo.Currency - (QP_FilterResult)(0), // 80: proto.QP.FilterResult - (QP_FilterClientNotSupportedConfig)(0), // 81: proto.QP.FilterClientNotSupportedConfig - (QP_ClauseType)(0), // 82: proto.QP.ClauseType - (*ADVSignedKeyIndexList)(nil), // 83: proto.ADVSignedKeyIndexList - (*ADVSignedDeviceIdentity)(nil), // 84: proto.ADVSignedDeviceIdentity - (*ADVSignedDeviceIdentityHMAC)(nil), // 85: proto.ADVSignedDeviceIdentityHMAC - (*ADVKeyIndexList)(nil), // 86: proto.ADVKeyIndexList - (*ADVDeviceIdentity)(nil), // 87: proto.ADVDeviceIdentity - (*DeviceProps)(nil), // 88: proto.DeviceProps - (*InteractiveMessage)(nil), // 89: proto.InteractiveMessage + (InteractiveMessage_ShopMessage_Surface)(0), // 45: proto.InteractiveMessage.ShopMessage.Surface + (PastParticipant_LeaveReason)(0), // 46: proto.PastParticipant.LeaveReason + (HistorySync_HistorySyncType)(0), // 47: proto.HistorySync.HistorySyncType + (HistorySync_BotAIWaitListState)(0), // 48: proto.HistorySync.BotAIWaitListState + (GroupParticipant_Rank)(0), // 49: proto.GroupParticipant.Rank + (Conversation_EndOfHistoryTransferType)(0), // 50: proto.Conversation.EndOfHistoryTransferType + (MediaRetryNotification_ResultType)(0), // 51: proto.MediaRetryNotification.ResultType + (SyncdMutation_SyncdOperation)(0), // 52: proto.SyncdMutation.SyncdOperation + (StatusPrivacyAction_StatusDistributionMode)(0), // 53: proto.StatusPrivacyAction.StatusDistributionMode + (MarketingMessageAction_MarketingMessagePrototypeType)(0), // 54: proto.MarketingMessageAction.MarketingMessagePrototypeType + (PatchDebugData_Platform)(0), // 55: proto.PatchDebugData.Platform + (CallLogRecord_SilenceReason)(0), // 56: proto.CallLogRecord.SilenceReason + (CallLogRecord_CallType)(0), // 57: proto.CallLogRecord.CallType + (CallLogRecord_CallResult)(0), // 58: proto.CallLogRecord.CallResult + (BizIdentityInfo_VerifiedLevelValue)(0), // 59: proto.BizIdentityInfo.VerifiedLevelValue + (BizIdentityInfo_HostStorageType)(0), // 60: proto.BizIdentityInfo.HostStorageType + (BizIdentityInfo_ActualActorsType)(0), // 61: proto.BizIdentityInfo.ActualActorsType + (BizAccountLinkInfo_HostStorageType)(0), // 62: proto.BizAccountLinkInfo.HostStorageType + (BizAccountLinkInfo_AccountType)(0), // 63: proto.BizAccountLinkInfo.AccountType + (ClientPayload_Product)(0), // 64: proto.ClientPayload.Product + (ClientPayload_IOSAppExtension)(0), // 65: proto.ClientPayload.IOSAppExtension + (ClientPayload_ConnectType)(0), // 66: proto.ClientPayload.ConnectType + (ClientPayload_ConnectReason)(0), // 67: proto.ClientPayload.ConnectReason + (ClientPayload_WebInfo_WebSubPlatform)(0), // 68: proto.ClientPayload.WebInfo.WebSubPlatform + (ClientPayload_UserAgent_ReleaseChannel)(0), // 69: proto.ClientPayload.UserAgent.ReleaseChannel + (ClientPayload_UserAgent_Platform)(0), // 70: proto.ClientPayload.UserAgent.Platform + (ClientPayload_UserAgent_DeviceType)(0), // 71: proto.ClientPayload.UserAgent.DeviceType + (ClientPayload_DNSSource_DNSResolutionMethod)(0), // 72: proto.ClientPayload.DNSSource.DNSResolutionMethod + (WebMessageInfo_StubType)(0), // 73: proto.WebMessageInfo.StubType + (WebMessageInfo_Status)(0), // 74: proto.WebMessageInfo.Status + (WebMessageInfo_BizPrivacyStatus)(0), // 75: proto.WebMessageInfo.BizPrivacyStatus + (WebFeatures_Flag)(0), // 76: proto.WebFeatures.Flag + (PinInChat_Type)(0), // 77: proto.PinInChat.Type + (PaymentInfo_TxnStatus)(0), // 78: proto.PaymentInfo.TxnStatus + (PaymentInfo_Status)(0), // 79: proto.PaymentInfo.Status + (PaymentInfo_Currency)(0), // 80: proto.PaymentInfo.Currency + (QP_FilterResult)(0), // 81: proto.QP.FilterResult + (QP_FilterClientNotSupportedConfig)(0), // 82: proto.QP.FilterClientNotSupportedConfig + (QP_ClauseType)(0), // 83: proto.QP.ClauseType + (*ADVSignedKeyIndexList)(nil), // 84: proto.ADVSignedKeyIndexList + (*ADVSignedDeviceIdentity)(nil), // 85: proto.ADVSignedDeviceIdentity + (*ADVSignedDeviceIdentityHMAC)(nil), // 86: proto.ADVSignedDeviceIdentityHMAC + (*ADVKeyIndexList)(nil), // 87: proto.ADVKeyIndexList + (*ADVDeviceIdentity)(nil), // 88: proto.ADVDeviceIdentity + (*DeviceProps)(nil), // 89: proto.DeviceProps (*InitialSecurityNotificationSettingSync)(nil), // 90: proto.InitialSecurityNotificationSettingSync (*ImageMessage)(nil), // 91: proto.ImageMessage (*HistorySyncNotification)(nil), // 92: proto.HistorySyncNotification (*HighlyStructuredMessage)(nil), // 93: proto.HighlyStructuredMessage (*GroupInviteMessage)(nil), // 94: proto.GroupInviteMessage (*FutureProofMessage)(nil), // 95: proto.FutureProofMessage - (*ExtendedTextMessage)(nil), // 96: proto.ExtendedTextMessage - (*EventResponseMessage)(nil), // 97: proto.EventResponseMessage - (*EventMessage)(nil), // 98: proto.EventMessage - (*EncReactionMessage)(nil), // 99: proto.EncReactionMessage - (*EncEventResponseMessage)(nil), // 100: proto.EncEventResponseMessage - (*EncCommentMessage)(nil), // 101: proto.EncCommentMessage - (*DocumentMessage)(nil), // 102: proto.DocumentMessage - (*DeviceSentMessage)(nil), // 103: proto.DeviceSentMessage - (*DeclinePaymentRequestMessage)(nil), // 104: proto.DeclinePaymentRequestMessage - (*ContactsArrayMessage)(nil), // 105: proto.ContactsArrayMessage - (*ContactMessage)(nil), // 106: proto.ContactMessage - (*CommentMessage)(nil), // 107: proto.CommentMessage - (*Chat)(nil), // 108: proto.Chat - (*CancelPaymentRequestMessage)(nil), // 109: proto.CancelPaymentRequestMessage - (*Call)(nil), // 110: proto.Call - (*CallLogMessage)(nil), // 111: proto.CallLogMessage - (*ButtonsResponseMessage)(nil), // 112: proto.ButtonsResponseMessage - (*ButtonsMessage)(nil), // 113: proto.ButtonsMessage - (*BotFeedbackMessage)(nil), // 114: proto.BotFeedbackMessage - (*BCallMessage)(nil), // 115: proto.BCallMessage - (*AudioMessage)(nil), // 116: proto.AudioMessage - (*AppStateSyncKey)(nil), // 117: proto.AppStateSyncKey - (*AppStateSyncKeyShare)(nil), // 118: proto.AppStateSyncKeyShare - (*AppStateSyncKeyRequest)(nil), // 119: proto.AppStateSyncKeyRequest - (*AppStateSyncKeyId)(nil), // 120: proto.AppStateSyncKeyId - (*AppStateSyncKeyFingerprint)(nil), // 121: proto.AppStateSyncKeyFingerprint - (*AppStateSyncKeyData)(nil), // 122: proto.AppStateSyncKeyData - (*AppStateFatalExceptionNotification)(nil), // 123: proto.AppStateFatalExceptionNotification - (*Location)(nil), // 124: proto.Location - (*InteractiveAnnotation)(nil), // 125: proto.InteractiveAnnotation - (*HydratedTemplateButton)(nil), // 126: proto.HydratedTemplateButton - (*GroupMention)(nil), // 127: proto.GroupMention - (*DisappearingMode)(nil), // 128: proto.DisappearingMode - (*DeviceListMetadata)(nil), // 129: proto.DeviceListMetadata - (*ContextInfo)(nil), // 130: proto.ContextInfo - (*ForwardedNewsletterMessageInfo)(nil), // 131: proto.ForwardedNewsletterMessageInfo - (*BotSuggestedPromptMetadata)(nil), // 132: proto.BotSuggestedPromptMetadata - (*BotPluginMetadata)(nil), // 133: proto.BotPluginMetadata - (*BotMetadata)(nil), // 134: proto.BotMetadata - (*BotAvatarMetadata)(nil), // 135: proto.BotAvatarMetadata - (*ActionLink)(nil), // 136: proto.ActionLink - (*TemplateButton)(nil), // 137: proto.TemplateButton - (*Point)(nil), // 138: proto.Point - (*PaymentBackground)(nil), // 139: proto.PaymentBackground - (*Money)(nil), // 140: proto.Money - (*Message)(nil), // 141: proto.Message - (*MessageSecretMessage)(nil), // 142: proto.MessageSecretMessage - (*MessageContextInfo)(nil), // 143: proto.MessageContextInfo - (*VideoMessage)(nil), // 144: proto.VideoMessage - (*TemplateMessage)(nil), // 145: proto.TemplateMessage - (*TemplateButtonReplyMessage)(nil), // 146: proto.TemplateButtonReplyMessage - (*StickerSyncRMRMessage)(nil), // 147: proto.StickerSyncRMRMessage - (*StickerMessage)(nil), // 148: proto.StickerMessage - (*SenderKeyDistributionMessage)(nil), // 149: proto.SenderKeyDistributionMessage - (*SendPaymentMessage)(nil), // 150: proto.SendPaymentMessage - (*ScheduledCallEditMessage)(nil), // 151: proto.ScheduledCallEditMessage - (*ScheduledCallCreationMessage)(nil), // 152: proto.ScheduledCallCreationMessage - (*RequestWelcomeMessageMetadata)(nil), // 153: proto.RequestWelcomeMessageMetadata - (*RequestPhoneNumberMessage)(nil), // 154: proto.RequestPhoneNumberMessage - (*RequestPaymentMessage)(nil), // 155: proto.RequestPaymentMessage - (*ReactionMessage)(nil), // 156: proto.ReactionMessage - (*ProtocolMessage)(nil), // 157: proto.ProtocolMessage - (*ProductMessage)(nil), // 158: proto.ProductMessage - (*PollVoteMessage)(nil), // 159: proto.PollVoteMessage - (*PollUpdateMessage)(nil), // 160: proto.PollUpdateMessage - (*PollUpdateMessageMetadata)(nil), // 161: proto.PollUpdateMessageMetadata - (*PollEncValue)(nil), // 162: proto.PollEncValue - (*PollCreationMessage)(nil), // 163: proto.PollCreationMessage - (*PinInChatMessage)(nil), // 164: proto.PinInChatMessage - (*PeerDataOperationRequestResponseMessage)(nil), // 165: proto.PeerDataOperationRequestResponseMessage - (*PeerDataOperationRequestMessage)(nil), // 166: proto.PeerDataOperationRequestMessage - (*PaymentInviteMessage)(nil), // 167: proto.PaymentInviteMessage - (*OrderMessage)(nil), // 168: proto.OrderMessage - (*NewsletterAdminInviteMessage)(nil), // 169: proto.NewsletterAdminInviteMessage - (*MessageHistoryBundle)(nil), // 170: proto.MessageHistoryBundle - (*LocationMessage)(nil), // 171: proto.LocationMessage - (*LiveLocationMessage)(nil), // 172: proto.LiveLocationMessage - (*ListResponseMessage)(nil), // 173: proto.ListResponseMessage - (*ListMessage)(nil), // 174: proto.ListMessage - (*KeepInChatMessage)(nil), // 175: proto.KeepInChatMessage - (*InvoiceMessage)(nil), // 176: proto.InvoiceMessage - (*InteractiveResponseMessage)(nil), // 177: proto.InteractiveResponseMessage - (*EphemeralSetting)(nil), // 178: proto.EphemeralSetting - (*WallpaperSettings)(nil), // 179: proto.WallpaperSettings - (*StickerMetadata)(nil), // 180: proto.StickerMetadata - (*Pushname)(nil), // 181: proto.Pushname - (*PhoneNumberToLIDMapping)(nil), // 182: proto.PhoneNumberToLIDMapping - (*PastParticipants)(nil), // 183: proto.PastParticipants - (*PastParticipant)(nil), // 184: proto.PastParticipant - (*NotificationSettings)(nil), // 185: proto.NotificationSettings - (*HistorySync)(nil), // 186: proto.HistorySync - (*HistorySyncMsg)(nil), // 187: proto.HistorySyncMsg - (*GroupParticipant)(nil), // 188: proto.GroupParticipant - (*GlobalSettings)(nil), // 189: proto.GlobalSettings - (*Conversation)(nil), // 190: proto.Conversation - (*AvatarUserSettings)(nil), // 191: proto.AvatarUserSettings - (*AutoDownloadSettings)(nil), // 192: proto.AutoDownloadSettings - (*ServerErrorReceipt)(nil), // 193: proto.ServerErrorReceipt - (*MediaRetryNotification)(nil), // 194: proto.MediaRetryNotification - (*MessageKey)(nil), // 195: proto.MessageKey - (*SyncdVersion)(nil), // 196: proto.SyncdVersion - (*SyncdValue)(nil), // 197: proto.SyncdValue - (*SyncdSnapshot)(nil), // 198: proto.SyncdSnapshot - (*SyncdRecord)(nil), // 199: proto.SyncdRecord - (*SyncdPatch)(nil), // 200: proto.SyncdPatch - (*SyncdMutations)(nil), // 201: proto.SyncdMutations - (*SyncdMutation)(nil), // 202: proto.SyncdMutation - (*SyncdIndex)(nil), // 203: proto.SyncdIndex - (*KeyId)(nil), // 204: proto.KeyId - (*ExternalBlobReference)(nil), // 205: proto.ExternalBlobReference - (*ExitCode)(nil), // 206: proto.ExitCode - (*SyncActionValue)(nil), // 207: proto.SyncActionValue - (*UserStatusMuteAction)(nil), // 208: proto.UserStatusMuteAction - (*UnarchiveChatsSetting)(nil), // 209: proto.UnarchiveChatsSetting - (*TimeFormatAction)(nil), // 210: proto.TimeFormatAction - (*SyncActionMessage)(nil), // 211: proto.SyncActionMessage - (*SyncActionMessageRange)(nil), // 212: proto.SyncActionMessageRange - (*SubscriptionAction)(nil), // 213: proto.SubscriptionAction - (*StickerAction)(nil), // 214: proto.StickerAction - (*StatusPrivacyAction)(nil), // 215: proto.StatusPrivacyAction - (*StarAction)(nil), // 216: proto.StarAction - (*SecurityNotificationSetting)(nil), // 217: proto.SecurityNotificationSetting - (*RemoveRecentStickerAction)(nil), // 218: proto.RemoveRecentStickerAction - (*RecentEmojiWeightsAction)(nil), // 219: proto.RecentEmojiWeightsAction - (*QuickReplyAction)(nil), // 220: proto.QuickReplyAction - (*PushNameSetting)(nil), // 221: proto.PushNameSetting - (*PrivacySettingRelayAllCalls)(nil), // 222: proto.PrivacySettingRelayAllCalls - (*PrimaryVersionAction)(nil), // 223: proto.PrimaryVersionAction - (*PrimaryFeature)(nil), // 224: proto.PrimaryFeature - (*PnForLidChatAction)(nil), // 225: proto.PnForLidChatAction - (*PinAction)(nil), // 226: proto.PinAction - (*PaymentInfoAction)(nil), // 227: proto.PaymentInfoAction - (*NuxAction)(nil), // 228: proto.NuxAction - (*MuteAction)(nil), // 229: proto.MuteAction - (*MarketingMessageBroadcastAction)(nil), // 230: proto.MarketingMessageBroadcastAction - (*MarketingMessageAction)(nil), // 231: proto.MarketingMessageAction - (*MarkChatAsReadAction)(nil), // 232: proto.MarkChatAsReadAction - (*LocaleSetting)(nil), // 233: proto.LocaleSetting - (*LabelReorderingAction)(nil), // 234: proto.LabelReorderingAction - (*LabelEditAction)(nil), // 235: proto.LabelEditAction - (*LabelAssociationAction)(nil), // 236: proto.LabelAssociationAction - (*KeyExpiration)(nil), // 237: proto.KeyExpiration - (*ExternalWebBetaAction)(nil), // 238: proto.ExternalWebBetaAction - (*DeleteMessageForMeAction)(nil), // 239: proto.DeleteMessageForMeAction - (*DeleteIndividualCallLogAction)(nil), // 240: proto.DeleteIndividualCallLogAction - (*DeleteChatAction)(nil), // 241: proto.DeleteChatAction - (*ContactAction)(nil), // 242: proto.ContactAction - (*ClearChatAction)(nil), // 243: proto.ClearChatAction - (*ChatAssignmentOpenedStatusAction)(nil), // 244: proto.ChatAssignmentOpenedStatusAction - (*ChatAssignmentAction)(nil), // 245: proto.ChatAssignmentAction - (*CallLogAction)(nil), // 246: proto.CallLogAction - (*BotWelcomeRequestAction)(nil), // 247: proto.BotWelcomeRequestAction - (*ArchiveChatAction)(nil), // 248: proto.ArchiveChatAction - (*AndroidUnsupportedActions)(nil), // 249: proto.AndroidUnsupportedActions - (*AgentAction)(nil), // 250: proto.AgentAction - (*SyncActionData)(nil), // 251: proto.SyncActionData - (*RecentEmojiWeight)(nil), // 252: proto.RecentEmojiWeight - (*PatchDebugData)(nil), // 253: proto.PatchDebugData - (*CallLogRecord)(nil), // 254: proto.CallLogRecord - (*VerifiedNameCertificate)(nil), // 255: proto.VerifiedNameCertificate - (*LocalizedName)(nil), // 256: proto.LocalizedName - (*BizIdentityInfo)(nil), // 257: proto.BizIdentityInfo - (*BizAccountPayload)(nil), // 258: proto.BizAccountPayload - (*BizAccountLinkInfo)(nil), // 259: proto.BizAccountLinkInfo - (*HandshakeMessage)(nil), // 260: proto.HandshakeMessage - (*HandshakeServerHello)(nil), // 261: proto.HandshakeServerHello - (*HandshakeClientHello)(nil), // 262: proto.HandshakeClientHello - (*HandshakeClientFinish)(nil), // 263: proto.HandshakeClientFinish - (*ClientPayload)(nil), // 264: proto.ClientPayload - (*WebNotificationsInfo)(nil), // 265: proto.WebNotificationsInfo - (*WebMessageInfo)(nil), // 266: proto.WebMessageInfo - (*WebFeatures)(nil), // 267: proto.WebFeatures - (*UserReceipt)(nil), // 268: proto.UserReceipt - (*StatusPSA)(nil), // 269: proto.StatusPSA - (*ReportingTokenInfo)(nil), // 270: proto.ReportingTokenInfo - (*Reaction)(nil), // 271: proto.Reaction - (*PremiumMessageInfo)(nil), // 272: proto.PremiumMessageInfo - (*PollUpdate)(nil), // 273: proto.PollUpdate - (*PollAdditionalMetadata)(nil), // 274: proto.PollAdditionalMetadata - (*PinInChat)(nil), // 275: proto.PinInChat - (*PhotoChange)(nil), // 276: proto.PhotoChange - (*PaymentInfo)(nil), // 277: proto.PaymentInfo - (*NotificationMessageInfo)(nil), // 278: proto.NotificationMessageInfo - (*MessageAddOnContextInfo)(nil), // 279: proto.MessageAddOnContextInfo - (*MediaData)(nil), // 280: proto.MediaData - (*KeepInChat)(nil), // 281: proto.KeepInChat - (*EventResponse)(nil), // 282: proto.EventResponse - (*CommentMetadata)(nil), // 283: proto.CommentMetadata - (*NoiseCertificate)(nil), // 284: proto.NoiseCertificate - (*CertChain)(nil), // 285: proto.CertChain - (*QP)(nil), // 286: proto.QP - (*DeviceProps_HistorySyncConfig)(nil), // 287: proto.DeviceProps.HistorySyncConfig - (*DeviceProps_AppVersion)(nil), // 288: proto.DeviceProps.AppVersion - (*InteractiveMessage_ShopMessage)(nil), // 289: proto.InteractiveMessage.ShopMessage - (*InteractiveMessage_NativeFlowMessage)(nil), // 290: proto.InteractiveMessage.NativeFlowMessage - (*InteractiveMessage_Header)(nil), // 291: proto.InteractiveMessage.Header - (*InteractiveMessage_Footer)(nil), // 292: proto.InteractiveMessage.Footer - (*InteractiveMessage_CollectionMessage)(nil), // 293: proto.InteractiveMessage.CollectionMessage - (*InteractiveMessage_CarouselMessage)(nil), // 294: proto.InteractiveMessage.CarouselMessage - (*InteractiveMessage_Body)(nil), // 295: proto.InteractiveMessage.Body - (*InteractiveMessage_NativeFlowMessage_NativeFlowButton)(nil), // 296: proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton - (*HighlyStructuredMessage_HSMLocalizableParameter)(nil), // 297: proto.HighlyStructuredMessage.HSMLocalizableParameter - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime)(nil), // 298: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency)(nil), // 299: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch)(nil), // 300: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent)(nil), // 301: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent - (*CallLogMessage_CallParticipant)(nil), // 302: proto.CallLogMessage.CallParticipant - (*ButtonsMessage_Button)(nil), // 303: proto.ButtonsMessage.Button - (*ButtonsMessage_Button_NativeFlowInfo)(nil), // 304: proto.ButtonsMessage.Button.NativeFlowInfo - (*ButtonsMessage_Button_ButtonText)(nil), // 305: proto.ButtonsMessage.Button.ButtonText - (*HydratedTemplateButton_HydratedURLButton)(nil), // 306: proto.HydratedTemplateButton.HydratedURLButton - (*HydratedTemplateButton_HydratedQuickReplyButton)(nil), // 307: proto.HydratedTemplateButton.HydratedQuickReplyButton - (*HydratedTemplateButton_HydratedCallButton)(nil), // 308: proto.HydratedTemplateButton.HydratedCallButton - (*ContextInfo_UTMInfo)(nil), // 309: proto.ContextInfo.UTMInfo - (*ContextInfo_ExternalAdReplyInfo)(nil), // 310: proto.ContextInfo.ExternalAdReplyInfo - (*ContextInfo_DataSharingContext)(nil), // 311: proto.ContextInfo.DataSharingContext - (*ContextInfo_BusinessMessageForwardInfo)(nil), // 312: proto.ContextInfo.BusinessMessageForwardInfo - (*ContextInfo_AdReplyInfo)(nil), // 313: proto.ContextInfo.AdReplyInfo - (*TemplateButton_URLButton)(nil), // 314: proto.TemplateButton.URLButton - (*TemplateButton_QuickReplyButton)(nil), // 315: proto.TemplateButton.QuickReplyButton - (*TemplateButton_CallButton)(nil), // 316: proto.TemplateButton.CallButton - (*PaymentBackground_MediaData)(nil), // 317: proto.PaymentBackground.MediaData - (*TemplateMessage_HydratedFourRowTemplate)(nil), // 318: proto.TemplateMessage.HydratedFourRowTemplate - (*TemplateMessage_FourRowTemplate)(nil), // 319: proto.TemplateMessage.FourRowTemplate - (*ProductMessage_ProductSnapshot)(nil), // 320: proto.ProductMessage.ProductSnapshot - (*ProductMessage_CatalogSnapshot)(nil), // 321: proto.ProductMessage.CatalogSnapshot - (*PollCreationMessage_Option)(nil), // 322: proto.PollCreationMessage.Option - (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult)(nil), // 323: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult - (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse)(nil), // 324: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse - (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse)(nil), // 325: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse - (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail)(nil), // 326: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail - (*PeerDataOperationRequestMessage_RequestUrlPreview)(nil), // 327: proto.PeerDataOperationRequestMessage.RequestUrlPreview - (*PeerDataOperationRequestMessage_RequestStickerReupload)(nil), // 328: proto.PeerDataOperationRequestMessage.RequestStickerReupload - (*PeerDataOperationRequestMessage_PlaceholderMessageResendRequest)(nil), // 329: proto.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest - (*PeerDataOperationRequestMessage_HistorySyncOnDemandRequest)(nil), // 330: proto.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest - (*ListResponseMessage_SingleSelectReply)(nil), // 331: proto.ListResponseMessage.SingleSelectReply - (*ListMessage_Section)(nil), // 332: proto.ListMessage.Section - (*ListMessage_Row)(nil), // 333: proto.ListMessage.Row - (*ListMessage_Product)(nil), // 334: proto.ListMessage.Product - (*ListMessage_ProductSection)(nil), // 335: proto.ListMessage.ProductSection - (*ListMessage_ProductListInfo)(nil), // 336: proto.ListMessage.ProductListInfo - (*ListMessage_ProductListHeaderImage)(nil), // 337: proto.ListMessage.ProductListHeaderImage - (*InteractiveResponseMessage_NativeFlowResponseMessage)(nil), // 338: proto.InteractiveResponseMessage.NativeFlowResponseMessage - (*InteractiveResponseMessage_Body)(nil), // 339: proto.InteractiveResponseMessage.Body - (*CallLogRecord_ParticipantInfo)(nil), // 340: proto.CallLogRecord.ParticipantInfo - (*VerifiedNameCertificate_Details)(nil), // 341: proto.VerifiedNameCertificate.Details - (*ClientPayload_WebInfo)(nil), // 342: proto.ClientPayload.WebInfo - (*ClientPayload_UserAgent)(nil), // 343: proto.ClientPayload.UserAgent - (*ClientPayload_InteropData)(nil), // 344: proto.ClientPayload.InteropData - (*ClientPayload_DevicePairingRegistrationData)(nil), // 345: proto.ClientPayload.DevicePairingRegistrationData - (*ClientPayload_DNSSource)(nil), // 346: proto.ClientPayload.DNSSource - (*ClientPayload_WebInfo_WebdPayload)(nil), // 347: proto.ClientPayload.WebInfo.WebdPayload - (*ClientPayload_UserAgent_AppVersion)(nil), // 348: proto.ClientPayload.UserAgent.AppVersion - (*NoiseCertificate_Details)(nil), // 349: proto.NoiseCertificate.Details - (*CertChain_NoiseCertificate)(nil), // 350: proto.CertChain.NoiseCertificate - (*CertChain_NoiseCertificate_Details)(nil), // 351: proto.CertChain.NoiseCertificate.Details - (*QP_Filter)(nil), // 352: proto.QP.Filter - (*QP_FilterParameters)(nil), // 353: proto.QP.FilterParameters - (*QP_FilterClause)(nil), // 354: proto.QP.FilterClause + (*ExtendedTextMessageWithParentKey)(nil), // 96: proto.ExtendedTextMessageWithParentKey + (*ExtendedTextMessage)(nil), // 97: proto.ExtendedTextMessage + (*EventResponseMessage)(nil), // 98: proto.EventResponseMessage + (*EventMessage)(nil), // 99: proto.EventMessage + (*EncReactionMessage)(nil), // 100: proto.EncReactionMessage + (*EncEventResponseMessage)(nil), // 101: proto.EncEventResponseMessage + (*EncCommentMessage)(nil), // 102: proto.EncCommentMessage + (*DocumentMessage)(nil), // 103: proto.DocumentMessage + (*DeviceSentMessage)(nil), // 104: proto.DeviceSentMessage + (*DeclinePaymentRequestMessage)(nil), // 105: proto.DeclinePaymentRequestMessage + (*ContactsArrayMessage)(nil), // 106: proto.ContactsArrayMessage + (*ContactMessage)(nil), // 107: proto.ContactMessage + (*CommentMessage)(nil), // 108: proto.CommentMessage + (*Chat)(nil), // 109: proto.Chat + (*CancelPaymentRequestMessage)(nil), // 110: proto.CancelPaymentRequestMessage + (*Call)(nil), // 111: proto.Call + (*CallLogMessage)(nil), // 112: proto.CallLogMessage + (*ButtonsResponseMessage)(nil), // 113: proto.ButtonsResponseMessage + (*ButtonsMessage)(nil), // 114: proto.ButtonsMessage + (*BotFeedbackMessage)(nil), // 115: proto.BotFeedbackMessage + (*BCallMessage)(nil), // 116: proto.BCallMessage + (*AudioMessage)(nil), // 117: proto.AudioMessage + (*AppStateSyncKey)(nil), // 118: proto.AppStateSyncKey + (*AppStateSyncKeyShare)(nil), // 119: proto.AppStateSyncKeyShare + (*AppStateSyncKeyRequest)(nil), // 120: proto.AppStateSyncKeyRequest + (*AppStateSyncKeyId)(nil), // 121: proto.AppStateSyncKeyId + (*AppStateSyncKeyFingerprint)(nil), // 122: proto.AppStateSyncKeyFingerprint + (*AppStateSyncKeyData)(nil), // 123: proto.AppStateSyncKeyData + (*AppStateFatalExceptionNotification)(nil), // 124: proto.AppStateFatalExceptionNotification + (*MediaNotifyMessage)(nil), // 125: proto.MediaNotifyMessage + (*Location)(nil), // 126: proto.Location + (*InteractiveAnnotation)(nil), // 127: proto.InteractiveAnnotation + (*HydratedTemplateButton)(nil), // 128: proto.HydratedTemplateButton + (*GroupMention)(nil), // 129: proto.GroupMention + (*DisappearingMode)(nil), // 130: proto.DisappearingMode + (*DeviceListMetadata)(nil), // 131: proto.DeviceListMetadata + (*ContextInfo)(nil), // 132: proto.ContextInfo + (*ForwardedNewsletterMessageInfo)(nil), // 133: proto.ForwardedNewsletterMessageInfo + (*BotSuggestedPromptMetadata)(nil), // 134: proto.BotSuggestedPromptMetadata + (*BotPluginMetadata)(nil), // 135: proto.BotPluginMetadata + (*BotMetadata)(nil), // 136: proto.BotMetadata + (*BotAvatarMetadata)(nil), // 137: proto.BotAvatarMetadata + (*ActionLink)(nil), // 138: proto.ActionLink + (*TemplateButton)(nil), // 139: proto.TemplateButton + (*Point)(nil), // 140: proto.Point + (*PaymentBackground)(nil), // 141: proto.PaymentBackground + (*Money)(nil), // 142: proto.Money + (*Message)(nil), // 143: proto.Message + (*MessageSecretMessage)(nil), // 144: proto.MessageSecretMessage + (*MessageContextInfo)(nil), // 145: proto.MessageContextInfo + (*VideoMessage)(nil), // 146: proto.VideoMessage + (*TemplateMessage)(nil), // 147: proto.TemplateMessage + (*TemplateButtonReplyMessage)(nil), // 148: proto.TemplateButtonReplyMessage + (*StickerSyncRMRMessage)(nil), // 149: proto.StickerSyncRMRMessage + (*StickerMessage)(nil), // 150: proto.StickerMessage + (*SenderKeyDistributionMessage)(nil), // 151: proto.SenderKeyDistributionMessage + (*SendPaymentMessage)(nil), // 152: proto.SendPaymentMessage + (*ScheduledCallEditMessage)(nil), // 153: proto.ScheduledCallEditMessage + (*ScheduledCallCreationMessage)(nil), // 154: proto.ScheduledCallCreationMessage + (*RequestWelcomeMessageMetadata)(nil), // 155: proto.RequestWelcomeMessageMetadata + (*RequestPhoneNumberMessage)(nil), // 156: proto.RequestPhoneNumberMessage + (*RequestPaymentMessage)(nil), // 157: proto.RequestPaymentMessage + (*ReactionMessage)(nil), // 158: proto.ReactionMessage + (*ProtocolMessage)(nil), // 159: proto.ProtocolMessage + (*ProductMessage)(nil), // 160: proto.ProductMessage + (*PollVoteMessage)(nil), // 161: proto.PollVoteMessage + (*PollUpdateMessage)(nil), // 162: proto.PollUpdateMessage + (*PollUpdateMessageMetadata)(nil), // 163: proto.PollUpdateMessageMetadata + (*PollEncValue)(nil), // 164: proto.PollEncValue + (*PollCreationMessage)(nil), // 165: proto.PollCreationMessage + (*PlaceholderMessage)(nil), // 166: proto.PlaceholderMessage + (*PinInChatMessage)(nil), // 167: proto.PinInChatMessage + (*PeerDataOperationRequestResponseMessage)(nil), // 168: proto.PeerDataOperationRequestResponseMessage + (*PeerDataOperationRequestMessage)(nil), // 169: proto.PeerDataOperationRequestMessage + (*PaymentInviteMessage)(nil), // 170: proto.PaymentInviteMessage + (*OrderMessage)(nil), // 171: proto.OrderMessage + (*NewsletterAdminInviteMessage)(nil), // 172: proto.NewsletterAdminInviteMessage + (*MessageHistoryBundle)(nil), // 173: proto.MessageHistoryBundle + (*LocationMessage)(nil), // 174: proto.LocationMessage + (*LiveLocationMessage)(nil), // 175: proto.LiveLocationMessage + (*ListResponseMessage)(nil), // 176: proto.ListResponseMessage + (*ListMessage)(nil), // 177: proto.ListMessage + (*KeepInChatMessage)(nil), // 178: proto.KeepInChatMessage + (*InvoiceMessage)(nil), // 179: proto.InvoiceMessage + (*InteractiveResponseMessage)(nil), // 180: proto.InteractiveResponseMessage + (*InteractiveMessage)(nil), // 181: proto.InteractiveMessage + (*EphemeralSetting)(nil), // 182: proto.EphemeralSetting + (*WallpaperSettings)(nil), // 183: proto.WallpaperSettings + (*StickerMetadata)(nil), // 184: proto.StickerMetadata + (*Pushname)(nil), // 185: proto.Pushname + (*PhoneNumberToLIDMapping)(nil), // 186: proto.PhoneNumberToLIDMapping + (*PastParticipants)(nil), // 187: proto.PastParticipants + (*PastParticipant)(nil), // 188: proto.PastParticipant + (*NotificationSettings)(nil), // 189: proto.NotificationSettings + (*HistorySync)(nil), // 190: proto.HistorySync + (*HistorySyncMsg)(nil), // 191: proto.HistorySyncMsg + (*GroupParticipant)(nil), // 192: proto.GroupParticipant + (*GlobalSettings)(nil), // 193: proto.GlobalSettings + (*Conversation)(nil), // 194: proto.Conversation + (*AvatarUserSettings)(nil), // 195: proto.AvatarUserSettings + (*AutoDownloadSettings)(nil), // 196: proto.AutoDownloadSettings + (*ServerErrorReceipt)(nil), // 197: proto.ServerErrorReceipt + (*MediaRetryNotification)(nil), // 198: proto.MediaRetryNotification + (*MessageKey)(nil), // 199: proto.MessageKey + (*SyncdVersion)(nil), // 200: proto.SyncdVersion + (*SyncdValue)(nil), // 201: proto.SyncdValue + (*SyncdSnapshot)(nil), // 202: proto.SyncdSnapshot + (*SyncdRecord)(nil), // 203: proto.SyncdRecord + (*SyncdPatch)(nil), // 204: proto.SyncdPatch + (*SyncdMutations)(nil), // 205: proto.SyncdMutations + (*SyncdMutation)(nil), // 206: proto.SyncdMutation + (*SyncdIndex)(nil), // 207: proto.SyncdIndex + (*KeyId)(nil), // 208: proto.KeyId + (*ExternalBlobReference)(nil), // 209: proto.ExternalBlobReference + (*ExitCode)(nil), // 210: proto.ExitCode + (*SyncActionValue)(nil), // 211: proto.SyncActionValue + (*UserStatusMuteAction)(nil), // 212: proto.UserStatusMuteAction + (*UnarchiveChatsSetting)(nil), // 213: proto.UnarchiveChatsSetting + (*TimeFormatAction)(nil), // 214: proto.TimeFormatAction + (*SyncActionMessage)(nil), // 215: proto.SyncActionMessage + (*SyncActionMessageRange)(nil), // 216: proto.SyncActionMessageRange + (*SubscriptionAction)(nil), // 217: proto.SubscriptionAction + (*StickerAction)(nil), // 218: proto.StickerAction + (*StatusPrivacyAction)(nil), // 219: proto.StatusPrivacyAction + (*StarAction)(nil), // 220: proto.StarAction + (*SecurityNotificationSetting)(nil), // 221: proto.SecurityNotificationSetting + (*RemoveRecentStickerAction)(nil), // 222: proto.RemoveRecentStickerAction + (*RecentEmojiWeightsAction)(nil), // 223: proto.RecentEmojiWeightsAction + (*QuickReplyAction)(nil), // 224: proto.QuickReplyAction + (*PushNameSetting)(nil), // 225: proto.PushNameSetting + (*PrivacySettingRelayAllCalls)(nil), // 226: proto.PrivacySettingRelayAllCalls + (*PrimaryVersionAction)(nil), // 227: proto.PrimaryVersionAction + (*PrimaryFeature)(nil), // 228: proto.PrimaryFeature + (*PnForLidChatAction)(nil), // 229: proto.PnForLidChatAction + (*PinAction)(nil), // 230: proto.PinAction + (*PaymentInfoAction)(nil), // 231: proto.PaymentInfoAction + (*NuxAction)(nil), // 232: proto.NuxAction + (*MuteAction)(nil), // 233: proto.MuteAction + (*MarketingMessageBroadcastAction)(nil), // 234: proto.MarketingMessageBroadcastAction + (*MarketingMessageAction)(nil), // 235: proto.MarketingMessageAction + (*MarkChatAsReadAction)(nil), // 236: proto.MarkChatAsReadAction + (*LocaleSetting)(nil), // 237: proto.LocaleSetting + (*LabelReorderingAction)(nil), // 238: proto.LabelReorderingAction + (*LabelEditAction)(nil), // 239: proto.LabelEditAction + (*LabelAssociationAction)(nil), // 240: proto.LabelAssociationAction + (*KeyExpiration)(nil), // 241: proto.KeyExpiration + (*ExternalWebBetaAction)(nil), // 242: proto.ExternalWebBetaAction + (*DeleteMessageForMeAction)(nil), // 243: proto.DeleteMessageForMeAction + (*DeleteIndividualCallLogAction)(nil), // 244: proto.DeleteIndividualCallLogAction + (*DeleteChatAction)(nil), // 245: proto.DeleteChatAction + (*CustomPaymentMethodsAction)(nil), // 246: proto.CustomPaymentMethodsAction + (*CustomPaymentMethod)(nil), // 247: proto.CustomPaymentMethod + (*CustomPaymentMethodMetadata)(nil), // 248: proto.CustomPaymentMethodMetadata + (*ContactAction)(nil), // 249: proto.ContactAction + (*ClearChatAction)(nil), // 250: proto.ClearChatAction + (*ChatAssignmentOpenedStatusAction)(nil), // 251: proto.ChatAssignmentOpenedStatusAction + (*ChatAssignmentAction)(nil), // 252: proto.ChatAssignmentAction + (*CallLogAction)(nil), // 253: proto.CallLogAction + (*BotWelcomeRequestAction)(nil), // 254: proto.BotWelcomeRequestAction + (*ArchiveChatAction)(nil), // 255: proto.ArchiveChatAction + (*AndroidUnsupportedActions)(nil), // 256: proto.AndroidUnsupportedActions + (*AgentAction)(nil), // 257: proto.AgentAction + (*SyncActionData)(nil), // 258: proto.SyncActionData + (*RecentEmojiWeight)(nil), // 259: proto.RecentEmojiWeight + (*PatchDebugData)(nil), // 260: proto.PatchDebugData + (*CallLogRecord)(nil), // 261: proto.CallLogRecord + (*VerifiedNameCertificate)(nil), // 262: proto.VerifiedNameCertificate + (*LocalizedName)(nil), // 263: proto.LocalizedName + (*BizIdentityInfo)(nil), // 264: proto.BizIdentityInfo + (*BizAccountPayload)(nil), // 265: proto.BizAccountPayload + (*BizAccountLinkInfo)(nil), // 266: proto.BizAccountLinkInfo + (*HandshakeMessage)(nil), // 267: proto.HandshakeMessage + (*HandshakeServerHello)(nil), // 268: proto.HandshakeServerHello + (*HandshakeClientHello)(nil), // 269: proto.HandshakeClientHello + (*HandshakeClientFinish)(nil), // 270: proto.HandshakeClientFinish + (*ClientPayload)(nil), // 271: proto.ClientPayload + (*WebNotificationsInfo)(nil), // 272: proto.WebNotificationsInfo + (*WebMessageInfo)(nil), // 273: proto.WebMessageInfo + (*WebFeatures)(nil), // 274: proto.WebFeatures + (*UserReceipt)(nil), // 275: proto.UserReceipt + (*StatusPSA)(nil), // 276: proto.StatusPSA + (*ReportingTokenInfo)(nil), // 277: proto.ReportingTokenInfo + (*Reaction)(nil), // 278: proto.Reaction + (*PremiumMessageInfo)(nil), // 279: proto.PremiumMessageInfo + (*PollUpdate)(nil), // 280: proto.PollUpdate + (*PollAdditionalMetadata)(nil), // 281: proto.PollAdditionalMetadata + (*PinInChat)(nil), // 282: proto.PinInChat + (*PhotoChange)(nil), // 283: proto.PhotoChange + (*PaymentInfo)(nil), // 284: proto.PaymentInfo + (*NotificationMessageInfo)(nil), // 285: proto.NotificationMessageInfo + (*MessageAddOnContextInfo)(nil), // 286: proto.MessageAddOnContextInfo + (*MediaData)(nil), // 287: proto.MediaData + (*KeepInChat)(nil), // 288: proto.KeepInChat + (*EventResponse)(nil), // 289: proto.EventResponse + (*CommentMetadata)(nil), // 290: proto.CommentMetadata + (*NoiseCertificate)(nil), // 291: proto.NoiseCertificate + (*CertChain)(nil), // 292: proto.CertChain + (*QP)(nil), // 293: proto.QP + (*DeviceProps_HistorySyncConfig)(nil), // 294: proto.DeviceProps.HistorySyncConfig + (*DeviceProps_AppVersion)(nil), // 295: proto.DeviceProps.AppVersion + (*HighlyStructuredMessage_HSMLocalizableParameter)(nil), // 296: proto.HighlyStructuredMessage.HSMLocalizableParameter + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime)(nil), // 297: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency)(nil), // 298: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch)(nil), // 299: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent)(nil), // 300: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + (*CallLogMessage_CallParticipant)(nil), // 301: proto.CallLogMessage.CallParticipant + (*ButtonsMessage_Button)(nil), // 302: proto.ButtonsMessage.Button + (*ButtonsMessage_Button_NativeFlowInfo)(nil), // 303: proto.ButtonsMessage.Button.NativeFlowInfo + (*ButtonsMessage_Button_ButtonText)(nil), // 304: proto.ButtonsMessage.Button.ButtonText + (*HydratedTemplateButton_HydratedURLButton)(nil), // 305: proto.HydratedTemplateButton.HydratedURLButton + (*HydratedTemplateButton_HydratedQuickReplyButton)(nil), // 306: proto.HydratedTemplateButton.HydratedQuickReplyButton + (*HydratedTemplateButton_HydratedCallButton)(nil), // 307: proto.HydratedTemplateButton.HydratedCallButton + (*ContextInfo_UTMInfo)(nil), // 308: proto.ContextInfo.UTMInfo + (*ContextInfo_ExternalAdReplyInfo)(nil), // 309: proto.ContextInfo.ExternalAdReplyInfo + (*ContextInfo_DataSharingContext)(nil), // 310: proto.ContextInfo.DataSharingContext + (*ContextInfo_BusinessMessageForwardInfo)(nil), // 311: proto.ContextInfo.BusinessMessageForwardInfo + (*ContextInfo_AdReplyInfo)(nil), // 312: proto.ContextInfo.AdReplyInfo + (*TemplateButton_URLButton)(nil), // 313: proto.TemplateButton.URLButton + (*TemplateButton_QuickReplyButton)(nil), // 314: proto.TemplateButton.QuickReplyButton + (*TemplateButton_CallButton)(nil), // 315: proto.TemplateButton.CallButton + (*PaymentBackground_MediaData)(nil), // 316: proto.PaymentBackground.MediaData + (*TemplateMessage_HydratedFourRowTemplate)(nil), // 317: proto.TemplateMessage.HydratedFourRowTemplate + (*TemplateMessage_FourRowTemplate)(nil), // 318: proto.TemplateMessage.FourRowTemplate + (*ProductMessage_ProductSnapshot)(nil), // 319: proto.ProductMessage.ProductSnapshot + (*ProductMessage_CatalogSnapshot)(nil), // 320: proto.ProductMessage.CatalogSnapshot + (*PollCreationMessage_Option)(nil), // 321: proto.PollCreationMessage.Option + (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult)(nil), // 322: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse)(nil), // 323: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse + (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse)(nil), // 324: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse + (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail)(nil), // 325: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail + (*PeerDataOperationRequestMessage_RequestUrlPreview)(nil), // 326: proto.PeerDataOperationRequestMessage.RequestUrlPreview + (*PeerDataOperationRequestMessage_RequestStickerReupload)(nil), // 327: proto.PeerDataOperationRequestMessage.RequestStickerReupload + (*PeerDataOperationRequestMessage_PlaceholderMessageResendRequest)(nil), // 328: proto.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest + (*PeerDataOperationRequestMessage_HistorySyncOnDemandRequest)(nil), // 329: proto.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest + (*ListResponseMessage_SingleSelectReply)(nil), // 330: proto.ListResponseMessage.SingleSelectReply + (*ListMessage_Section)(nil), // 331: proto.ListMessage.Section + (*ListMessage_Row)(nil), // 332: proto.ListMessage.Row + (*ListMessage_Product)(nil), // 333: proto.ListMessage.Product + (*ListMessage_ProductSection)(nil), // 334: proto.ListMessage.ProductSection + (*ListMessage_ProductListInfo)(nil), // 335: proto.ListMessage.ProductListInfo + (*ListMessage_ProductListHeaderImage)(nil), // 336: proto.ListMessage.ProductListHeaderImage + (*InteractiveResponseMessage_NativeFlowResponseMessage)(nil), // 337: proto.InteractiveResponseMessage.NativeFlowResponseMessage + (*InteractiveResponseMessage_Body)(nil), // 338: proto.InteractiveResponseMessage.Body + (*InteractiveMessage_NativeFlowMessage)(nil), // 339: proto.InteractiveMessage.NativeFlowMessage + (*InteractiveMessage_Header)(nil), // 340: proto.InteractiveMessage.Header + (*InteractiveMessage_Footer)(nil), // 341: proto.InteractiveMessage.Footer + (*InteractiveMessage_CollectionMessage)(nil), // 342: proto.InteractiveMessage.CollectionMessage + (*InteractiveMessage_CarouselMessage)(nil), // 343: proto.InteractiveMessage.CarouselMessage + (*InteractiveMessage_Body)(nil), // 344: proto.InteractiveMessage.Body + (*InteractiveMessage_ShopMessage)(nil), // 345: proto.InteractiveMessage.ShopMessage + (*InteractiveMessage_NativeFlowMessage_NativeFlowButton)(nil), // 346: proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton + (*CallLogRecord_ParticipantInfo)(nil), // 347: proto.CallLogRecord.ParticipantInfo + (*VerifiedNameCertificate_Details)(nil), // 348: proto.VerifiedNameCertificate.Details + (*ClientPayload_WebInfo)(nil), // 349: proto.ClientPayload.WebInfo + (*ClientPayload_UserAgent)(nil), // 350: proto.ClientPayload.UserAgent + (*ClientPayload_InteropData)(nil), // 351: proto.ClientPayload.InteropData + (*ClientPayload_DevicePairingRegistrationData)(nil), // 352: proto.ClientPayload.DevicePairingRegistrationData + (*ClientPayload_DNSSource)(nil), // 353: proto.ClientPayload.DNSSource + (*ClientPayload_WebInfo_WebdPayload)(nil), // 354: proto.ClientPayload.WebInfo.WebdPayload + (*ClientPayload_UserAgent_AppVersion)(nil), // 355: proto.ClientPayload.UserAgent.AppVersion + (*NoiseCertificate_Details)(nil), // 356: proto.NoiseCertificate.Details + (*CertChain_NoiseCertificate)(nil), // 357: proto.CertChain.NoiseCertificate + (*CertChain_NoiseCertificate_Details)(nil), // 358: proto.CertChain.NoiseCertificate.Details + (*QP_Filter)(nil), // 359: proto.QP.Filter + (*QP_FilterParameters)(nil), // 360: proto.QP.FilterParameters + (*QP_FilterClause)(nil), // 361: proto.QP.FilterClause } var file_binary_proto_def_proto_depIdxs = []int32{ 0, // 0: proto.ADVSignedDeviceIdentityHMAC.accountType:type_name -> proto.ADVEncryptionType 0, // 1: proto.ADVKeyIndexList.accountType:type_name -> proto.ADVEncryptionType 0, // 2: proto.ADVDeviceIdentity.accountType:type_name -> proto.ADVEncryptionType 0, // 3: proto.ADVDeviceIdentity.deviceType:type_name -> proto.ADVEncryptionType - 288, // 4: proto.DeviceProps.version:type_name -> proto.DeviceProps.AppVersion + 295, // 4: proto.DeviceProps.version:type_name -> proto.DeviceProps.AppVersion 4, // 5: proto.DeviceProps.platformType:type_name -> proto.DeviceProps.PlatformType - 287, // 6: proto.DeviceProps.historySyncConfig:type_name -> proto.DeviceProps.HistorySyncConfig - 291, // 7: proto.InteractiveMessage.header:type_name -> proto.InteractiveMessage.Header - 295, // 8: proto.InteractiveMessage.body:type_name -> proto.InteractiveMessage.Body - 292, // 9: proto.InteractiveMessage.footer:type_name -> proto.InteractiveMessage.Footer - 130, // 10: proto.InteractiveMessage.contextInfo:type_name -> proto.ContextInfo - 289, // 11: proto.InteractiveMessage.shopStorefrontMessage:type_name -> proto.InteractiveMessage.ShopMessage - 293, // 12: proto.InteractiveMessage.collectionMessage:type_name -> proto.InteractiveMessage.CollectionMessage - 290, // 13: proto.InteractiveMessage.nativeFlowMessage:type_name -> proto.InteractiveMessage.NativeFlowMessage - 294, // 14: proto.InteractiveMessage.carouselMessage:type_name -> proto.InteractiveMessage.CarouselMessage - 125, // 15: proto.ImageMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation - 130, // 16: proto.ImageMessage.contextInfo:type_name -> proto.ContextInfo - 125, // 17: proto.ImageMessage.annotations:type_name -> proto.InteractiveAnnotation - 6, // 18: proto.HistorySyncNotification.syncType:type_name -> proto.HistorySyncNotification.HistorySyncType - 297, // 19: proto.HighlyStructuredMessage.localizableParams:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter - 145, // 20: proto.HighlyStructuredMessage.hydratedHsm:type_name -> proto.TemplateMessage - 130, // 21: proto.GroupInviteMessage.contextInfo:type_name -> proto.ContextInfo - 9, // 22: proto.GroupInviteMessage.groupType:type_name -> proto.GroupInviteMessage.GroupType - 141, // 23: proto.FutureProofMessage.message:type_name -> proto.Message - 12, // 24: proto.ExtendedTextMessage.font:type_name -> proto.ExtendedTextMessage.FontType - 10, // 25: proto.ExtendedTextMessage.previewType:type_name -> proto.ExtendedTextMessage.PreviewType - 130, // 26: proto.ExtendedTextMessage.contextInfo:type_name -> proto.ContextInfo - 11, // 27: proto.ExtendedTextMessage.inviteLinkGroupType:type_name -> proto.ExtendedTextMessage.InviteLinkGroupType - 11, // 28: proto.ExtendedTextMessage.inviteLinkGroupTypeV2:type_name -> proto.ExtendedTextMessage.InviteLinkGroupType - 13, // 29: proto.EventResponseMessage.response:type_name -> proto.EventResponseMessage.EventResponseType - 130, // 30: proto.EventMessage.contextInfo:type_name -> proto.ContextInfo - 171, // 31: proto.EventMessage.location:type_name -> proto.LocationMessage - 195, // 32: proto.EncReactionMessage.targetMessageKey:type_name -> proto.MessageKey - 195, // 33: proto.EncEventResponseMessage.eventCreationMessageKey:type_name -> proto.MessageKey - 195, // 34: proto.EncCommentMessage.targetMessageKey:type_name -> proto.MessageKey - 130, // 35: proto.DocumentMessage.contextInfo:type_name -> proto.ContextInfo - 141, // 36: proto.DeviceSentMessage.message:type_name -> proto.Message - 195, // 37: proto.DeclinePaymentRequestMessage.key:type_name -> proto.MessageKey - 106, // 38: proto.ContactsArrayMessage.contacts:type_name -> proto.ContactMessage - 130, // 39: proto.ContactsArrayMessage.contextInfo:type_name -> proto.ContextInfo - 130, // 40: proto.ContactMessage.contextInfo:type_name -> proto.ContextInfo - 141, // 41: proto.CommentMessage.message:type_name -> proto.Message - 195, // 42: proto.CommentMessage.targetMessageKey:type_name -> proto.MessageKey - 195, // 43: proto.CancelPaymentRequestMessage.key:type_name -> proto.MessageKey - 15, // 44: proto.CallLogMessage.callOutcome:type_name -> proto.CallLogMessage.CallOutcome - 14, // 45: proto.CallLogMessage.callType:type_name -> proto.CallLogMessage.CallType - 302, // 46: proto.CallLogMessage.participants:type_name -> proto.CallLogMessage.CallParticipant - 130, // 47: proto.ButtonsResponseMessage.contextInfo:type_name -> proto.ContextInfo - 16, // 48: proto.ButtonsResponseMessage.type:type_name -> proto.ButtonsResponseMessage.Type - 130, // 49: proto.ButtonsMessage.contextInfo:type_name -> proto.ContextInfo - 303, // 50: proto.ButtonsMessage.buttons:type_name -> proto.ButtonsMessage.Button - 17, // 51: proto.ButtonsMessage.headerType:type_name -> proto.ButtonsMessage.HeaderType - 102, // 52: proto.ButtonsMessage.documentMessage:type_name -> proto.DocumentMessage - 91, // 53: proto.ButtonsMessage.imageMessage:type_name -> proto.ImageMessage - 144, // 54: proto.ButtonsMessage.videoMessage:type_name -> proto.VideoMessage - 171, // 55: proto.ButtonsMessage.locationMessage:type_name -> proto.LocationMessage - 195, // 56: proto.BotFeedbackMessage.messageKey:type_name -> proto.MessageKey - 21, // 57: proto.BotFeedbackMessage.kind:type_name -> proto.BotFeedbackMessage.BotFeedbackKind - 22, // 58: proto.BCallMessage.mediaType:type_name -> proto.BCallMessage.MediaType - 130, // 59: proto.AudioMessage.contextInfo:type_name -> proto.ContextInfo - 120, // 60: proto.AppStateSyncKey.keyId:type_name -> proto.AppStateSyncKeyId - 122, // 61: proto.AppStateSyncKey.keyData:type_name -> proto.AppStateSyncKeyData - 117, // 62: proto.AppStateSyncKeyShare.keys:type_name -> proto.AppStateSyncKey - 120, // 63: proto.AppStateSyncKeyRequest.keyIds:type_name -> proto.AppStateSyncKeyId - 121, // 64: proto.AppStateSyncKeyData.fingerprint:type_name -> proto.AppStateSyncKeyFingerprint - 138, // 65: proto.InteractiveAnnotation.polygonVertices:type_name -> proto.Point - 124, // 66: proto.InteractiveAnnotation.location:type_name -> proto.Location - 131, // 67: proto.InteractiveAnnotation.newsletter:type_name -> proto.ForwardedNewsletterMessageInfo - 307, // 68: proto.HydratedTemplateButton.quickReplyButton:type_name -> proto.HydratedTemplateButton.HydratedQuickReplyButton - 306, // 69: proto.HydratedTemplateButton.urlButton:type_name -> proto.HydratedTemplateButton.HydratedURLButton - 308, // 70: proto.HydratedTemplateButton.callButton:type_name -> proto.HydratedTemplateButton.HydratedCallButton - 25, // 71: proto.DisappearingMode.initiator:type_name -> proto.DisappearingMode.Initiator - 24, // 72: proto.DisappearingMode.trigger:type_name -> proto.DisappearingMode.Trigger - 0, // 73: proto.DeviceListMetadata.senderAccountType:type_name -> proto.ADVEncryptionType - 0, // 74: proto.DeviceListMetadata.receiverAccountType:type_name -> proto.ADVEncryptionType - 141, // 75: proto.ContextInfo.quotedMessage:type_name -> proto.Message - 313, // 76: proto.ContextInfo.quotedAd:type_name -> proto.ContextInfo.AdReplyInfo - 195, // 77: proto.ContextInfo.placeholderKey:type_name -> proto.MessageKey - 310, // 78: proto.ContextInfo.externalAdReply:type_name -> proto.ContextInfo.ExternalAdReplyInfo - 128, // 79: proto.ContextInfo.disappearingMode:type_name -> proto.DisappearingMode - 136, // 80: proto.ContextInfo.actionLink:type_name -> proto.ActionLink - 127, // 81: proto.ContextInfo.groupMentions:type_name -> proto.GroupMention - 309, // 82: proto.ContextInfo.utm:type_name -> proto.ContextInfo.UTMInfo - 131, // 83: proto.ContextInfo.forwardedNewsletterMessageInfo:type_name -> proto.ForwardedNewsletterMessageInfo - 312, // 84: proto.ContextInfo.businessMessageForwardInfo:type_name -> proto.ContextInfo.BusinessMessageForwardInfo - 311, // 85: proto.ContextInfo.dataSharingContext:type_name -> proto.ContextInfo.DataSharingContext - 28, // 86: proto.ForwardedNewsletterMessageInfo.contentType:type_name -> proto.ForwardedNewsletterMessageInfo.ContentType - 29, // 87: proto.BotPluginMetadata.provider:type_name -> proto.BotPluginMetadata.SearchProvider - 30, // 88: proto.BotPluginMetadata.pluginType:type_name -> proto.BotPluginMetadata.PluginType - 135, // 89: proto.BotMetadata.avatarMetadata:type_name -> proto.BotAvatarMetadata - 133, // 90: proto.BotMetadata.pluginMetadata:type_name -> proto.BotPluginMetadata - 132, // 91: proto.BotMetadata.suggestedPromptMetadata:type_name -> proto.BotSuggestedPromptMetadata - 315, // 92: proto.TemplateButton.quickReplyButton:type_name -> proto.TemplateButton.QuickReplyButton - 314, // 93: proto.TemplateButton.urlButton:type_name -> proto.TemplateButton.URLButton - 316, // 94: proto.TemplateButton.callButton:type_name -> proto.TemplateButton.CallButton - 317, // 95: proto.PaymentBackground.mediaData:type_name -> proto.PaymentBackground.MediaData - 31, // 96: proto.PaymentBackground.type:type_name -> proto.PaymentBackground.Type - 149, // 97: proto.Message.senderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage - 91, // 98: proto.Message.imageMessage:type_name -> proto.ImageMessage - 106, // 99: proto.Message.contactMessage:type_name -> proto.ContactMessage - 171, // 100: proto.Message.locationMessage:type_name -> proto.LocationMessage - 96, // 101: proto.Message.extendedTextMessage:type_name -> proto.ExtendedTextMessage - 102, // 102: proto.Message.documentMessage:type_name -> proto.DocumentMessage - 116, // 103: proto.Message.audioMessage:type_name -> proto.AudioMessage - 144, // 104: proto.Message.videoMessage:type_name -> proto.VideoMessage - 110, // 105: proto.Message.call:type_name -> proto.Call - 108, // 106: proto.Message.chat:type_name -> proto.Chat - 157, // 107: proto.Message.protocolMessage:type_name -> proto.ProtocolMessage - 105, // 108: proto.Message.contactsArrayMessage:type_name -> proto.ContactsArrayMessage - 93, // 109: proto.Message.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage - 149, // 110: proto.Message.fastRatchetKeySenderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage - 150, // 111: proto.Message.sendPaymentMessage:type_name -> proto.SendPaymentMessage - 172, // 112: proto.Message.liveLocationMessage:type_name -> proto.LiveLocationMessage - 155, // 113: proto.Message.requestPaymentMessage:type_name -> proto.RequestPaymentMessage - 104, // 114: proto.Message.declinePaymentRequestMessage:type_name -> proto.DeclinePaymentRequestMessage - 109, // 115: proto.Message.cancelPaymentRequestMessage:type_name -> proto.CancelPaymentRequestMessage - 145, // 116: proto.Message.templateMessage:type_name -> proto.TemplateMessage - 148, // 117: proto.Message.stickerMessage:type_name -> proto.StickerMessage - 94, // 118: proto.Message.groupInviteMessage:type_name -> proto.GroupInviteMessage - 146, // 119: proto.Message.templateButtonReplyMessage:type_name -> proto.TemplateButtonReplyMessage - 158, // 120: proto.Message.productMessage:type_name -> proto.ProductMessage - 103, // 121: proto.Message.deviceSentMessage:type_name -> proto.DeviceSentMessage - 143, // 122: proto.Message.messageContextInfo:type_name -> proto.MessageContextInfo - 174, // 123: proto.Message.listMessage:type_name -> proto.ListMessage - 95, // 124: proto.Message.viewOnceMessage:type_name -> proto.FutureProofMessage - 168, // 125: proto.Message.orderMessage:type_name -> proto.OrderMessage - 173, // 126: proto.Message.listResponseMessage:type_name -> proto.ListResponseMessage - 95, // 127: proto.Message.ephemeralMessage:type_name -> proto.FutureProofMessage - 176, // 128: proto.Message.invoiceMessage:type_name -> proto.InvoiceMessage - 113, // 129: proto.Message.buttonsMessage:type_name -> proto.ButtonsMessage - 112, // 130: proto.Message.buttonsResponseMessage:type_name -> proto.ButtonsResponseMessage - 167, // 131: proto.Message.paymentInviteMessage:type_name -> proto.PaymentInviteMessage - 89, // 132: proto.Message.interactiveMessage:type_name -> proto.InteractiveMessage - 156, // 133: proto.Message.reactionMessage:type_name -> proto.ReactionMessage - 147, // 134: proto.Message.stickerSyncRmrMessage:type_name -> proto.StickerSyncRMRMessage - 177, // 135: proto.Message.interactiveResponseMessage:type_name -> proto.InteractiveResponseMessage - 163, // 136: proto.Message.pollCreationMessage:type_name -> proto.PollCreationMessage - 160, // 137: proto.Message.pollUpdateMessage:type_name -> proto.PollUpdateMessage - 175, // 138: proto.Message.keepInChatMessage:type_name -> proto.KeepInChatMessage - 95, // 139: proto.Message.documentWithCaptionMessage:type_name -> proto.FutureProofMessage - 154, // 140: proto.Message.requestPhoneNumberMessage:type_name -> proto.RequestPhoneNumberMessage - 95, // 141: proto.Message.viewOnceMessageV2:type_name -> proto.FutureProofMessage - 99, // 142: proto.Message.encReactionMessage:type_name -> proto.EncReactionMessage - 95, // 143: proto.Message.editedMessage:type_name -> proto.FutureProofMessage - 95, // 144: proto.Message.viewOnceMessageV2Extension:type_name -> proto.FutureProofMessage - 163, // 145: proto.Message.pollCreationMessageV2:type_name -> proto.PollCreationMessage - 152, // 146: proto.Message.scheduledCallCreationMessage:type_name -> proto.ScheduledCallCreationMessage - 95, // 147: proto.Message.groupMentionedMessage:type_name -> proto.FutureProofMessage - 164, // 148: proto.Message.pinInChatMessage:type_name -> proto.PinInChatMessage - 163, // 149: proto.Message.pollCreationMessageV3:type_name -> proto.PollCreationMessage - 151, // 150: proto.Message.scheduledCallEditMessage:type_name -> proto.ScheduledCallEditMessage - 144, // 151: proto.Message.ptvMessage:type_name -> proto.VideoMessage - 95, // 152: proto.Message.botInvokeMessage:type_name -> proto.FutureProofMessage - 111, // 153: proto.Message.callLogMesssage:type_name -> proto.CallLogMessage - 170, // 154: proto.Message.messageHistoryBundle:type_name -> proto.MessageHistoryBundle - 101, // 155: proto.Message.encCommentMessage:type_name -> proto.EncCommentMessage - 115, // 156: proto.Message.bcallMessage:type_name -> proto.BCallMessage - 95, // 157: proto.Message.lottieStickerMessage:type_name -> proto.FutureProofMessage - 98, // 158: proto.Message.eventMessage:type_name -> proto.EventMessage - 100, // 159: proto.Message.encEventResponseMessage:type_name -> proto.EncEventResponseMessage - 107, // 160: proto.Message.commentMessage:type_name -> proto.CommentMessage - 169, // 161: proto.Message.newsletterAdminInviteMessage:type_name -> proto.NewsletterAdminInviteMessage - 129, // 162: proto.MessageContextInfo.deviceListMetadata:type_name -> proto.DeviceListMetadata - 134, // 163: proto.MessageContextInfo.botMetadata:type_name -> proto.BotMetadata - 125, // 164: proto.VideoMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation - 130, // 165: proto.VideoMessage.contextInfo:type_name -> proto.ContextInfo - 32, // 166: proto.VideoMessage.gifAttribution:type_name -> proto.VideoMessage.Attribution - 125, // 167: proto.VideoMessage.annotations:type_name -> proto.InteractiveAnnotation - 130, // 168: proto.TemplateMessage.contextInfo:type_name -> proto.ContextInfo - 318, // 169: proto.TemplateMessage.hydratedTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate - 319, // 170: proto.TemplateMessage.fourRowTemplate:type_name -> proto.TemplateMessage.FourRowTemplate - 318, // 171: proto.TemplateMessage.hydratedFourRowTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate - 89, // 172: proto.TemplateMessage.interactiveMessageTemplate:type_name -> proto.InteractiveMessage - 130, // 173: proto.TemplateButtonReplyMessage.contextInfo:type_name -> proto.ContextInfo - 130, // 174: proto.StickerMessage.contextInfo:type_name -> proto.ContextInfo - 141, // 175: proto.SendPaymentMessage.noteMessage:type_name -> proto.Message - 195, // 176: proto.SendPaymentMessage.requestMessageKey:type_name -> proto.MessageKey - 139, // 177: proto.SendPaymentMessage.background:type_name -> proto.PaymentBackground - 195, // 178: proto.ScheduledCallEditMessage.key:type_name -> proto.MessageKey - 33, // 179: proto.ScheduledCallEditMessage.editType:type_name -> proto.ScheduledCallEditMessage.EditType - 34, // 180: proto.ScheduledCallCreationMessage.callType:type_name -> proto.ScheduledCallCreationMessage.CallType - 35, // 181: proto.RequestWelcomeMessageMetadata.localChatState:type_name -> proto.RequestWelcomeMessageMetadata.LocalChatState - 130, // 182: proto.RequestPhoneNumberMessage.contextInfo:type_name -> proto.ContextInfo - 141, // 183: proto.RequestPaymentMessage.noteMessage:type_name -> proto.Message - 140, // 184: proto.RequestPaymentMessage.amount:type_name -> proto.Money - 139, // 185: proto.RequestPaymentMessage.background:type_name -> proto.PaymentBackground - 195, // 186: proto.ReactionMessage.key:type_name -> proto.MessageKey - 195, // 187: proto.ProtocolMessage.key:type_name -> proto.MessageKey - 36, // 188: proto.ProtocolMessage.type:type_name -> proto.ProtocolMessage.Type - 92, // 189: proto.ProtocolMessage.historySyncNotification:type_name -> proto.HistorySyncNotification - 118, // 190: proto.ProtocolMessage.appStateSyncKeyShare:type_name -> proto.AppStateSyncKeyShare - 119, // 191: proto.ProtocolMessage.appStateSyncKeyRequest:type_name -> proto.AppStateSyncKeyRequest - 90, // 192: proto.ProtocolMessage.initialSecurityNotificationSettingSync:type_name -> proto.InitialSecurityNotificationSettingSync - 123, // 193: proto.ProtocolMessage.appStateFatalExceptionNotification:type_name -> proto.AppStateFatalExceptionNotification - 128, // 194: proto.ProtocolMessage.disappearingMode:type_name -> proto.DisappearingMode - 141, // 195: proto.ProtocolMessage.editedMessage:type_name -> proto.Message - 166, // 196: proto.ProtocolMessage.peerDataOperationRequestMessage:type_name -> proto.PeerDataOperationRequestMessage - 165, // 197: proto.ProtocolMessage.peerDataOperationRequestResponseMessage:type_name -> proto.PeerDataOperationRequestResponseMessage - 114, // 198: proto.ProtocolMessage.botFeedbackMessage:type_name -> proto.BotFeedbackMessage - 153, // 199: proto.ProtocolMessage.requestWelcomeMessageMetadata:type_name -> proto.RequestWelcomeMessageMetadata - 320, // 200: proto.ProductMessage.product:type_name -> proto.ProductMessage.ProductSnapshot - 321, // 201: proto.ProductMessage.catalog:type_name -> proto.ProductMessage.CatalogSnapshot - 130, // 202: proto.ProductMessage.contextInfo:type_name -> proto.ContextInfo - 195, // 203: proto.PollUpdateMessage.pollCreationMessageKey:type_name -> proto.MessageKey - 162, // 204: proto.PollUpdateMessage.vote:type_name -> proto.PollEncValue - 161, // 205: proto.PollUpdateMessage.metadata:type_name -> proto.PollUpdateMessageMetadata - 322, // 206: proto.PollCreationMessage.options:type_name -> proto.PollCreationMessage.Option - 130, // 207: proto.PollCreationMessage.contextInfo:type_name -> proto.ContextInfo - 195, // 208: proto.PinInChatMessage.key:type_name -> proto.MessageKey - 37, // 209: proto.PinInChatMessage.type:type_name -> proto.PinInChatMessage.Type - 2, // 210: proto.PeerDataOperationRequestResponseMessage.peerDataOperationRequestType:type_name -> proto.PeerDataOperationRequestType - 323, // 211: proto.PeerDataOperationRequestResponseMessage.peerDataOperationResult:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult - 2, // 212: proto.PeerDataOperationRequestMessage.peerDataOperationRequestType:type_name -> proto.PeerDataOperationRequestType - 328, // 213: proto.PeerDataOperationRequestMessage.requestStickerReupload:type_name -> proto.PeerDataOperationRequestMessage.RequestStickerReupload - 327, // 214: proto.PeerDataOperationRequestMessage.requestUrlPreview:type_name -> proto.PeerDataOperationRequestMessage.RequestUrlPreview - 330, // 215: proto.PeerDataOperationRequestMessage.historySyncOnDemandRequest:type_name -> proto.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest - 329, // 216: proto.PeerDataOperationRequestMessage.placeholderMessageResendRequest:type_name -> proto.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest - 38, // 217: proto.PaymentInviteMessage.serviceType:type_name -> proto.PaymentInviteMessage.ServiceType - 40, // 218: proto.OrderMessage.status:type_name -> proto.OrderMessage.OrderStatus - 39, // 219: proto.OrderMessage.surface:type_name -> proto.OrderMessage.OrderSurface - 130, // 220: proto.OrderMessage.contextInfo:type_name -> proto.ContextInfo - 195, // 221: proto.OrderMessage.orderRequestMessageId:type_name -> proto.MessageKey - 130, // 222: proto.MessageHistoryBundle.contextInfo:type_name -> proto.ContextInfo - 130, // 223: proto.LocationMessage.contextInfo:type_name -> proto.ContextInfo - 130, // 224: proto.LiveLocationMessage.contextInfo:type_name -> proto.ContextInfo - 41, // 225: proto.ListResponseMessage.listType:type_name -> proto.ListResponseMessage.ListType - 331, // 226: proto.ListResponseMessage.singleSelectReply:type_name -> proto.ListResponseMessage.SingleSelectReply - 130, // 227: proto.ListResponseMessage.contextInfo:type_name -> proto.ContextInfo - 42, // 228: proto.ListMessage.listType:type_name -> proto.ListMessage.ListType - 332, // 229: proto.ListMessage.sections:type_name -> proto.ListMessage.Section - 336, // 230: proto.ListMessage.productListInfo:type_name -> proto.ListMessage.ProductListInfo - 130, // 231: proto.ListMessage.contextInfo:type_name -> proto.ContextInfo - 195, // 232: proto.KeepInChatMessage.key:type_name -> proto.MessageKey - 1, // 233: proto.KeepInChatMessage.keepType:type_name -> proto.KeepType - 43, // 234: proto.InvoiceMessage.attachmentType:type_name -> proto.InvoiceMessage.AttachmentType - 339, // 235: proto.InteractiveResponseMessage.body:type_name -> proto.InteractiveResponseMessage.Body - 130, // 236: proto.InteractiveResponseMessage.contextInfo:type_name -> proto.ContextInfo - 338, // 237: proto.InteractiveResponseMessage.nativeFlowResponseMessage:type_name -> proto.InteractiveResponseMessage.NativeFlowResponseMessage - 184, // 238: proto.PastParticipants.pastParticipants:type_name -> proto.PastParticipant - 45, // 239: proto.PastParticipant.leaveReason:type_name -> proto.PastParticipant.LeaveReason - 46, // 240: proto.HistorySync.syncType:type_name -> proto.HistorySync.HistorySyncType - 190, // 241: proto.HistorySync.conversations:type_name -> proto.Conversation - 266, // 242: proto.HistorySync.statusV3Messages:type_name -> proto.WebMessageInfo - 181, // 243: proto.HistorySync.pushnames:type_name -> proto.Pushname - 189, // 244: proto.HistorySync.globalSettings:type_name -> proto.GlobalSettings - 180, // 245: proto.HistorySync.recentStickers:type_name -> proto.StickerMetadata - 183, // 246: proto.HistorySync.pastParticipants:type_name -> proto.PastParticipants - 254, // 247: proto.HistorySync.callLogRecords:type_name -> proto.CallLogRecord - 47, // 248: proto.HistorySync.aiWaitListState:type_name -> proto.HistorySync.BotAIWaitListState - 182, // 249: proto.HistorySync.phoneNumberToLidMappings:type_name -> proto.PhoneNumberToLIDMapping - 266, // 250: proto.HistorySyncMsg.message:type_name -> proto.WebMessageInfo - 48, // 251: proto.GroupParticipant.rank:type_name -> proto.GroupParticipant.Rank - 179, // 252: proto.GlobalSettings.lightThemeWallpaper:type_name -> proto.WallpaperSettings - 3, // 253: proto.GlobalSettings.mediaVisibility:type_name -> proto.MediaVisibility - 179, // 254: proto.GlobalSettings.darkThemeWallpaper:type_name -> proto.WallpaperSettings - 192, // 255: proto.GlobalSettings.autoDownloadWiFi:type_name -> proto.AutoDownloadSettings - 192, // 256: proto.GlobalSettings.autoDownloadCellular:type_name -> proto.AutoDownloadSettings - 192, // 257: proto.GlobalSettings.autoDownloadRoaming:type_name -> proto.AutoDownloadSettings - 191, // 258: proto.GlobalSettings.avatarUserSettings:type_name -> proto.AvatarUserSettings - 185, // 259: proto.GlobalSettings.individualNotificationSettings:type_name -> proto.NotificationSettings - 185, // 260: proto.GlobalSettings.groupNotificationSettings:type_name -> proto.NotificationSettings - 187, // 261: proto.Conversation.messages:type_name -> proto.HistorySyncMsg - 49, // 262: proto.Conversation.endOfHistoryTransferType:type_name -> proto.Conversation.EndOfHistoryTransferType - 128, // 263: proto.Conversation.disappearingMode:type_name -> proto.DisappearingMode - 188, // 264: proto.Conversation.participant:type_name -> proto.GroupParticipant - 179, // 265: proto.Conversation.wallpaper:type_name -> proto.WallpaperSettings - 3, // 266: proto.Conversation.mediaVisibility:type_name -> proto.MediaVisibility - 50, // 267: proto.MediaRetryNotification.result:type_name -> proto.MediaRetryNotification.ResultType - 196, // 268: proto.SyncdSnapshot.version:type_name -> proto.SyncdVersion - 199, // 269: proto.SyncdSnapshot.records:type_name -> proto.SyncdRecord - 204, // 270: proto.SyncdSnapshot.keyId:type_name -> proto.KeyId - 203, // 271: proto.SyncdRecord.index:type_name -> proto.SyncdIndex - 197, // 272: proto.SyncdRecord.value:type_name -> proto.SyncdValue - 204, // 273: proto.SyncdRecord.keyId:type_name -> proto.KeyId - 196, // 274: proto.SyncdPatch.version:type_name -> proto.SyncdVersion - 202, // 275: proto.SyncdPatch.mutations:type_name -> proto.SyncdMutation - 205, // 276: proto.SyncdPatch.externalMutations:type_name -> proto.ExternalBlobReference - 204, // 277: proto.SyncdPatch.keyId:type_name -> proto.KeyId - 206, // 278: proto.SyncdPatch.exitCode:type_name -> proto.ExitCode - 202, // 279: proto.SyncdMutations.mutations:type_name -> proto.SyncdMutation - 51, // 280: proto.SyncdMutation.operation:type_name -> proto.SyncdMutation.SyncdOperation - 199, // 281: proto.SyncdMutation.record:type_name -> proto.SyncdRecord - 216, // 282: proto.SyncActionValue.starAction:type_name -> proto.StarAction - 242, // 283: proto.SyncActionValue.contactAction:type_name -> proto.ContactAction - 229, // 284: proto.SyncActionValue.muteAction:type_name -> proto.MuteAction - 226, // 285: proto.SyncActionValue.pinAction:type_name -> proto.PinAction - 217, // 286: proto.SyncActionValue.securityNotificationSetting:type_name -> proto.SecurityNotificationSetting - 221, // 287: proto.SyncActionValue.pushNameSetting:type_name -> proto.PushNameSetting - 220, // 288: proto.SyncActionValue.quickReplyAction:type_name -> proto.QuickReplyAction - 219, // 289: proto.SyncActionValue.recentEmojiWeightsAction:type_name -> proto.RecentEmojiWeightsAction - 235, // 290: proto.SyncActionValue.labelEditAction:type_name -> proto.LabelEditAction - 236, // 291: proto.SyncActionValue.labelAssociationAction:type_name -> proto.LabelAssociationAction - 233, // 292: proto.SyncActionValue.localeSetting:type_name -> proto.LocaleSetting - 248, // 293: proto.SyncActionValue.archiveChatAction:type_name -> proto.ArchiveChatAction - 239, // 294: proto.SyncActionValue.deleteMessageForMeAction:type_name -> proto.DeleteMessageForMeAction - 237, // 295: proto.SyncActionValue.keyExpiration:type_name -> proto.KeyExpiration - 232, // 296: proto.SyncActionValue.markChatAsReadAction:type_name -> proto.MarkChatAsReadAction - 243, // 297: proto.SyncActionValue.clearChatAction:type_name -> proto.ClearChatAction - 241, // 298: proto.SyncActionValue.deleteChatAction:type_name -> proto.DeleteChatAction - 209, // 299: proto.SyncActionValue.unarchiveChatsSetting:type_name -> proto.UnarchiveChatsSetting - 224, // 300: proto.SyncActionValue.primaryFeature:type_name -> proto.PrimaryFeature - 249, // 301: proto.SyncActionValue.androidUnsupportedActions:type_name -> proto.AndroidUnsupportedActions - 250, // 302: proto.SyncActionValue.agentAction:type_name -> proto.AgentAction - 213, // 303: proto.SyncActionValue.subscriptionAction:type_name -> proto.SubscriptionAction - 208, // 304: proto.SyncActionValue.userStatusMuteAction:type_name -> proto.UserStatusMuteAction - 210, // 305: proto.SyncActionValue.timeFormatAction:type_name -> proto.TimeFormatAction - 228, // 306: proto.SyncActionValue.nuxAction:type_name -> proto.NuxAction - 223, // 307: proto.SyncActionValue.primaryVersionAction:type_name -> proto.PrimaryVersionAction - 214, // 308: proto.SyncActionValue.stickerAction:type_name -> proto.StickerAction - 218, // 309: proto.SyncActionValue.removeRecentStickerAction:type_name -> proto.RemoveRecentStickerAction - 245, // 310: proto.SyncActionValue.chatAssignment:type_name -> proto.ChatAssignmentAction - 244, // 311: proto.SyncActionValue.chatAssignmentOpenedStatus:type_name -> proto.ChatAssignmentOpenedStatusAction - 225, // 312: proto.SyncActionValue.pnForLidChatAction:type_name -> proto.PnForLidChatAction - 231, // 313: proto.SyncActionValue.marketingMessageAction:type_name -> proto.MarketingMessageAction - 230, // 314: proto.SyncActionValue.marketingMessageBroadcastAction:type_name -> proto.MarketingMessageBroadcastAction - 238, // 315: proto.SyncActionValue.externalWebBetaAction:type_name -> proto.ExternalWebBetaAction - 222, // 316: proto.SyncActionValue.privacySettingRelayAllCalls:type_name -> proto.PrivacySettingRelayAllCalls - 246, // 317: proto.SyncActionValue.callLogAction:type_name -> proto.CallLogAction - 215, // 318: proto.SyncActionValue.statusPrivacy:type_name -> proto.StatusPrivacyAction - 247, // 319: proto.SyncActionValue.botWelcomeRequestAction:type_name -> proto.BotWelcomeRequestAction - 240, // 320: proto.SyncActionValue.deleteIndividualCallLog:type_name -> proto.DeleteIndividualCallLogAction - 234, // 321: proto.SyncActionValue.labelReorderingAction:type_name -> proto.LabelReorderingAction - 227, // 322: proto.SyncActionValue.paymentInfoAction:type_name -> proto.PaymentInfoAction - 195, // 323: proto.SyncActionMessage.key:type_name -> proto.MessageKey - 211, // 324: proto.SyncActionMessageRange.messages:type_name -> proto.SyncActionMessage - 52, // 325: proto.StatusPrivacyAction.mode:type_name -> proto.StatusPrivacyAction.StatusDistributionMode - 252, // 326: proto.RecentEmojiWeightsAction.weights:type_name -> proto.RecentEmojiWeight - 53, // 327: proto.MarketingMessageAction.type:type_name -> proto.MarketingMessageAction.MarketingMessagePrototypeType - 212, // 328: proto.MarkChatAsReadAction.messageRange:type_name -> proto.SyncActionMessageRange - 212, // 329: proto.DeleteChatAction.messageRange:type_name -> proto.SyncActionMessageRange - 212, // 330: proto.ClearChatAction.messageRange:type_name -> proto.SyncActionMessageRange - 254, // 331: proto.CallLogAction.callLogRecord:type_name -> proto.CallLogRecord - 212, // 332: proto.ArchiveChatAction.messageRange:type_name -> proto.SyncActionMessageRange - 207, // 333: proto.SyncActionData.value:type_name -> proto.SyncActionValue - 54, // 334: proto.PatchDebugData.senderPlatform:type_name -> proto.PatchDebugData.Platform - 57, // 335: proto.CallLogRecord.callResult:type_name -> proto.CallLogRecord.CallResult - 55, // 336: proto.CallLogRecord.silenceReason:type_name -> proto.CallLogRecord.SilenceReason - 340, // 337: proto.CallLogRecord.participants:type_name -> proto.CallLogRecord.ParticipantInfo - 56, // 338: proto.CallLogRecord.callType:type_name -> proto.CallLogRecord.CallType - 58, // 339: proto.BizIdentityInfo.vlevel:type_name -> proto.BizIdentityInfo.VerifiedLevelValue - 255, // 340: proto.BizIdentityInfo.vnameCert:type_name -> proto.VerifiedNameCertificate - 59, // 341: proto.BizIdentityInfo.hostStorage:type_name -> proto.BizIdentityInfo.HostStorageType - 60, // 342: proto.BizIdentityInfo.actualActors:type_name -> proto.BizIdentityInfo.ActualActorsType - 255, // 343: proto.BizAccountPayload.vnameCert:type_name -> proto.VerifiedNameCertificate - 61, // 344: proto.BizAccountLinkInfo.hostStorage:type_name -> proto.BizAccountLinkInfo.HostStorageType - 62, // 345: proto.BizAccountLinkInfo.accountType:type_name -> proto.BizAccountLinkInfo.AccountType - 262, // 346: proto.HandshakeMessage.clientHello:type_name -> proto.HandshakeClientHello - 261, // 347: proto.HandshakeMessage.serverHello:type_name -> proto.HandshakeServerHello - 263, // 348: proto.HandshakeMessage.clientFinish:type_name -> proto.HandshakeClientFinish - 343, // 349: proto.ClientPayload.userAgent:type_name -> proto.ClientPayload.UserAgent - 342, // 350: proto.ClientPayload.webInfo:type_name -> proto.ClientPayload.WebInfo - 65, // 351: proto.ClientPayload.connectType:type_name -> proto.ClientPayload.ConnectType - 66, // 352: proto.ClientPayload.connectReason:type_name -> proto.ClientPayload.ConnectReason - 346, // 353: proto.ClientPayload.dnsSource:type_name -> proto.ClientPayload.DNSSource - 345, // 354: proto.ClientPayload.devicePairingData:type_name -> proto.ClientPayload.DevicePairingRegistrationData - 63, // 355: proto.ClientPayload.product:type_name -> proto.ClientPayload.Product - 64, // 356: proto.ClientPayload.iosAppExtension:type_name -> proto.ClientPayload.IOSAppExtension - 344, // 357: proto.ClientPayload.interopData:type_name -> proto.ClientPayload.InteropData - 266, // 358: proto.WebNotificationsInfo.notifyMessages:type_name -> proto.WebMessageInfo - 195, // 359: proto.WebMessageInfo.key:type_name -> proto.MessageKey - 141, // 360: proto.WebMessageInfo.message:type_name -> proto.Message - 73, // 361: proto.WebMessageInfo.status:type_name -> proto.WebMessageInfo.Status - 72, // 362: proto.WebMessageInfo.messageStubType:type_name -> proto.WebMessageInfo.StubType - 277, // 363: proto.WebMessageInfo.paymentInfo:type_name -> proto.PaymentInfo - 172, // 364: proto.WebMessageInfo.finalLiveLocation:type_name -> proto.LiveLocationMessage - 277, // 365: proto.WebMessageInfo.quotedPaymentInfo:type_name -> proto.PaymentInfo - 74, // 366: proto.WebMessageInfo.bizPrivacyStatus:type_name -> proto.WebMessageInfo.BizPrivacyStatus - 280, // 367: proto.WebMessageInfo.mediaData:type_name -> proto.MediaData - 276, // 368: proto.WebMessageInfo.photoChange:type_name -> proto.PhotoChange - 268, // 369: proto.WebMessageInfo.userReceipt:type_name -> proto.UserReceipt - 271, // 370: proto.WebMessageInfo.reactions:type_name -> proto.Reaction - 280, // 371: proto.WebMessageInfo.quotedStickerData:type_name -> proto.MediaData - 269, // 372: proto.WebMessageInfo.statusPsa:type_name -> proto.StatusPSA - 273, // 373: proto.WebMessageInfo.pollUpdates:type_name -> proto.PollUpdate - 274, // 374: proto.WebMessageInfo.pollAdditionalMetadata:type_name -> proto.PollAdditionalMetadata - 281, // 375: proto.WebMessageInfo.keepInChat:type_name -> proto.KeepInChat - 275, // 376: proto.WebMessageInfo.pinInChat:type_name -> proto.PinInChat - 272, // 377: proto.WebMessageInfo.premiumMessageInfo:type_name -> proto.PremiumMessageInfo - 283, // 378: proto.WebMessageInfo.commentMetadata:type_name -> proto.CommentMetadata - 282, // 379: proto.WebMessageInfo.eventResponses:type_name -> proto.EventResponse - 270, // 380: proto.WebMessageInfo.reportingTokenInfo:type_name -> proto.ReportingTokenInfo - 75, // 381: proto.WebFeatures.labelsDisplay:type_name -> proto.WebFeatures.Flag - 75, // 382: proto.WebFeatures.voipIndividualOutgoing:type_name -> proto.WebFeatures.Flag - 75, // 383: proto.WebFeatures.groupsV3:type_name -> proto.WebFeatures.Flag - 75, // 384: proto.WebFeatures.groupsV3Create:type_name -> proto.WebFeatures.Flag - 75, // 385: proto.WebFeatures.changeNumberV2:type_name -> proto.WebFeatures.Flag - 75, // 386: proto.WebFeatures.queryStatusV3Thumbnail:type_name -> proto.WebFeatures.Flag - 75, // 387: proto.WebFeatures.liveLocations:type_name -> proto.WebFeatures.Flag - 75, // 388: proto.WebFeatures.queryVname:type_name -> proto.WebFeatures.Flag - 75, // 389: proto.WebFeatures.voipIndividualIncoming:type_name -> proto.WebFeatures.Flag - 75, // 390: proto.WebFeatures.quickRepliesQuery:type_name -> proto.WebFeatures.Flag - 75, // 391: proto.WebFeatures.payments:type_name -> proto.WebFeatures.Flag - 75, // 392: proto.WebFeatures.stickerPackQuery:type_name -> proto.WebFeatures.Flag - 75, // 393: proto.WebFeatures.liveLocationsFinal:type_name -> proto.WebFeatures.Flag - 75, // 394: proto.WebFeatures.labelsEdit:type_name -> proto.WebFeatures.Flag - 75, // 395: proto.WebFeatures.mediaUpload:type_name -> proto.WebFeatures.Flag - 75, // 396: proto.WebFeatures.mediaUploadRichQuickReplies:type_name -> proto.WebFeatures.Flag - 75, // 397: proto.WebFeatures.vnameV2:type_name -> proto.WebFeatures.Flag - 75, // 398: proto.WebFeatures.videoPlaybackUrl:type_name -> proto.WebFeatures.Flag - 75, // 399: proto.WebFeatures.statusRanking:type_name -> proto.WebFeatures.Flag - 75, // 400: proto.WebFeatures.voipIndividualVideo:type_name -> proto.WebFeatures.Flag - 75, // 401: proto.WebFeatures.thirdPartyStickers:type_name -> proto.WebFeatures.Flag - 75, // 402: proto.WebFeatures.frequentlyForwardedSetting:type_name -> proto.WebFeatures.Flag - 75, // 403: proto.WebFeatures.groupsV4JoinPermission:type_name -> proto.WebFeatures.Flag - 75, // 404: proto.WebFeatures.recentStickers:type_name -> proto.WebFeatures.Flag - 75, // 405: proto.WebFeatures.catalog:type_name -> proto.WebFeatures.Flag - 75, // 406: proto.WebFeatures.starredStickers:type_name -> proto.WebFeatures.Flag - 75, // 407: proto.WebFeatures.voipGroupCall:type_name -> proto.WebFeatures.Flag - 75, // 408: proto.WebFeatures.templateMessage:type_name -> proto.WebFeatures.Flag - 75, // 409: proto.WebFeatures.templateMessageInteractivity:type_name -> proto.WebFeatures.Flag - 75, // 410: proto.WebFeatures.ephemeralMessages:type_name -> proto.WebFeatures.Flag - 75, // 411: proto.WebFeatures.e2ENotificationSync:type_name -> proto.WebFeatures.Flag - 75, // 412: proto.WebFeatures.recentStickersV2:type_name -> proto.WebFeatures.Flag - 75, // 413: proto.WebFeatures.recentStickersV3:type_name -> proto.WebFeatures.Flag - 75, // 414: proto.WebFeatures.userNotice:type_name -> proto.WebFeatures.Flag - 75, // 415: proto.WebFeatures.support:type_name -> proto.WebFeatures.Flag - 75, // 416: proto.WebFeatures.groupUiiCleanup:type_name -> proto.WebFeatures.Flag - 75, // 417: proto.WebFeatures.groupDogfoodingInternalOnly:type_name -> proto.WebFeatures.Flag - 75, // 418: proto.WebFeatures.settingsSync:type_name -> proto.WebFeatures.Flag - 75, // 419: proto.WebFeatures.archiveV2:type_name -> proto.WebFeatures.Flag - 75, // 420: proto.WebFeatures.ephemeralAllowGroupMembers:type_name -> proto.WebFeatures.Flag - 75, // 421: proto.WebFeatures.ephemeral24HDuration:type_name -> proto.WebFeatures.Flag - 75, // 422: proto.WebFeatures.mdForceUpgrade:type_name -> proto.WebFeatures.Flag - 75, // 423: proto.WebFeatures.disappearingMode:type_name -> proto.WebFeatures.Flag - 75, // 424: proto.WebFeatures.externalMdOptInAvailable:type_name -> proto.WebFeatures.Flag - 75, // 425: proto.WebFeatures.noDeleteMessageTimeLimit:type_name -> proto.WebFeatures.Flag - 195, // 426: proto.Reaction.key:type_name -> proto.MessageKey - 195, // 427: proto.PollUpdate.pollUpdateMessageKey:type_name -> proto.MessageKey - 159, // 428: proto.PollUpdate.vote:type_name -> proto.PollVoteMessage - 76, // 429: proto.PinInChat.type:type_name -> proto.PinInChat.Type - 195, // 430: proto.PinInChat.key:type_name -> proto.MessageKey - 279, // 431: proto.PinInChat.messageAddOnContextInfo:type_name -> proto.MessageAddOnContextInfo - 79, // 432: proto.PaymentInfo.currencyDeprecated:type_name -> proto.PaymentInfo.Currency - 78, // 433: proto.PaymentInfo.status:type_name -> proto.PaymentInfo.Status - 195, // 434: proto.PaymentInfo.requestMessageKey:type_name -> proto.MessageKey - 77, // 435: proto.PaymentInfo.txnStatus:type_name -> proto.PaymentInfo.TxnStatus - 140, // 436: proto.PaymentInfo.primaryAmount:type_name -> proto.Money - 140, // 437: proto.PaymentInfo.exchangeAmount:type_name -> proto.Money - 195, // 438: proto.NotificationMessageInfo.key:type_name -> proto.MessageKey - 141, // 439: proto.NotificationMessageInfo.message:type_name -> proto.Message - 1, // 440: proto.KeepInChat.keepType:type_name -> proto.KeepType - 195, // 441: proto.KeepInChat.key:type_name -> proto.MessageKey - 195, // 442: proto.EventResponse.eventResponseMessageKey:type_name -> proto.MessageKey - 97, // 443: proto.EventResponse.eventResponseMessage:type_name -> proto.EventResponseMessage - 195, // 444: proto.CommentMetadata.commentParentKey:type_name -> proto.MessageKey - 350, // 445: proto.CertChain.leaf:type_name -> proto.CertChain.NoiseCertificate - 350, // 446: proto.CertChain.intermediate:type_name -> proto.CertChain.NoiseCertificate - 5, // 447: proto.InteractiveMessage.ShopMessage.surface:type_name -> proto.InteractiveMessage.ShopMessage.Surface - 296, // 448: proto.InteractiveMessage.NativeFlowMessage.buttons:type_name -> proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton - 102, // 449: proto.InteractiveMessage.Header.documentMessage:type_name -> proto.DocumentMessage - 91, // 450: proto.InteractiveMessage.Header.imageMessage:type_name -> proto.ImageMessage - 144, // 451: proto.InteractiveMessage.Header.videoMessage:type_name -> proto.VideoMessage - 171, // 452: proto.InteractiveMessage.Header.locationMessage:type_name -> proto.LocationMessage - 89, // 453: proto.InteractiveMessage.CarouselMessage.cards:type_name -> proto.InteractiveMessage - 299, // 454: proto.HighlyStructuredMessage.HSMLocalizableParameter.currency:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency - 298, // 455: proto.HighlyStructuredMessage.HSMLocalizableParameter.dateTime:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime - 301, // 456: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.component:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent - 300, // 457: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.unixEpoch:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch - 7, // 458: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.dayOfWeek:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType - 8, // 459: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.calendar:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType - 15, // 460: proto.CallLogMessage.CallParticipant.callOutcome:type_name -> proto.CallLogMessage.CallOutcome - 305, // 461: proto.ButtonsMessage.Button.buttonText:type_name -> proto.ButtonsMessage.Button.ButtonText - 18, // 462: proto.ButtonsMessage.Button.type:type_name -> proto.ButtonsMessage.Button.Type - 304, // 463: proto.ButtonsMessage.Button.nativeFlowInfo:type_name -> proto.ButtonsMessage.Button.NativeFlowInfo - 23, // 464: proto.HydratedTemplateButton.HydratedURLButton.webviewPresentation:type_name -> proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType - 26, // 465: proto.ContextInfo.ExternalAdReplyInfo.mediaType:type_name -> proto.ContextInfo.ExternalAdReplyInfo.MediaType - 27, // 466: proto.ContextInfo.AdReplyInfo.mediaType:type_name -> proto.ContextInfo.AdReplyInfo.MediaType - 93, // 467: proto.TemplateButton.URLButton.displayText:type_name -> proto.HighlyStructuredMessage - 93, // 468: proto.TemplateButton.URLButton.url:type_name -> proto.HighlyStructuredMessage - 93, // 469: proto.TemplateButton.QuickReplyButton.displayText:type_name -> proto.HighlyStructuredMessage - 93, // 470: proto.TemplateButton.CallButton.displayText:type_name -> proto.HighlyStructuredMessage - 93, // 471: proto.TemplateButton.CallButton.phoneNumber:type_name -> proto.HighlyStructuredMessage - 126, // 472: proto.TemplateMessage.HydratedFourRowTemplate.hydratedButtons:type_name -> proto.HydratedTemplateButton - 102, // 473: proto.TemplateMessage.HydratedFourRowTemplate.documentMessage:type_name -> proto.DocumentMessage - 91, // 474: proto.TemplateMessage.HydratedFourRowTemplate.imageMessage:type_name -> proto.ImageMessage - 144, // 475: proto.TemplateMessage.HydratedFourRowTemplate.videoMessage:type_name -> proto.VideoMessage - 171, // 476: proto.TemplateMessage.HydratedFourRowTemplate.locationMessage:type_name -> proto.LocationMessage - 93, // 477: proto.TemplateMessage.FourRowTemplate.content:type_name -> proto.HighlyStructuredMessage - 93, // 478: proto.TemplateMessage.FourRowTemplate.footer:type_name -> proto.HighlyStructuredMessage - 137, // 479: proto.TemplateMessage.FourRowTemplate.buttons:type_name -> proto.TemplateButton - 102, // 480: proto.TemplateMessage.FourRowTemplate.documentMessage:type_name -> proto.DocumentMessage - 93, // 481: proto.TemplateMessage.FourRowTemplate.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage - 91, // 482: proto.TemplateMessage.FourRowTemplate.imageMessage:type_name -> proto.ImageMessage - 144, // 483: proto.TemplateMessage.FourRowTemplate.videoMessage:type_name -> proto.VideoMessage - 171, // 484: proto.TemplateMessage.FourRowTemplate.locationMessage:type_name -> proto.LocationMessage - 91, // 485: proto.ProductMessage.ProductSnapshot.productImage:type_name -> proto.ImageMessage - 91, // 486: proto.ProductMessage.CatalogSnapshot.catalogImage:type_name -> proto.ImageMessage - 50, // 487: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.mediaUploadResult:type_name -> proto.MediaRetryNotification.ResultType - 148, // 488: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.stickerMessage:type_name -> proto.StickerMessage - 325, // 489: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.linkPreviewResponse:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse - 324, // 490: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.placeholderMessageResendResponse:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse - 326, // 491: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.hqThumbnail:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail - 195, // 492: proto.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.messageKey:type_name -> proto.MessageKey - 333, // 493: proto.ListMessage.Section.rows:type_name -> proto.ListMessage.Row - 334, // 494: proto.ListMessage.ProductSection.products:type_name -> proto.ListMessage.Product - 335, // 495: proto.ListMessage.ProductListInfo.productSections:type_name -> proto.ListMessage.ProductSection - 337, // 496: proto.ListMessage.ProductListInfo.headerImage:type_name -> proto.ListMessage.ProductListHeaderImage - 44, // 497: proto.InteractiveResponseMessage.Body.format:type_name -> proto.InteractiveResponseMessage.Body.Format - 57, // 498: proto.CallLogRecord.ParticipantInfo.callResult:type_name -> proto.CallLogRecord.CallResult - 256, // 499: proto.VerifiedNameCertificate.Details.localizedNames:type_name -> proto.LocalizedName - 347, // 500: proto.ClientPayload.WebInfo.webdPayload:type_name -> proto.ClientPayload.WebInfo.WebdPayload - 67, // 501: proto.ClientPayload.WebInfo.webSubPlatform:type_name -> proto.ClientPayload.WebInfo.WebSubPlatform - 69, // 502: proto.ClientPayload.UserAgent.platform:type_name -> proto.ClientPayload.UserAgent.Platform - 348, // 503: proto.ClientPayload.UserAgent.appVersion:type_name -> proto.ClientPayload.UserAgent.AppVersion - 68, // 504: proto.ClientPayload.UserAgent.releaseChannel:type_name -> proto.ClientPayload.UserAgent.ReleaseChannel - 70, // 505: proto.ClientPayload.UserAgent.deviceType:type_name -> proto.ClientPayload.UserAgent.DeviceType - 71, // 506: proto.ClientPayload.DNSSource.dnsMethod:type_name -> proto.ClientPayload.DNSSource.DNSResolutionMethod - 353, // 507: proto.QP.Filter.parameters:type_name -> proto.QP.FilterParameters - 80, // 508: proto.QP.Filter.filterResult:type_name -> proto.QP.FilterResult - 81, // 509: proto.QP.Filter.clientNotSupportedConfig:type_name -> proto.QP.FilterClientNotSupportedConfig - 82, // 510: proto.QP.FilterClause.clauseType:type_name -> proto.QP.ClauseType - 354, // 511: proto.QP.FilterClause.clauses:type_name -> proto.QP.FilterClause - 352, // 512: proto.QP.FilterClause.filters:type_name -> proto.QP.Filter - 513, // [513:513] is the sub-list for method output_type - 513, // [513:513] is the sub-list for method input_type - 513, // [513:513] is the sub-list for extension type_name - 513, // [513:513] is the sub-list for extension extendee - 0, // [0:513] is the sub-list for field type_name + 294, // 6: proto.DeviceProps.historySyncConfig:type_name -> proto.DeviceProps.HistorySyncConfig + 127, // 7: proto.ImageMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation + 132, // 8: proto.ImageMessage.contextInfo:type_name -> proto.ContextInfo + 127, // 9: proto.ImageMessage.annotations:type_name -> proto.InteractiveAnnotation + 5, // 10: proto.HistorySyncNotification.syncType:type_name -> proto.HistorySyncNotification.HistorySyncType + 296, // 11: proto.HighlyStructuredMessage.localizableParams:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter + 147, // 12: proto.HighlyStructuredMessage.hydratedHsm:type_name -> proto.TemplateMessage + 132, // 13: proto.GroupInviteMessage.contextInfo:type_name -> proto.ContextInfo + 8, // 14: proto.GroupInviteMessage.groupType:type_name -> proto.GroupInviteMessage.GroupType + 143, // 15: proto.FutureProofMessage.message:type_name -> proto.Message + 199, // 16: proto.ExtendedTextMessageWithParentKey.key:type_name -> proto.MessageKey + 97, // 17: proto.ExtendedTextMessageWithParentKey.extendedTextMessage:type_name -> proto.ExtendedTextMessage + 11, // 18: proto.ExtendedTextMessage.font:type_name -> proto.ExtendedTextMessage.FontType + 9, // 19: proto.ExtendedTextMessage.previewType:type_name -> proto.ExtendedTextMessage.PreviewType + 132, // 20: proto.ExtendedTextMessage.contextInfo:type_name -> proto.ContextInfo + 10, // 21: proto.ExtendedTextMessage.inviteLinkGroupType:type_name -> proto.ExtendedTextMessage.InviteLinkGroupType + 10, // 22: proto.ExtendedTextMessage.inviteLinkGroupTypeV2:type_name -> proto.ExtendedTextMessage.InviteLinkGroupType + 12, // 23: proto.EventResponseMessage.response:type_name -> proto.EventResponseMessage.EventResponseType + 132, // 24: proto.EventMessage.contextInfo:type_name -> proto.ContextInfo + 174, // 25: proto.EventMessage.location:type_name -> proto.LocationMessage + 199, // 26: proto.EncReactionMessage.targetMessageKey:type_name -> proto.MessageKey + 199, // 27: proto.EncEventResponseMessage.eventCreationMessageKey:type_name -> proto.MessageKey + 199, // 28: proto.EncCommentMessage.targetMessageKey:type_name -> proto.MessageKey + 132, // 29: proto.DocumentMessage.contextInfo:type_name -> proto.ContextInfo + 143, // 30: proto.DeviceSentMessage.message:type_name -> proto.Message + 199, // 31: proto.DeclinePaymentRequestMessage.key:type_name -> proto.MessageKey + 107, // 32: proto.ContactsArrayMessage.contacts:type_name -> proto.ContactMessage + 132, // 33: proto.ContactsArrayMessage.contextInfo:type_name -> proto.ContextInfo + 132, // 34: proto.ContactMessage.contextInfo:type_name -> proto.ContextInfo + 143, // 35: proto.CommentMessage.message:type_name -> proto.Message + 199, // 36: proto.CommentMessage.targetMessageKey:type_name -> proto.MessageKey + 199, // 37: proto.CancelPaymentRequestMessage.key:type_name -> proto.MessageKey + 14, // 38: proto.CallLogMessage.callOutcome:type_name -> proto.CallLogMessage.CallOutcome + 13, // 39: proto.CallLogMessage.callType:type_name -> proto.CallLogMessage.CallType + 301, // 40: proto.CallLogMessage.participants:type_name -> proto.CallLogMessage.CallParticipant + 132, // 41: proto.ButtonsResponseMessage.contextInfo:type_name -> proto.ContextInfo + 15, // 42: proto.ButtonsResponseMessage.type:type_name -> proto.ButtonsResponseMessage.Type + 132, // 43: proto.ButtonsMessage.contextInfo:type_name -> proto.ContextInfo + 302, // 44: proto.ButtonsMessage.buttons:type_name -> proto.ButtonsMessage.Button + 16, // 45: proto.ButtonsMessage.headerType:type_name -> proto.ButtonsMessage.HeaderType + 103, // 46: proto.ButtonsMessage.documentMessage:type_name -> proto.DocumentMessage + 91, // 47: proto.ButtonsMessage.imageMessage:type_name -> proto.ImageMessage + 146, // 48: proto.ButtonsMessage.videoMessage:type_name -> proto.VideoMessage + 174, // 49: proto.ButtonsMessage.locationMessage:type_name -> proto.LocationMessage + 199, // 50: proto.BotFeedbackMessage.messageKey:type_name -> proto.MessageKey + 20, // 51: proto.BotFeedbackMessage.kind:type_name -> proto.BotFeedbackMessage.BotFeedbackKind + 21, // 52: proto.BCallMessage.mediaType:type_name -> proto.BCallMessage.MediaType + 132, // 53: proto.AudioMessage.contextInfo:type_name -> proto.ContextInfo + 121, // 54: proto.AppStateSyncKey.keyId:type_name -> proto.AppStateSyncKeyId + 123, // 55: proto.AppStateSyncKey.keyData:type_name -> proto.AppStateSyncKeyData + 118, // 56: proto.AppStateSyncKeyShare.keys:type_name -> proto.AppStateSyncKey + 121, // 57: proto.AppStateSyncKeyRequest.keyIds:type_name -> proto.AppStateSyncKeyId + 122, // 58: proto.AppStateSyncKeyData.fingerprint:type_name -> proto.AppStateSyncKeyFingerprint + 140, // 59: proto.InteractiveAnnotation.polygonVertices:type_name -> proto.Point + 126, // 60: proto.InteractiveAnnotation.location:type_name -> proto.Location + 133, // 61: proto.InteractiveAnnotation.newsletter:type_name -> proto.ForwardedNewsletterMessageInfo + 306, // 62: proto.HydratedTemplateButton.quickReplyButton:type_name -> proto.HydratedTemplateButton.HydratedQuickReplyButton + 305, // 63: proto.HydratedTemplateButton.urlButton:type_name -> proto.HydratedTemplateButton.HydratedURLButton + 307, // 64: proto.HydratedTemplateButton.callButton:type_name -> proto.HydratedTemplateButton.HydratedCallButton + 24, // 65: proto.DisappearingMode.initiator:type_name -> proto.DisappearingMode.Initiator + 23, // 66: proto.DisappearingMode.trigger:type_name -> proto.DisappearingMode.Trigger + 0, // 67: proto.DeviceListMetadata.senderAccountType:type_name -> proto.ADVEncryptionType + 0, // 68: proto.DeviceListMetadata.receiverAccountType:type_name -> proto.ADVEncryptionType + 143, // 69: proto.ContextInfo.quotedMessage:type_name -> proto.Message + 312, // 70: proto.ContextInfo.quotedAd:type_name -> proto.ContextInfo.AdReplyInfo + 199, // 71: proto.ContextInfo.placeholderKey:type_name -> proto.MessageKey + 309, // 72: proto.ContextInfo.externalAdReply:type_name -> proto.ContextInfo.ExternalAdReplyInfo + 130, // 73: proto.ContextInfo.disappearingMode:type_name -> proto.DisappearingMode + 138, // 74: proto.ContextInfo.actionLink:type_name -> proto.ActionLink + 129, // 75: proto.ContextInfo.groupMentions:type_name -> proto.GroupMention + 308, // 76: proto.ContextInfo.utm:type_name -> proto.ContextInfo.UTMInfo + 133, // 77: proto.ContextInfo.forwardedNewsletterMessageInfo:type_name -> proto.ForwardedNewsletterMessageInfo + 311, // 78: proto.ContextInfo.businessMessageForwardInfo:type_name -> proto.ContextInfo.BusinessMessageForwardInfo + 310, // 79: proto.ContextInfo.dataSharingContext:type_name -> proto.ContextInfo.DataSharingContext + 27, // 80: proto.ForwardedNewsletterMessageInfo.contentType:type_name -> proto.ForwardedNewsletterMessageInfo.ContentType + 28, // 81: proto.BotPluginMetadata.provider:type_name -> proto.BotPluginMetadata.SearchProvider + 29, // 82: proto.BotPluginMetadata.pluginType:type_name -> proto.BotPluginMetadata.PluginType + 137, // 83: proto.BotMetadata.avatarMetadata:type_name -> proto.BotAvatarMetadata + 135, // 84: proto.BotMetadata.pluginMetadata:type_name -> proto.BotPluginMetadata + 134, // 85: proto.BotMetadata.suggestedPromptMetadata:type_name -> proto.BotSuggestedPromptMetadata + 314, // 86: proto.TemplateButton.quickReplyButton:type_name -> proto.TemplateButton.QuickReplyButton + 313, // 87: proto.TemplateButton.urlButton:type_name -> proto.TemplateButton.URLButton + 315, // 88: proto.TemplateButton.callButton:type_name -> proto.TemplateButton.CallButton + 316, // 89: proto.PaymentBackground.mediaData:type_name -> proto.PaymentBackground.MediaData + 30, // 90: proto.PaymentBackground.type:type_name -> proto.PaymentBackground.Type + 151, // 91: proto.Message.senderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage + 91, // 92: proto.Message.imageMessage:type_name -> proto.ImageMessage + 107, // 93: proto.Message.contactMessage:type_name -> proto.ContactMessage + 174, // 94: proto.Message.locationMessage:type_name -> proto.LocationMessage + 97, // 95: proto.Message.extendedTextMessage:type_name -> proto.ExtendedTextMessage + 103, // 96: proto.Message.documentMessage:type_name -> proto.DocumentMessage + 117, // 97: proto.Message.audioMessage:type_name -> proto.AudioMessage + 146, // 98: proto.Message.videoMessage:type_name -> proto.VideoMessage + 111, // 99: proto.Message.call:type_name -> proto.Call + 109, // 100: proto.Message.chat:type_name -> proto.Chat + 159, // 101: proto.Message.protocolMessage:type_name -> proto.ProtocolMessage + 106, // 102: proto.Message.contactsArrayMessage:type_name -> proto.ContactsArrayMessage + 93, // 103: proto.Message.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage + 151, // 104: proto.Message.fastRatchetKeySenderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage + 152, // 105: proto.Message.sendPaymentMessage:type_name -> proto.SendPaymentMessage + 175, // 106: proto.Message.liveLocationMessage:type_name -> proto.LiveLocationMessage + 157, // 107: proto.Message.requestPaymentMessage:type_name -> proto.RequestPaymentMessage + 105, // 108: proto.Message.declinePaymentRequestMessage:type_name -> proto.DeclinePaymentRequestMessage + 110, // 109: proto.Message.cancelPaymentRequestMessage:type_name -> proto.CancelPaymentRequestMessage + 147, // 110: proto.Message.templateMessage:type_name -> proto.TemplateMessage + 150, // 111: proto.Message.stickerMessage:type_name -> proto.StickerMessage + 94, // 112: proto.Message.groupInviteMessage:type_name -> proto.GroupInviteMessage + 148, // 113: proto.Message.templateButtonReplyMessage:type_name -> proto.TemplateButtonReplyMessage + 160, // 114: proto.Message.productMessage:type_name -> proto.ProductMessage + 104, // 115: proto.Message.deviceSentMessage:type_name -> proto.DeviceSentMessage + 145, // 116: proto.Message.messageContextInfo:type_name -> proto.MessageContextInfo + 177, // 117: proto.Message.listMessage:type_name -> proto.ListMessage + 95, // 118: proto.Message.viewOnceMessage:type_name -> proto.FutureProofMessage + 171, // 119: proto.Message.orderMessage:type_name -> proto.OrderMessage + 176, // 120: proto.Message.listResponseMessage:type_name -> proto.ListResponseMessage + 95, // 121: proto.Message.ephemeralMessage:type_name -> proto.FutureProofMessage + 179, // 122: proto.Message.invoiceMessage:type_name -> proto.InvoiceMessage + 114, // 123: proto.Message.buttonsMessage:type_name -> proto.ButtonsMessage + 113, // 124: proto.Message.buttonsResponseMessage:type_name -> proto.ButtonsResponseMessage + 170, // 125: proto.Message.paymentInviteMessage:type_name -> proto.PaymentInviteMessage + 181, // 126: proto.Message.interactiveMessage:type_name -> proto.InteractiveMessage + 158, // 127: proto.Message.reactionMessage:type_name -> proto.ReactionMessage + 149, // 128: proto.Message.stickerSyncRmrMessage:type_name -> proto.StickerSyncRMRMessage + 180, // 129: proto.Message.interactiveResponseMessage:type_name -> proto.InteractiveResponseMessage + 165, // 130: proto.Message.pollCreationMessage:type_name -> proto.PollCreationMessage + 162, // 131: proto.Message.pollUpdateMessage:type_name -> proto.PollUpdateMessage + 178, // 132: proto.Message.keepInChatMessage:type_name -> proto.KeepInChatMessage + 95, // 133: proto.Message.documentWithCaptionMessage:type_name -> proto.FutureProofMessage + 156, // 134: proto.Message.requestPhoneNumberMessage:type_name -> proto.RequestPhoneNumberMessage + 95, // 135: proto.Message.viewOnceMessageV2:type_name -> proto.FutureProofMessage + 100, // 136: proto.Message.encReactionMessage:type_name -> proto.EncReactionMessage + 95, // 137: proto.Message.editedMessage:type_name -> proto.FutureProofMessage + 95, // 138: proto.Message.viewOnceMessageV2Extension:type_name -> proto.FutureProofMessage + 165, // 139: proto.Message.pollCreationMessageV2:type_name -> proto.PollCreationMessage + 154, // 140: proto.Message.scheduledCallCreationMessage:type_name -> proto.ScheduledCallCreationMessage + 95, // 141: proto.Message.groupMentionedMessage:type_name -> proto.FutureProofMessage + 167, // 142: proto.Message.pinInChatMessage:type_name -> proto.PinInChatMessage + 165, // 143: proto.Message.pollCreationMessageV3:type_name -> proto.PollCreationMessage + 153, // 144: proto.Message.scheduledCallEditMessage:type_name -> proto.ScheduledCallEditMessage + 146, // 145: proto.Message.ptvMessage:type_name -> proto.VideoMessage + 95, // 146: proto.Message.botInvokeMessage:type_name -> proto.FutureProofMessage + 112, // 147: proto.Message.callLogMesssage:type_name -> proto.CallLogMessage + 173, // 148: proto.Message.messageHistoryBundle:type_name -> proto.MessageHistoryBundle + 102, // 149: proto.Message.encCommentMessage:type_name -> proto.EncCommentMessage + 116, // 150: proto.Message.bcallMessage:type_name -> proto.BCallMessage + 95, // 151: proto.Message.lottieStickerMessage:type_name -> proto.FutureProofMessage + 99, // 152: proto.Message.eventMessage:type_name -> proto.EventMessage + 101, // 153: proto.Message.encEventResponseMessage:type_name -> proto.EncEventResponseMessage + 108, // 154: proto.Message.commentMessage:type_name -> proto.CommentMessage + 172, // 155: proto.Message.newsletterAdminInviteMessage:type_name -> proto.NewsletterAdminInviteMessage + 96, // 156: proto.Message.extendedTextMessageWithParentKey:type_name -> proto.ExtendedTextMessageWithParentKey + 166, // 157: proto.Message.placeholderMessage:type_name -> proto.PlaceholderMessage + 131, // 158: proto.MessageContextInfo.deviceListMetadata:type_name -> proto.DeviceListMetadata + 136, // 159: proto.MessageContextInfo.botMetadata:type_name -> proto.BotMetadata + 127, // 160: proto.VideoMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation + 132, // 161: proto.VideoMessage.contextInfo:type_name -> proto.ContextInfo + 31, // 162: proto.VideoMessage.gifAttribution:type_name -> proto.VideoMessage.Attribution + 127, // 163: proto.VideoMessage.annotations:type_name -> proto.InteractiveAnnotation + 132, // 164: proto.TemplateMessage.contextInfo:type_name -> proto.ContextInfo + 317, // 165: proto.TemplateMessage.hydratedTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate + 318, // 166: proto.TemplateMessage.fourRowTemplate:type_name -> proto.TemplateMessage.FourRowTemplate + 317, // 167: proto.TemplateMessage.hydratedFourRowTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate + 181, // 168: proto.TemplateMessage.interactiveMessageTemplate:type_name -> proto.InteractiveMessage + 132, // 169: proto.TemplateButtonReplyMessage.contextInfo:type_name -> proto.ContextInfo + 132, // 170: proto.StickerMessage.contextInfo:type_name -> proto.ContextInfo + 143, // 171: proto.SendPaymentMessage.noteMessage:type_name -> proto.Message + 199, // 172: proto.SendPaymentMessage.requestMessageKey:type_name -> proto.MessageKey + 141, // 173: proto.SendPaymentMessage.background:type_name -> proto.PaymentBackground + 199, // 174: proto.ScheduledCallEditMessage.key:type_name -> proto.MessageKey + 32, // 175: proto.ScheduledCallEditMessage.editType:type_name -> proto.ScheduledCallEditMessage.EditType + 33, // 176: proto.ScheduledCallCreationMessage.callType:type_name -> proto.ScheduledCallCreationMessage.CallType + 34, // 177: proto.RequestWelcomeMessageMetadata.localChatState:type_name -> proto.RequestWelcomeMessageMetadata.LocalChatState + 132, // 178: proto.RequestPhoneNumberMessage.contextInfo:type_name -> proto.ContextInfo + 143, // 179: proto.RequestPaymentMessage.noteMessage:type_name -> proto.Message + 142, // 180: proto.RequestPaymentMessage.amount:type_name -> proto.Money + 141, // 181: proto.RequestPaymentMessage.background:type_name -> proto.PaymentBackground + 199, // 182: proto.ReactionMessage.key:type_name -> proto.MessageKey + 199, // 183: proto.ProtocolMessage.key:type_name -> proto.MessageKey + 35, // 184: proto.ProtocolMessage.type:type_name -> proto.ProtocolMessage.Type + 92, // 185: proto.ProtocolMessage.historySyncNotification:type_name -> proto.HistorySyncNotification + 119, // 186: proto.ProtocolMessage.appStateSyncKeyShare:type_name -> proto.AppStateSyncKeyShare + 120, // 187: proto.ProtocolMessage.appStateSyncKeyRequest:type_name -> proto.AppStateSyncKeyRequest + 90, // 188: proto.ProtocolMessage.initialSecurityNotificationSettingSync:type_name -> proto.InitialSecurityNotificationSettingSync + 124, // 189: proto.ProtocolMessage.appStateFatalExceptionNotification:type_name -> proto.AppStateFatalExceptionNotification + 130, // 190: proto.ProtocolMessage.disappearingMode:type_name -> proto.DisappearingMode + 143, // 191: proto.ProtocolMessage.editedMessage:type_name -> proto.Message + 169, // 192: proto.ProtocolMessage.peerDataOperationRequestMessage:type_name -> proto.PeerDataOperationRequestMessage + 168, // 193: proto.ProtocolMessage.peerDataOperationRequestResponseMessage:type_name -> proto.PeerDataOperationRequestResponseMessage + 115, // 194: proto.ProtocolMessage.botFeedbackMessage:type_name -> proto.BotFeedbackMessage + 155, // 195: proto.ProtocolMessage.requestWelcomeMessageMetadata:type_name -> proto.RequestWelcomeMessageMetadata + 125, // 196: proto.ProtocolMessage.mediaNotifyMessage:type_name -> proto.MediaNotifyMessage + 319, // 197: proto.ProductMessage.product:type_name -> proto.ProductMessage.ProductSnapshot + 320, // 198: proto.ProductMessage.catalog:type_name -> proto.ProductMessage.CatalogSnapshot + 132, // 199: proto.ProductMessage.contextInfo:type_name -> proto.ContextInfo + 199, // 200: proto.PollUpdateMessage.pollCreationMessageKey:type_name -> proto.MessageKey + 164, // 201: proto.PollUpdateMessage.vote:type_name -> proto.PollEncValue + 163, // 202: proto.PollUpdateMessage.metadata:type_name -> proto.PollUpdateMessageMetadata + 321, // 203: proto.PollCreationMessage.options:type_name -> proto.PollCreationMessage.Option + 132, // 204: proto.PollCreationMessage.contextInfo:type_name -> proto.ContextInfo + 36, // 205: proto.PlaceholderMessage.type:type_name -> proto.PlaceholderMessage.PlaceholderType + 199, // 206: proto.PinInChatMessage.key:type_name -> proto.MessageKey + 37, // 207: proto.PinInChatMessage.type:type_name -> proto.PinInChatMessage.Type + 2, // 208: proto.PeerDataOperationRequestResponseMessage.peerDataOperationRequestType:type_name -> proto.PeerDataOperationRequestType + 322, // 209: proto.PeerDataOperationRequestResponseMessage.peerDataOperationResult:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + 2, // 210: proto.PeerDataOperationRequestMessage.peerDataOperationRequestType:type_name -> proto.PeerDataOperationRequestType + 327, // 211: proto.PeerDataOperationRequestMessage.requestStickerReupload:type_name -> proto.PeerDataOperationRequestMessage.RequestStickerReupload + 326, // 212: proto.PeerDataOperationRequestMessage.requestUrlPreview:type_name -> proto.PeerDataOperationRequestMessage.RequestUrlPreview + 329, // 213: proto.PeerDataOperationRequestMessage.historySyncOnDemandRequest:type_name -> proto.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest + 328, // 214: proto.PeerDataOperationRequestMessage.placeholderMessageResendRequest:type_name -> proto.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest + 38, // 215: proto.PaymentInviteMessage.serviceType:type_name -> proto.PaymentInviteMessage.ServiceType + 40, // 216: proto.OrderMessage.status:type_name -> proto.OrderMessage.OrderStatus + 39, // 217: proto.OrderMessage.surface:type_name -> proto.OrderMessage.OrderSurface + 132, // 218: proto.OrderMessage.contextInfo:type_name -> proto.ContextInfo + 199, // 219: proto.OrderMessage.orderRequestMessageId:type_name -> proto.MessageKey + 132, // 220: proto.MessageHistoryBundle.contextInfo:type_name -> proto.ContextInfo + 132, // 221: proto.LocationMessage.contextInfo:type_name -> proto.ContextInfo + 132, // 222: proto.LiveLocationMessage.contextInfo:type_name -> proto.ContextInfo + 41, // 223: proto.ListResponseMessage.listType:type_name -> proto.ListResponseMessage.ListType + 330, // 224: proto.ListResponseMessage.singleSelectReply:type_name -> proto.ListResponseMessage.SingleSelectReply + 132, // 225: proto.ListResponseMessage.contextInfo:type_name -> proto.ContextInfo + 42, // 226: proto.ListMessage.listType:type_name -> proto.ListMessage.ListType + 331, // 227: proto.ListMessage.sections:type_name -> proto.ListMessage.Section + 335, // 228: proto.ListMessage.productListInfo:type_name -> proto.ListMessage.ProductListInfo + 132, // 229: proto.ListMessage.contextInfo:type_name -> proto.ContextInfo + 199, // 230: proto.KeepInChatMessage.key:type_name -> proto.MessageKey + 1, // 231: proto.KeepInChatMessage.keepType:type_name -> proto.KeepType + 43, // 232: proto.InvoiceMessage.attachmentType:type_name -> proto.InvoiceMessage.AttachmentType + 338, // 233: proto.InteractiveResponseMessage.body:type_name -> proto.InteractiveResponseMessage.Body + 132, // 234: proto.InteractiveResponseMessage.contextInfo:type_name -> proto.ContextInfo + 337, // 235: proto.InteractiveResponseMessage.nativeFlowResponseMessage:type_name -> proto.InteractiveResponseMessage.NativeFlowResponseMessage + 340, // 236: proto.InteractiveMessage.header:type_name -> proto.InteractiveMessage.Header + 344, // 237: proto.InteractiveMessage.body:type_name -> proto.InteractiveMessage.Body + 341, // 238: proto.InteractiveMessage.footer:type_name -> proto.InteractiveMessage.Footer + 132, // 239: proto.InteractiveMessage.contextInfo:type_name -> proto.ContextInfo + 345, // 240: proto.InteractiveMessage.shopStorefrontMessage:type_name -> proto.InteractiveMessage.ShopMessage + 342, // 241: proto.InteractiveMessage.collectionMessage:type_name -> proto.InteractiveMessage.CollectionMessage + 339, // 242: proto.InteractiveMessage.nativeFlowMessage:type_name -> proto.InteractiveMessage.NativeFlowMessage + 343, // 243: proto.InteractiveMessage.carouselMessage:type_name -> proto.InteractiveMessage.CarouselMessage + 188, // 244: proto.PastParticipants.pastParticipants:type_name -> proto.PastParticipant + 46, // 245: proto.PastParticipant.leaveReason:type_name -> proto.PastParticipant.LeaveReason + 47, // 246: proto.HistorySync.syncType:type_name -> proto.HistorySync.HistorySyncType + 194, // 247: proto.HistorySync.conversations:type_name -> proto.Conversation + 273, // 248: proto.HistorySync.statusV3Messages:type_name -> proto.WebMessageInfo + 185, // 249: proto.HistorySync.pushnames:type_name -> proto.Pushname + 193, // 250: proto.HistorySync.globalSettings:type_name -> proto.GlobalSettings + 184, // 251: proto.HistorySync.recentStickers:type_name -> proto.StickerMetadata + 187, // 252: proto.HistorySync.pastParticipants:type_name -> proto.PastParticipants + 261, // 253: proto.HistorySync.callLogRecords:type_name -> proto.CallLogRecord + 48, // 254: proto.HistorySync.aiWaitListState:type_name -> proto.HistorySync.BotAIWaitListState + 186, // 255: proto.HistorySync.phoneNumberToLidMappings:type_name -> proto.PhoneNumberToLIDMapping + 273, // 256: proto.HistorySyncMsg.message:type_name -> proto.WebMessageInfo + 49, // 257: proto.GroupParticipant.rank:type_name -> proto.GroupParticipant.Rank + 183, // 258: proto.GlobalSettings.lightThemeWallpaper:type_name -> proto.WallpaperSettings + 3, // 259: proto.GlobalSettings.mediaVisibility:type_name -> proto.MediaVisibility + 183, // 260: proto.GlobalSettings.darkThemeWallpaper:type_name -> proto.WallpaperSettings + 196, // 261: proto.GlobalSettings.autoDownloadWiFi:type_name -> proto.AutoDownloadSettings + 196, // 262: proto.GlobalSettings.autoDownloadCellular:type_name -> proto.AutoDownloadSettings + 196, // 263: proto.GlobalSettings.autoDownloadRoaming:type_name -> proto.AutoDownloadSettings + 195, // 264: proto.GlobalSettings.avatarUserSettings:type_name -> proto.AvatarUserSettings + 189, // 265: proto.GlobalSettings.individualNotificationSettings:type_name -> proto.NotificationSettings + 189, // 266: proto.GlobalSettings.groupNotificationSettings:type_name -> proto.NotificationSettings + 191, // 267: proto.Conversation.messages:type_name -> proto.HistorySyncMsg + 50, // 268: proto.Conversation.endOfHistoryTransferType:type_name -> proto.Conversation.EndOfHistoryTransferType + 130, // 269: proto.Conversation.disappearingMode:type_name -> proto.DisappearingMode + 192, // 270: proto.Conversation.participant:type_name -> proto.GroupParticipant + 183, // 271: proto.Conversation.wallpaper:type_name -> proto.WallpaperSettings + 3, // 272: proto.Conversation.mediaVisibility:type_name -> proto.MediaVisibility + 51, // 273: proto.MediaRetryNotification.result:type_name -> proto.MediaRetryNotification.ResultType + 200, // 274: proto.SyncdSnapshot.version:type_name -> proto.SyncdVersion + 203, // 275: proto.SyncdSnapshot.records:type_name -> proto.SyncdRecord + 208, // 276: proto.SyncdSnapshot.keyId:type_name -> proto.KeyId + 207, // 277: proto.SyncdRecord.index:type_name -> proto.SyncdIndex + 201, // 278: proto.SyncdRecord.value:type_name -> proto.SyncdValue + 208, // 279: proto.SyncdRecord.keyId:type_name -> proto.KeyId + 200, // 280: proto.SyncdPatch.version:type_name -> proto.SyncdVersion + 206, // 281: proto.SyncdPatch.mutations:type_name -> proto.SyncdMutation + 209, // 282: proto.SyncdPatch.externalMutations:type_name -> proto.ExternalBlobReference + 208, // 283: proto.SyncdPatch.keyId:type_name -> proto.KeyId + 210, // 284: proto.SyncdPatch.exitCode:type_name -> proto.ExitCode + 206, // 285: proto.SyncdMutations.mutations:type_name -> proto.SyncdMutation + 52, // 286: proto.SyncdMutation.operation:type_name -> proto.SyncdMutation.SyncdOperation + 203, // 287: proto.SyncdMutation.record:type_name -> proto.SyncdRecord + 220, // 288: proto.SyncActionValue.starAction:type_name -> proto.StarAction + 249, // 289: proto.SyncActionValue.contactAction:type_name -> proto.ContactAction + 233, // 290: proto.SyncActionValue.muteAction:type_name -> proto.MuteAction + 230, // 291: proto.SyncActionValue.pinAction:type_name -> proto.PinAction + 221, // 292: proto.SyncActionValue.securityNotificationSetting:type_name -> proto.SecurityNotificationSetting + 225, // 293: proto.SyncActionValue.pushNameSetting:type_name -> proto.PushNameSetting + 224, // 294: proto.SyncActionValue.quickReplyAction:type_name -> proto.QuickReplyAction + 223, // 295: proto.SyncActionValue.recentEmojiWeightsAction:type_name -> proto.RecentEmojiWeightsAction + 239, // 296: proto.SyncActionValue.labelEditAction:type_name -> proto.LabelEditAction + 240, // 297: proto.SyncActionValue.labelAssociationAction:type_name -> proto.LabelAssociationAction + 237, // 298: proto.SyncActionValue.localeSetting:type_name -> proto.LocaleSetting + 255, // 299: proto.SyncActionValue.archiveChatAction:type_name -> proto.ArchiveChatAction + 243, // 300: proto.SyncActionValue.deleteMessageForMeAction:type_name -> proto.DeleteMessageForMeAction + 241, // 301: proto.SyncActionValue.keyExpiration:type_name -> proto.KeyExpiration + 236, // 302: proto.SyncActionValue.markChatAsReadAction:type_name -> proto.MarkChatAsReadAction + 250, // 303: proto.SyncActionValue.clearChatAction:type_name -> proto.ClearChatAction + 245, // 304: proto.SyncActionValue.deleteChatAction:type_name -> proto.DeleteChatAction + 213, // 305: proto.SyncActionValue.unarchiveChatsSetting:type_name -> proto.UnarchiveChatsSetting + 228, // 306: proto.SyncActionValue.primaryFeature:type_name -> proto.PrimaryFeature + 256, // 307: proto.SyncActionValue.androidUnsupportedActions:type_name -> proto.AndroidUnsupportedActions + 257, // 308: proto.SyncActionValue.agentAction:type_name -> proto.AgentAction + 217, // 309: proto.SyncActionValue.subscriptionAction:type_name -> proto.SubscriptionAction + 212, // 310: proto.SyncActionValue.userStatusMuteAction:type_name -> proto.UserStatusMuteAction + 214, // 311: proto.SyncActionValue.timeFormatAction:type_name -> proto.TimeFormatAction + 232, // 312: proto.SyncActionValue.nuxAction:type_name -> proto.NuxAction + 227, // 313: proto.SyncActionValue.primaryVersionAction:type_name -> proto.PrimaryVersionAction + 218, // 314: proto.SyncActionValue.stickerAction:type_name -> proto.StickerAction + 222, // 315: proto.SyncActionValue.removeRecentStickerAction:type_name -> proto.RemoveRecentStickerAction + 252, // 316: proto.SyncActionValue.chatAssignment:type_name -> proto.ChatAssignmentAction + 251, // 317: proto.SyncActionValue.chatAssignmentOpenedStatus:type_name -> proto.ChatAssignmentOpenedStatusAction + 229, // 318: proto.SyncActionValue.pnForLidChatAction:type_name -> proto.PnForLidChatAction + 235, // 319: proto.SyncActionValue.marketingMessageAction:type_name -> proto.MarketingMessageAction + 234, // 320: proto.SyncActionValue.marketingMessageBroadcastAction:type_name -> proto.MarketingMessageBroadcastAction + 242, // 321: proto.SyncActionValue.externalWebBetaAction:type_name -> proto.ExternalWebBetaAction + 226, // 322: proto.SyncActionValue.privacySettingRelayAllCalls:type_name -> proto.PrivacySettingRelayAllCalls + 253, // 323: proto.SyncActionValue.callLogAction:type_name -> proto.CallLogAction + 219, // 324: proto.SyncActionValue.statusPrivacy:type_name -> proto.StatusPrivacyAction + 254, // 325: proto.SyncActionValue.botWelcomeRequestAction:type_name -> proto.BotWelcomeRequestAction + 244, // 326: proto.SyncActionValue.deleteIndividualCallLog:type_name -> proto.DeleteIndividualCallLogAction + 238, // 327: proto.SyncActionValue.labelReorderingAction:type_name -> proto.LabelReorderingAction + 231, // 328: proto.SyncActionValue.paymentInfoAction:type_name -> proto.PaymentInfoAction + 246, // 329: proto.SyncActionValue.customPaymentMethodsAction:type_name -> proto.CustomPaymentMethodsAction + 199, // 330: proto.SyncActionMessage.key:type_name -> proto.MessageKey + 215, // 331: proto.SyncActionMessageRange.messages:type_name -> proto.SyncActionMessage + 53, // 332: proto.StatusPrivacyAction.mode:type_name -> proto.StatusPrivacyAction.StatusDistributionMode + 259, // 333: proto.RecentEmojiWeightsAction.weights:type_name -> proto.RecentEmojiWeight + 54, // 334: proto.MarketingMessageAction.type:type_name -> proto.MarketingMessageAction.MarketingMessagePrototypeType + 216, // 335: proto.MarkChatAsReadAction.messageRange:type_name -> proto.SyncActionMessageRange + 216, // 336: proto.DeleteChatAction.messageRange:type_name -> proto.SyncActionMessageRange + 247, // 337: proto.CustomPaymentMethodsAction.customPaymentMethods:type_name -> proto.CustomPaymentMethod + 248, // 338: proto.CustomPaymentMethod.metadata:type_name -> proto.CustomPaymentMethodMetadata + 216, // 339: proto.ClearChatAction.messageRange:type_name -> proto.SyncActionMessageRange + 261, // 340: proto.CallLogAction.callLogRecord:type_name -> proto.CallLogRecord + 216, // 341: proto.ArchiveChatAction.messageRange:type_name -> proto.SyncActionMessageRange + 211, // 342: proto.SyncActionData.value:type_name -> proto.SyncActionValue + 55, // 343: proto.PatchDebugData.senderPlatform:type_name -> proto.PatchDebugData.Platform + 58, // 344: proto.CallLogRecord.callResult:type_name -> proto.CallLogRecord.CallResult + 56, // 345: proto.CallLogRecord.silenceReason:type_name -> proto.CallLogRecord.SilenceReason + 347, // 346: proto.CallLogRecord.participants:type_name -> proto.CallLogRecord.ParticipantInfo + 57, // 347: proto.CallLogRecord.callType:type_name -> proto.CallLogRecord.CallType + 59, // 348: proto.BizIdentityInfo.vlevel:type_name -> proto.BizIdentityInfo.VerifiedLevelValue + 262, // 349: proto.BizIdentityInfo.vnameCert:type_name -> proto.VerifiedNameCertificate + 60, // 350: proto.BizIdentityInfo.hostStorage:type_name -> proto.BizIdentityInfo.HostStorageType + 61, // 351: proto.BizIdentityInfo.actualActors:type_name -> proto.BizIdentityInfo.ActualActorsType + 262, // 352: proto.BizAccountPayload.vnameCert:type_name -> proto.VerifiedNameCertificate + 62, // 353: proto.BizAccountLinkInfo.hostStorage:type_name -> proto.BizAccountLinkInfo.HostStorageType + 63, // 354: proto.BizAccountLinkInfo.accountType:type_name -> proto.BizAccountLinkInfo.AccountType + 269, // 355: proto.HandshakeMessage.clientHello:type_name -> proto.HandshakeClientHello + 268, // 356: proto.HandshakeMessage.serverHello:type_name -> proto.HandshakeServerHello + 270, // 357: proto.HandshakeMessage.clientFinish:type_name -> proto.HandshakeClientFinish + 350, // 358: proto.ClientPayload.userAgent:type_name -> proto.ClientPayload.UserAgent + 349, // 359: proto.ClientPayload.webInfo:type_name -> proto.ClientPayload.WebInfo + 66, // 360: proto.ClientPayload.connectType:type_name -> proto.ClientPayload.ConnectType + 67, // 361: proto.ClientPayload.connectReason:type_name -> proto.ClientPayload.ConnectReason + 353, // 362: proto.ClientPayload.dnsSource:type_name -> proto.ClientPayload.DNSSource + 352, // 363: proto.ClientPayload.devicePairingData:type_name -> proto.ClientPayload.DevicePairingRegistrationData + 64, // 364: proto.ClientPayload.product:type_name -> proto.ClientPayload.Product + 65, // 365: proto.ClientPayload.iosAppExtension:type_name -> proto.ClientPayload.IOSAppExtension + 351, // 366: proto.ClientPayload.interopData:type_name -> proto.ClientPayload.InteropData + 273, // 367: proto.WebNotificationsInfo.notifyMessages:type_name -> proto.WebMessageInfo + 199, // 368: proto.WebMessageInfo.key:type_name -> proto.MessageKey + 143, // 369: proto.WebMessageInfo.message:type_name -> proto.Message + 74, // 370: proto.WebMessageInfo.status:type_name -> proto.WebMessageInfo.Status + 73, // 371: proto.WebMessageInfo.messageStubType:type_name -> proto.WebMessageInfo.StubType + 284, // 372: proto.WebMessageInfo.paymentInfo:type_name -> proto.PaymentInfo + 175, // 373: proto.WebMessageInfo.finalLiveLocation:type_name -> proto.LiveLocationMessage + 284, // 374: proto.WebMessageInfo.quotedPaymentInfo:type_name -> proto.PaymentInfo + 75, // 375: proto.WebMessageInfo.bizPrivacyStatus:type_name -> proto.WebMessageInfo.BizPrivacyStatus + 287, // 376: proto.WebMessageInfo.mediaData:type_name -> proto.MediaData + 283, // 377: proto.WebMessageInfo.photoChange:type_name -> proto.PhotoChange + 275, // 378: proto.WebMessageInfo.userReceipt:type_name -> proto.UserReceipt + 278, // 379: proto.WebMessageInfo.reactions:type_name -> proto.Reaction + 287, // 380: proto.WebMessageInfo.quotedStickerData:type_name -> proto.MediaData + 276, // 381: proto.WebMessageInfo.statusPsa:type_name -> proto.StatusPSA + 280, // 382: proto.WebMessageInfo.pollUpdates:type_name -> proto.PollUpdate + 281, // 383: proto.WebMessageInfo.pollAdditionalMetadata:type_name -> proto.PollAdditionalMetadata + 288, // 384: proto.WebMessageInfo.keepInChat:type_name -> proto.KeepInChat + 282, // 385: proto.WebMessageInfo.pinInChat:type_name -> proto.PinInChat + 279, // 386: proto.WebMessageInfo.premiumMessageInfo:type_name -> proto.PremiumMessageInfo + 290, // 387: proto.WebMessageInfo.commentMetadata:type_name -> proto.CommentMetadata + 289, // 388: proto.WebMessageInfo.eventResponses:type_name -> proto.EventResponse + 277, // 389: proto.WebMessageInfo.reportingTokenInfo:type_name -> proto.ReportingTokenInfo + 76, // 390: proto.WebFeatures.labelsDisplay:type_name -> proto.WebFeatures.Flag + 76, // 391: proto.WebFeatures.voipIndividualOutgoing:type_name -> proto.WebFeatures.Flag + 76, // 392: proto.WebFeatures.groupsV3:type_name -> proto.WebFeatures.Flag + 76, // 393: proto.WebFeatures.groupsV3Create:type_name -> proto.WebFeatures.Flag + 76, // 394: proto.WebFeatures.changeNumberV2:type_name -> proto.WebFeatures.Flag + 76, // 395: proto.WebFeatures.queryStatusV3Thumbnail:type_name -> proto.WebFeatures.Flag + 76, // 396: proto.WebFeatures.liveLocations:type_name -> proto.WebFeatures.Flag + 76, // 397: proto.WebFeatures.queryVname:type_name -> proto.WebFeatures.Flag + 76, // 398: proto.WebFeatures.voipIndividualIncoming:type_name -> proto.WebFeatures.Flag + 76, // 399: proto.WebFeatures.quickRepliesQuery:type_name -> proto.WebFeatures.Flag + 76, // 400: proto.WebFeatures.payments:type_name -> proto.WebFeatures.Flag + 76, // 401: proto.WebFeatures.stickerPackQuery:type_name -> proto.WebFeatures.Flag + 76, // 402: proto.WebFeatures.liveLocationsFinal:type_name -> proto.WebFeatures.Flag + 76, // 403: proto.WebFeatures.labelsEdit:type_name -> proto.WebFeatures.Flag + 76, // 404: proto.WebFeatures.mediaUpload:type_name -> proto.WebFeatures.Flag + 76, // 405: proto.WebFeatures.mediaUploadRichQuickReplies:type_name -> proto.WebFeatures.Flag + 76, // 406: proto.WebFeatures.vnameV2:type_name -> proto.WebFeatures.Flag + 76, // 407: proto.WebFeatures.videoPlaybackUrl:type_name -> proto.WebFeatures.Flag + 76, // 408: proto.WebFeatures.statusRanking:type_name -> proto.WebFeatures.Flag + 76, // 409: proto.WebFeatures.voipIndividualVideo:type_name -> proto.WebFeatures.Flag + 76, // 410: proto.WebFeatures.thirdPartyStickers:type_name -> proto.WebFeatures.Flag + 76, // 411: proto.WebFeatures.frequentlyForwardedSetting:type_name -> proto.WebFeatures.Flag + 76, // 412: proto.WebFeatures.groupsV4JoinPermission:type_name -> proto.WebFeatures.Flag + 76, // 413: proto.WebFeatures.recentStickers:type_name -> proto.WebFeatures.Flag + 76, // 414: proto.WebFeatures.catalog:type_name -> proto.WebFeatures.Flag + 76, // 415: proto.WebFeatures.starredStickers:type_name -> proto.WebFeatures.Flag + 76, // 416: proto.WebFeatures.voipGroupCall:type_name -> proto.WebFeatures.Flag + 76, // 417: proto.WebFeatures.templateMessage:type_name -> proto.WebFeatures.Flag + 76, // 418: proto.WebFeatures.templateMessageInteractivity:type_name -> proto.WebFeatures.Flag + 76, // 419: proto.WebFeatures.ephemeralMessages:type_name -> proto.WebFeatures.Flag + 76, // 420: proto.WebFeatures.e2ENotificationSync:type_name -> proto.WebFeatures.Flag + 76, // 421: proto.WebFeatures.recentStickersV2:type_name -> proto.WebFeatures.Flag + 76, // 422: proto.WebFeatures.recentStickersV3:type_name -> proto.WebFeatures.Flag + 76, // 423: proto.WebFeatures.userNotice:type_name -> proto.WebFeatures.Flag + 76, // 424: proto.WebFeatures.support:type_name -> proto.WebFeatures.Flag + 76, // 425: proto.WebFeatures.groupUiiCleanup:type_name -> proto.WebFeatures.Flag + 76, // 426: proto.WebFeatures.groupDogfoodingInternalOnly:type_name -> proto.WebFeatures.Flag + 76, // 427: proto.WebFeatures.settingsSync:type_name -> proto.WebFeatures.Flag + 76, // 428: proto.WebFeatures.archiveV2:type_name -> proto.WebFeatures.Flag + 76, // 429: proto.WebFeatures.ephemeralAllowGroupMembers:type_name -> proto.WebFeatures.Flag + 76, // 430: proto.WebFeatures.ephemeral24HDuration:type_name -> proto.WebFeatures.Flag + 76, // 431: proto.WebFeatures.mdForceUpgrade:type_name -> proto.WebFeatures.Flag + 76, // 432: proto.WebFeatures.disappearingMode:type_name -> proto.WebFeatures.Flag + 76, // 433: proto.WebFeatures.externalMdOptInAvailable:type_name -> proto.WebFeatures.Flag + 76, // 434: proto.WebFeatures.noDeleteMessageTimeLimit:type_name -> proto.WebFeatures.Flag + 199, // 435: proto.Reaction.key:type_name -> proto.MessageKey + 199, // 436: proto.PollUpdate.pollUpdateMessageKey:type_name -> proto.MessageKey + 161, // 437: proto.PollUpdate.vote:type_name -> proto.PollVoteMessage + 77, // 438: proto.PinInChat.type:type_name -> proto.PinInChat.Type + 199, // 439: proto.PinInChat.key:type_name -> proto.MessageKey + 286, // 440: proto.PinInChat.messageAddOnContextInfo:type_name -> proto.MessageAddOnContextInfo + 80, // 441: proto.PaymentInfo.currencyDeprecated:type_name -> proto.PaymentInfo.Currency + 79, // 442: proto.PaymentInfo.status:type_name -> proto.PaymentInfo.Status + 199, // 443: proto.PaymentInfo.requestMessageKey:type_name -> proto.MessageKey + 78, // 444: proto.PaymentInfo.txnStatus:type_name -> proto.PaymentInfo.TxnStatus + 142, // 445: proto.PaymentInfo.primaryAmount:type_name -> proto.Money + 142, // 446: proto.PaymentInfo.exchangeAmount:type_name -> proto.Money + 199, // 447: proto.NotificationMessageInfo.key:type_name -> proto.MessageKey + 143, // 448: proto.NotificationMessageInfo.message:type_name -> proto.Message + 1, // 449: proto.KeepInChat.keepType:type_name -> proto.KeepType + 199, // 450: proto.KeepInChat.key:type_name -> proto.MessageKey + 199, // 451: proto.EventResponse.eventResponseMessageKey:type_name -> proto.MessageKey + 98, // 452: proto.EventResponse.eventResponseMessage:type_name -> proto.EventResponseMessage + 199, // 453: proto.CommentMetadata.commentParentKey:type_name -> proto.MessageKey + 357, // 454: proto.CertChain.leaf:type_name -> proto.CertChain.NoiseCertificate + 357, // 455: proto.CertChain.intermediate:type_name -> proto.CertChain.NoiseCertificate + 298, // 456: proto.HighlyStructuredMessage.HSMLocalizableParameter.currency:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + 297, // 457: proto.HighlyStructuredMessage.HSMLocalizableParameter.dateTime:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + 300, // 458: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.component:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + 299, // 459: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.unixEpoch:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + 6, // 460: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.dayOfWeek:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType + 7, // 461: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.calendar:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType + 14, // 462: proto.CallLogMessage.CallParticipant.callOutcome:type_name -> proto.CallLogMessage.CallOutcome + 304, // 463: proto.ButtonsMessage.Button.buttonText:type_name -> proto.ButtonsMessage.Button.ButtonText + 17, // 464: proto.ButtonsMessage.Button.type:type_name -> proto.ButtonsMessage.Button.Type + 303, // 465: proto.ButtonsMessage.Button.nativeFlowInfo:type_name -> proto.ButtonsMessage.Button.NativeFlowInfo + 22, // 466: proto.HydratedTemplateButton.HydratedURLButton.webviewPresentation:type_name -> proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType + 25, // 467: proto.ContextInfo.ExternalAdReplyInfo.mediaType:type_name -> proto.ContextInfo.ExternalAdReplyInfo.MediaType + 26, // 468: proto.ContextInfo.AdReplyInfo.mediaType:type_name -> proto.ContextInfo.AdReplyInfo.MediaType + 93, // 469: proto.TemplateButton.URLButton.displayText:type_name -> proto.HighlyStructuredMessage + 93, // 470: proto.TemplateButton.URLButton.url:type_name -> proto.HighlyStructuredMessage + 93, // 471: proto.TemplateButton.QuickReplyButton.displayText:type_name -> proto.HighlyStructuredMessage + 93, // 472: proto.TemplateButton.CallButton.displayText:type_name -> proto.HighlyStructuredMessage + 93, // 473: proto.TemplateButton.CallButton.phoneNumber:type_name -> proto.HighlyStructuredMessage + 128, // 474: proto.TemplateMessage.HydratedFourRowTemplate.hydratedButtons:type_name -> proto.HydratedTemplateButton + 103, // 475: proto.TemplateMessage.HydratedFourRowTemplate.documentMessage:type_name -> proto.DocumentMessage + 91, // 476: proto.TemplateMessage.HydratedFourRowTemplate.imageMessage:type_name -> proto.ImageMessage + 146, // 477: proto.TemplateMessage.HydratedFourRowTemplate.videoMessage:type_name -> proto.VideoMessage + 174, // 478: proto.TemplateMessage.HydratedFourRowTemplate.locationMessage:type_name -> proto.LocationMessage + 93, // 479: proto.TemplateMessage.FourRowTemplate.content:type_name -> proto.HighlyStructuredMessage + 93, // 480: proto.TemplateMessage.FourRowTemplate.footer:type_name -> proto.HighlyStructuredMessage + 139, // 481: proto.TemplateMessage.FourRowTemplate.buttons:type_name -> proto.TemplateButton + 103, // 482: proto.TemplateMessage.FourRowTemplate.documentMessage:type_name -> proto.DocumentMessage + 93, // 483: proto.TemplateMessage.FourRowTemplate.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage + 91, // 484: proto.TemplateMessage.FourRowTemplate.imageMessage:type_name -> proto.ImageMessage + 146, // 485: proto.TemplateMessage.FourRowTemplate.videoMessage:type_name -> proto.VideoMessage + 174, // 486: proto.TemplateMessage.FourRowTemplate.locationMessage:type_name -> proto.LocationMessage + 91, // 487: proto.ProductMessage.ProductSnapshot.productImage:type_name -> proto.ImageMessage + 91, // 488: proto.ProductMessage.CatalogSnapshot.catalogImage:type_name -> proto.ImageMessage + 51, // 489: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.mediaUploadResult:type_name -> proto.MediaRetryNotification.ResultType + 150, // 490: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.stickerMessage:type_name -> proto.StickerMessage + 324, // 491: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.linkPreviewResponse:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse + 323, // 492: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.placeholderMessageResendResponse:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse + 325, // 493: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.hqThumbnail:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail + 199, // 494: proto.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.messageKey:type_name -> proto.MessageKey + 332, // 495: proto.ListMessage.Section.rows:type_name -> proto.ListMessage.Row + 333, // 496: proto.ListMessage.ProductSection.products:type_name -> proto.ListMessage.Product + 334, // 497: proto.ListMessage.ProductListInfo.productSections:type_name -> proto.ListMessage.ProductSection + 336, // 498: proto.ListMessage.ProductListInfo.headerImage:type_name -> proto.ListMessage.ProductListHeaderImage + 44, // 499: proto.InteractiveResponseMessage.Body.format:type_name -> proto.InteractiveResponseMessage.Body.Format + 346, // 500: proto.InteractiveMessage.NativeFlowMessage.buttons:type_name -> proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton + 103, // 501: proto.InteractiveMessage.Header.documentMessage:type_name -> proto.DocumentMessage + 91, // 502: proto.InteractiveMessage.Header.imageMessage:type_name -> proto.ImageMessage + 146, // 503: proto.InteractiveMessage.Header.videoMessage:type_name -> proto.VideoMessage + 174, // 504: proto.InteractiveMessage.Header.locationMessage:type_name -> proto.LocationMessage + 181, // 505: proto.InteractiveMessage.CarouselMessage.cards:type_name -> proto.InteractiveMessage + 45, // 506: proto.InteractiveMessage.ShopMessage.surface:type_name -> proto.InteractiveMessage.ShopMessage.Surface + 58, // 507: proto.CallLogRecord.ParticipantInfo.callResult:type_name -> proto.CallLogRecord.CallResult + 263, // 508: proto.VerifiedNameCertificate.Details.localizedNames:type_name -> proto.LocalizedName + 354, // 509: proto.ClientPayload.WebInfo.webdPayload:type_name -> proto.ClientPayload.WebInfo.WebdPayload + 68, // 510: proto.ClientPayload.WebInfo.webSubPlatform:type_name -> proto.ClientPayload.WebInfo.WebSubPlatform + 70, // 511: proto.ClientPayload.UserAgent.platform:type_name -> proto.ClientPayload.UserAgent.Platform + 355, // 512: proto.ClientPayload.UserAgent.appVersion:type_name -> proto.ClientPayload.UserAgent.AppVersion + 69, // 513: proto.ClientPayload.UserAgent.releaseChannel:type_name -> proto.ClientPayload.UserAgent.ReleaseChannel + 71, // 514: proto.ClientPayload.UserAgent.deviceType:type_name -> proto.ClientPayload.UserAgent.DeviceType + 72, // 515: proto.ClientPayload.DNSSource.dnsMethod:type_name -> proto.ClientPayload.DNSSource.DNSResolutionMethod + 360, // 516: proto.QP.Filter.parameters:type_name -> proto.QP.FilterParameters + 81, // 517: proto.QP.Filter.filterResult:type_name -> proto.QP.FilterResult + 82, // 518: proto.QP.Filter.clientNotSupportedConfig:type_name -> proto.QP.FilterClientNotSupportedConfig + 83, // 519: proto.QP.FilterClause.clauseType:type_name -> proto.QP.ClauseType + 361, // 520: proto.QP.FilterClause.clauses:type_name -> proto.QP.FilterClause + 359, // 521: proto.QP.FilterClause.filters:type_name -> proto.QP.Filter + 522, // [522:522] is the sub-list for method output_type + 522, // [522:522] is the sub-list for method input_type + 522, // [522:522] is the sub-list for extension type_name + 522, // [522:522] is the sub-list for extension extendee + 0, // [0:522] is the sub-list for field type_name } func init() { file_binary_proto_def_proto_init() } @@ -29284,18 +29767,6 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_binary_proto_def_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitialSecurityNotificationSettingSync); i { case 0: return &v.state @@ -29307,7 +29778,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImageMessage); i { case 0: return &v.state @@ -29319,7 +29790,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HistorySyncNotification); i { case 0: return &v.state @@ -29331,7 +29802,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HighlyStructuredMessage); i { case 0: return &v.state @@ -29343,7 +29814,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GroupInviteMessage); i { case 0: return &v.state @@ -29355,7 +29826,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FutureProofMessage); i { case 0: return &v.state @@ -29367,6 +29838,18 @@ func file_binary_proto_def_proto_init() { return nil } } + file_binary_proto_def_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtendedTextMessageWithParentKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_binary_proto_def_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtendedTextMessage); i { case 0: @@ -29704,7 +30187,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Location); i { + switch v := v.(*MediaNotifyMessage); i { case 0: return &v.state case 1: @@ -29716,7 +30199,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveAnnotation); i { + switch v := v.(*Location); i { case 0: return &v.state case 1: @@ -29728,7 +30211,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HydratedTemplateButton); i { + switch v := v.(*InteractiveAnnotation); i { case 0: return &v.state case 1: @@ -29740,7 +30223,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMention); i { + switch v := v.(*HydratedTemplateButton); i { case 0: return &v.state case 1: @@ -29752,7 +30235,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisappearingMode); i { + switch v := v.(*GroupMention); i { case 0: return &v.state case 1: @@ -29764,7 +30247,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceListMetadata); i { + switch v := v.(*DisappearingMode); i { case 0: return &v.state case 1: @@ -29776,7 +30259,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextInfo); i { + switch v := v.(*DeviceListMetadata); i { case 0: return &v.state case 1: @@ -29788,7 +30271,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForwardedNewsletterMessageInfo); i { + switch v := v.(*ContextInfo); i { case 0: return &v.state case 1: @@ -29800,7 +30283,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BotSuggestedPromptMetadata); i { + switch v := v.(*ForwardedNewsletterMessageInfo); i { case 0: return &v.state case 1: @@ -29812,7 +30295,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BotPluginMetadata); i { + switch v := v.(*BotSuggestedPromptMetadata); i { case 0: return &v.state case 1: @@ -29824,7 +30307,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BotMetadata); i { + switch v := v.(*BotPluginMetadata); i { case 0: return &v.state case 1: @@ -29836,7 +30319,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BotAvatarMetadata); i { + switch v := v.(*BotMetadata); i { case 0: return &v.state case 1: @@ -29848,7 +30331,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionLink); i { + switch v := v.(*BotAvatarMetadata); i { case 0: return &v.state case 1: @@ -29860,7 +30343,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateButton); i { + switch v := v.(*ActionLink); i { case 0: return &v.state case 1: @@ -29872,7 +30355,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Point); i { + switch v := v.(*TemplateButton); i { case 0: return &v.state case 1: @@ -29884,7 +30367,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaymentBackground); i { + switch v := v.(*Point); i { case 0: return &v.state case 1: @@ -29896,7 +30379,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Money); i { + switch v := v.(*PaymentBackground); i { case 0: return &v.state case 1: @@ -29908,7 +30391,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { + switch v := v.(*Money); i { case 0: return &v.state case 1: @@ -29920,7 +30403,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageSecretMessage); i { + switch v := v.(*Message); i { case 0: return &v.state case 1: @@ -29932,7 +30415,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageContextInfo); i { + switch v := v.(*MessageSecretMessage); i { case 0: return &v.state case 1: @@ -29944,7 +30427,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VideoMessage); i { + switch v := v.(*MessageContextInfo); i { case 0: return &v.state case 1: @@ -29956,7 +30439,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateMessage); i { + switch v := v.(*VideoMessage); i { case 0: return &v.state case 1: @@ -29968,7 +30451,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateButtonReplyMessage); i { + switch v := v.(*TemplateMessage); i { case 0: return &v.state case 1: @@ -29980,7 +30463,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StickerSyncRMRMessage); i { + switch v := v.(*TemplateButtonReplyMessage); i { case 0: return &v.state case 1: @@ -29992,7 +30475,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StickerMessage); i { + switch v := v.(*StickerSyncRMRMessage); i { case 0: return &v.state case 1: @@ -30004,7 +30487,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SenderKeyDistributionMessage); i { + switch v := v.(*StickerMessage); i { case 0: return &v.state case 1: @@ -30016,7 +30499,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendPaymentMessage); i { + switch v := v.(*SenderKeyDistributionMessage); i { case 0: return &v.state case 1: @@ -30028,7 +30511,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScheduledCallEditMessage); i { + switch v := v.(*SendPaymentMessage); i { case 0: return &v.state case 1: @@ -30040,7 +30523,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScheduledCallCreationMessage); i { + switch v := v.(*ScheduledCallEditMessage); i { case 0: return &v.state case 1: @@ -30052,7 +30535,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestWelcomeMessageMetadata); i { + switch v := v.(*ScheduledCallCreationMessage); i { case 0: return &v.state case 1: @@ -30064,7 +30547,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestPhoneNumberMessage); i { + switch v := v.(*RequestWelcomeMessageMetadata); i { case 0: return &v.state case 1: @@ -30076,7 +30559,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestPaymentMessage); i { + switch v := v.(*RequestPhoneNumberMessage); i { case 0: return &v.state case 1: @@ -30088,7 +30571,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReactionMessage); i { + switch v := v.(*RequestPaymentMessage); i { case 0: return &v.state case 1: @@ -30100,7 +30583,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolMessage); i { + switch v := v.(*ReactionMessage); i { case 0: return &v.state case 1: @@ -30112,7 +30595,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProductMessage); i { + switch v := v.(*ProtocolMessage); i { case 0: return &v.state case 1: @@ -30124,7 +30607,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollVoteMessage); i { + switch v := v.(*ProductMessage); i { case 0: return &v.state case 1: @@ -30136,7 +30619,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollUpdateMessage); i { + switch v := v.(*PollVoteMessage); i { case 0: return &v.state case 1: @@ -30148,7 +30631,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollUpdateMessageMetadata); i { + switch v := v.(*PollUpdateMessage); i { case 0: return &v.state case 1: @@ -30160,7 +30643,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollEncValue); i { + switch v := v.(*PollUpdateMessageMetadata); i { case 0: return &v.state case 1: @@ -30172,7 +30655,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollCreationMessage); i { + switch v := v.(*PollEncValue); i { case 0: return &v.state case 1: @@ -30184,7 +30667,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PinInChatMessage); i { + switch v := v.(*PollCreationMessage); i { case 0: return &v.state case 1: @@ -30196,7 +30679,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerDataOperationRequestResponseMessage); i { + switch v := v.(*PlaceholderMessage); i { case 0: return &v.state case 1: @@ -30208,7 +30691,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerDataOperationRequestMessage); i { + switch v := v.(*PinInChatMessage); i { case 0: return &v.state case 1: @@ -30220,7 +30703,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaymentInviteMessage); i { + switch v := v.(*PeerDataOperationRequestResponseMessage); i { case 0: return &v.state case 1: @@ -30232,7 +30715,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderMessage); i { + switch v := v.(*PeerDataOperationRequestMessage); i { case 0: return &v.state case 1: @@ -30244,7 +30727,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NewsletterAdminInviteMessage); i { + switch v := v.(*PaymentInviteMessage); i { case 0: return &v.state case 1: @@ -30256,7 +30739,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageHistoryBundle); i { + switch v := v.(*OrderMessage); i { case 0: return &v.state case 1: @@ -30268,7 +30751,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocationMessage); i { + switch v := v.(*NewsletterAdminInviteMessage); i { case 0: return &v.state case 1: @@ -30280,7 +30763,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiveLocationMessage); i { + switch v := v.(*MessageHistoryBundle); i { case 0: return &v.state case 1: @@ -30292,7 +30775,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponseMessage); i { + switch v := v.(*LocationMessage); i { case 0: return &v.state case 1: @@ -30304,7 +30787,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage); i { + switch v := v.(*LiveLocationMessage); i { case 0: return &v.state case 1: @@ -30316,7 +30799,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeepInChatMessage); i { + switch v := v.(*ListResponseMessage); i { case 0: return &v.state case 1: @@ -30328,7 +30811,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvoiceMessage); i { + switch v := v.(*ListMessage); i { case 0: return &v.state case 1: @@ -30340,7 +30823,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveResponseMessage); i { + switch v := v.(*KeepInChatMessage); i { case 0: return &v.state case 1: @@ -30352,7 +30835,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EphemeralSetting); i { + switch v := v.(*InvoiceMessage); i { case 0: return &v.state case 1: @@ -30364,7 +30847,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WallpaperSettings); i { + switch v := v.(*InteractiveResponseMessage); i { case 0: return &v.state case 1: @@ -30376,7 +30859,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StickerMetadata); i { + switch v := v.(*InteractiveMessage); i { case 0: return &v.state case 1: @@ -30388,7 +30871,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pushname); i { + switch v := v.(*EphemeralSetting); i { case 0: return &v.state case 1: @@ -30400,7 +30883,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PhoneNumberToLIDMapping); i { + switch v := v.(*WallpaperSettings); i { case 0: return &v.state case 1: @@ -30412,7 +30895,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PastParticipants); i { + switch v := v.(*StickerMetadata); i { case 0: return &v.state case 1: @@ -30424,7 +30907,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PastParticipant); i { + switch v := v.(*Pushname); i { case 0: return &v.state case 1: @@ -30436,7 +30919,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotificationSettings); i { + switch v := v.(*PhoneNumberToLIDMapping); i { case 0: return &v.state case 1: @@ -30448,7 +30931,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistorySync); i { + switch v := v.(*PastParticipants); i { case 0: return &v.state case 1: @@ -30460,7 +30943,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistorySyncMsg); i { + switch v := v.(*PastParticipant); i { case 0: return &v.state case 1: @@ -30472,7 +30955,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupParticipant); i { + switch v := v.(*NotificationSettings); i { case 0: return &v.state case 1: @@ -30484,7 +30967,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GlobalSettings); i { + switch v := v.(*HistorySync); i { case 0: return &v.state case 1: @@ -30496,7 +30979,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Conversation); i { + switch v := v.(*HistorySyncMsg); i { case 0: return &v.state case 1: @@ -30508,7 +30991,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AvatarUserSettings); i { + switch v := v.(*GroupParticipant); i { case 0: return &v.state case 1: @@ -30520,7 +31003,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AutoDownloadSettings); i { + switch v := v.(*GlobalSettings); i { case 0: return &v.state case 1: @@ -30532,7 +31015,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerErrorReceipt); i { + switch v := v.(*Conversation); i { case 0: return &v.state case 1: @@ -30544,7 +31027,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MediaRetryNotification); i { + switch v := v.(*AvatarUserSettings); i { case 0: return &v.state case 1: @@ -30556,7 +31039,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageKey); i { + switch v := v.(*AutoDownloadSettings); i { case 0: return &v.state case 1: @@ -30568,7 +31051,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdVersion); i { + switch v := v.(*ServerErrorReceipt); i { case 0: return &v.state case 1: @@ -30580,7 +31063,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdValue); i { + switch v := v.(*MediaRetryNotification); i { case 0: return &v.state case 1: @@ -30592,7 +31075,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdSnapshot); i { + switch v := v.(*MessageKey); i { case 0: return &v.state case 1: @@ -30604,7 +31087,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdRecord); i { + switch v := v.(*SyncdVersion); i { case 0: return &v.state case 1: @@ -30616,7 +31099,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdPatch); i { + switch v := v.(*SyncdValue); i { case 0: return &v.state case 1: @@ -30628,7 +31111,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdMutations); i { + switch v := v.(*SyncdSnapshot); i { case 0: return &v.state case 1: @@ -30640,7 +31123,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdMutation); i { + switch v := v.(*SyncdRecord); i { case 0: return &v.state case 1: @@ -30652,7 +31135,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncdIndex); i { + switch v := v.(*SyncdPatch); i { case 0: return &v.state case 1: @@ -30664,7 +31147,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyId); i { + switch v := v.(*SyncdMutations); i { case 0: return &v.state case 1: @@ -30676,7 +31159,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalBlobReference); i { + switch v := v.(*SyncdMutation); i { case 0: return &v.state case 1: @@ -30688,7 +31171,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExitCode); i { + switch v := v.(*SyncdIndex); i { case 0: return &v.state case 1: @@ -30700,7 +31183,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncActionValue); i { + switch v := v.(*KeyId); i { case 0: return &v.state case 1: @@ -30712,7 +31195,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserStatusMuteAction); i { + switch v := v.(*ExternalBlobReference); i { case 0: return &v.state case 1: @@ -30724,7 +31207,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnarchiveChatsSetting); i { + switch v := v.(*ExitCode); i { case 0: return &v.state case 1: @@ -30736,7 +31219,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeFormatAction); i { + switch v := v.(*SyncActionValue); i { case 0: return &v.state case 1: @@ -30748,7 +31231,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncActionMessage); i { + switch v := v.(*UserStatusMuteAction); i { case 0: return &v.state case 1: @@ -30760,7 +31243,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncActionMessageRange); i { + switch v := v.(*UnarchiveChatsSetting); i { case 0: return &v.state case 1: @@ -30772,7 +31255,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscriptionAction); i { + switch v := v.(*TimeFormatAction); i { case 0: return &v.state case 1: @@ -30784,7 +31267,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StickerAction); i { + switch v := v.(*SyncActionMessage); i { case 0: return &v.state case 1: @@ -30796,7 +31279,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusPrivacyAction); i { + switch v := v.(*SyncActionMessageRange); i { case 0: return &v.state case 1: @@ -30808,7 +31291,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StarAction); i { + switch v := v.(*SubscriptionAction); i { case 0: return &v.state case 1: @@ -30820,7 +31303,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityNotificationSetting); i { + switch v := v.(*StickerAction); i { case 0: return &v.state case 1: @@ -30832,7 +31315,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRecentStickerAction); i { + switch v := v.(*StatusPrivacyAction); i { case 0: return &v.state case 1: @@ -30844,7 +31327,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecentEmojiWeightsAction); i { + switch v := v.(*StarAction); i { case 0: return &v.state case 1: @@ -30856,7 +31339,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuickReplyAction); i { + switch v := v.(*SecurityNotificationSetting); i { case 0: return &v.state case 1: @@ -30868,7 +31351,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushNameSetting); i { + switch v := v.(*RemoveRecentStickerAction); i { case 0: return &v.state case 1: @@ -30880,7 +31363,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivacySettingRelayAllCalls); i { + switch v := v.(*RecentEmojiWeightsAction); i { case 0: return &v.state case 1: @@ -30892,7 +31375,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrimaryVersionAction); i { + switch v := v.(*QuickReplyAction); i { case 0: return &v.state case 1: @@ -30904,7 +31387,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrimaryFeature); i { + switch v := v.(*PushNameSetting); i { case 0: return &v.state case 1: @@ -30916,7 +31399,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PnForLidChatAction); i { + switch v := v.(*PrivacySettingRelayAllCalls); i { case 0: return &v.state case 1: @@ -30928,7 +31411,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PinAction); i { + switch v := v.(*PrimaryVersionAction); i { case 0: return &v.state case 1: @@ -30940,7 +31423,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaymentInfoAction); i { + switch v := v.(*PrimaryFeature); i { case 0: return &v.state case 1: @@ -30952,7 +31435,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NuxAction); i { + switch v := v.(*PnForLidChatAction); i { case 0: return &v.state case 1: @@ -30964,7 +31447,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MuteAction); i { + switch v := v.(*PinAction); i { case 0: return &v.state case 1: @@ -30976,7 +31459,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketingMessageBroadcastAction); i { + switch v := v.(*PaymentInfoAction); i { case 0: return &v.state case 1: @@ -30988,7 +31471,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketingMessageAction); i { + switch v := v.(*NuxAction); i { case 0: return &v.state case 1: @@ -31000,7 +31483,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkChatAsReadAction); i { + switch v := v.(*MuteAction); i { case 0: return &v.state case 1: @@ -31012,7 +31495,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocaleSetting); i { + switch v := v.(*MarketingMessageBroadcastAction); i { case 0: return &v.state case 1: @@ -31024,7 +31507,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LabelReorderingAction); i { + switch v := v.(*MarketingMessageAction); i { case 0: return &v.state case 1: @@ -31036,7 +31519,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LabelEditAction); i { + switch v := v.(*MarkChatAsReadAction); i { case 0: return &v.state case 1: @@ -31048,7 +31531,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LabelAssociationAction); i { + switch v := v.(*LocaleSetting); i { case 0: return &v.state case 1: @@ -31060,7 +31543,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyExpiration); i { + switch v := v.(*LabelReorderingAction); i { case 0: return &v.state case 1: @@ -31072,7 +31555,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalWebBetaAction); i { + switch v := v.(*LabelEditAction); i { case 0: return &v.state case 1: @@ -31084,7 +31567,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMessageForMeAction); i { + switch v := v.(*LabelAssociationAction); i { case 0: return &v.state case 1: @@ -31096,7 +31579,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteIndividualCallLogAction); i { + switch v := v.(*KeyExpiration); i { case 0: return &v.state case 1: @@ -31108,7 +31591,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteChatAction); i { + switch v := v.(*ExternalWebBetaAction); i { case 0: return &v.state case 1: @@ -31120,7 +31603,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContactAction); i { + switch v := v.(*DeleteMessageForMeAction); i { case 0: return &v.state case 1: @@ -31132,7 +31615,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearChatAction); i { + switch v := v.(*DeleteIndividualCallLogAction); i { case 0: return &v.state case 1: @@ -31144,7 +31627,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatAssignmentOpenedStatusAction); i { + switch v := v.(*DeleteChatAction); i { case 0: return &v.state case 1: @@ -31156,7 +31639,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatAssignmentAction); i { + switch v := v.(*CustomPaymentMethodsAction); i { case 0: return &v.state case 1: @@ -31168,7 +31651,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallLogAction); i { + switch v := v.(*CustomPaymentMethod); i { case 0: return &v.state case 1: @@ -31180,7 +31663,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BotWelcomeRequestAction); i { + switch v := v.(*CustomPaymentMethodMetadata); i { case 0: return &v.state case 1: @@ -31192,7 +31675,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveChatAction); i { + switch v := v.(*ContactAction); i { case 0: return &v.state case 1: @@ -31204,7 +31687,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AndroidUnsupportedActions); i { + switch v := v.(*ClearChatAction); i { case 0: return &v.state case 1: @@ -31216,7 +31699,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AgentAction); i { + switch v := v.(*ChatAssignmentOpenedStatusAction); i { case 0: return &v.state case 1: @@ -31228,7 +31711,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncActionData); i { + switch v := v.(*ChatAssignmentAction); i { case 0: return &v.state case 1: @@ -31240,7 +31723,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecentEmojiWeight); i { + switch v := v.(*CallLogAction); i { case 0: return &v.state case 1: @@ -31252,7 +31735,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatchDebugData); i { + switch v := v.(*BotWelcomeRequestAction); i { case 0: return &v.state case 1: @@ -31264,7 +31747,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallLogRecord); i { + switch v := v.(*ArchiveChatAction); i { case 0: return &v.state case 1: @@ -31276,7 +31759,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifiedNameCertificate); i { + switch v := v.(*AndroidUnsupportedActions); i { case 0: return &v.state case 1: @@ -31288,7 +31771,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalizedName); i { + switch v := v.(*AgentAction); i { case 0: return &v.state case 1: @@ -31300,7 +31783,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BizIdentityInfo); i { + switch v := v.(*SyncActionData); i { case 0: return &v.state case 1: @@ -31312,7 +31795,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BizAccountPayload); i { + switch v := v.(*RecentEmojiWeight); i { case 0: return &v.state case 1: @@ -31324,7 +31807,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BizAccountLinkInfo); i { + switch v := v.(*PatchDebugData); i { case 0: return &v.state case 1: @@ -31336,7 +31819,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeMessage); i { + switch v := v.(*CallLogRecord); i { case 0: return &v.state case 1: @@ -31348,7 +31831,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeServerHello); i { + switch v := v.(*VerifiedNameCertificate); i { case 0: return &v.state case 1: @@ -31360,7 +31843,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeClientHello); i { + switch v := v.(*LocalizedName); i { case 0: return &v.state case 1: @@ -31372,7 +31855,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeClientFinish); i { + switch v := v.(*BizIdentityInfo); i { case 0: return &v.state case 1: @@ -31384,7 +31867,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload); i { + switch v := v.(*BizAccountPayload); i { case 0: return &v.state case 1: @@ -31396,7 +31879,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebNotificationsInfo); i { + switch v := v.(*BizAccountLinkInfo); i { case 0: return &v.state case 1: @@ -31408,7 +31891,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebMessageInfo); i { + switch v := v.(*HandshakeMessage); i { case 0: return &v.state case 1: @@ -31420,7 +31903,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebFeatures); i { + switch v := v.(*HandshakeServerHello); i { case 0: return &v.state case 1: @@ -31432,7 +31915,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserReceipt); i { + switch v := v.(*HandshakeClientHello); i { case 0: return &v.state case 1: @@ -31444,7 +31927,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusPSA); i { + switch v := v.(*HandshakeClientFinish); i { case 0: return &v.state case 1: @@ -31456,7 +31939,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportingTokenInfo); i { + switch v := v.(*ClientPayload); i { case 0: return &v.state case 1: @@ -31468,7 +31951,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Reaction); i { + switch v := v.(*WebNotificationsInfo); i { case 0: return &v.state case 1: @@ -31480,7 +31963,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PremiumMessageInfo); i { + switch v := v.(*WebMessageInfo); i { case 0: return &v.state case 1: @@ -31492,7 +31975,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollUpdate); i { + switch v := v.(*WebFeatures); i { case 0: return &v.state case 1: @@ -31504,7 +31987,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollAdditionalMetadata); i { + switch v := v.(*UserReceipt); i { case 0: return &v.state case 1: @@ -31516,7 +31999,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PinInChat); i { + switch v := v.(*StatusPSA); i { case 0: return &v.state case 1: @@ -31528,7 +32011,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PhotoChange); i { + switch v := v.(*ReportingTokenInfo); i { case 0: return &v.state case 1: @@ -31540,7 +32023,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaymentInfo); i { + switch v := v.(*Reaction); i { case 0: return &v.state case 1: @@ -31552,7 +32035,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotificationMessageInfo); i { + switch v := v.(*PremiumMessageInfo); i { case 0: return &v.state case 1: @@ -31564,7 +32047,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageAddOnContextInfo); i { + switch v := v.(*PollUpdate); i { case 0: return &v.state case 1: @@ -31576,7 +32059,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MediaData); i { + switch v := v.(*PollAdditionalMetadata); i { case 0: return &v.state case 1: @@ -31588,7 +32071,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeepInChat); i { + switch v := v.(*PinInChat); i { case 0: return &v.state case 1: @@ -31600,7 +32083,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventResponse); i { + switch v := v.(*PhotoChange); i { case 0: return &v.state case 1: @@ -31612,7 +32095,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommentMetadata); i { + switch v := v.(*PaymentInfo); i { case 0: return &v.state case 1: @@ -31624,7 +32107,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoiseCertificate); i { + switch v := v.(*NotificationMessageInfo); i { case 0: return &v.state case 1: @@ -31636,7 +32119,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertChain); i { + switch v := v.(*MessageAddOnContextInfo); i { case 0: return &v.state case 1: @@ -31648,7 +32131,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QP); i { + switch v := v.(*MediaData); i { case 0: return &v.state case 1: @@ -31660,7 +32143,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceProps_HistorySyncConfig); i { + switch v := v.(*KeepInChat); i { case 0: return &v.state case 1: @@ -31672,7 +32155,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceProps_AppVersion); i { + switch v := v.(*EventResponse); i { case 0: return &v.state case 1: @@ -31684,7 +32167,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_ShopMessage); i { + switch v := v.(*CommentMetadata); i { case 0: return &v.state case 1: @@ -31696,7 +32179,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_NativeFlowMessage); i { + switch v := v.(*NoiseCertificate); i { case 0: return &v.state case 1: @@ -31708,7 +32191,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_Header); i { + switch v := v.(*CertChain); i { case 0: return &v.state case 1: @@ -31720,7 +32203,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_Footer); i { + switch v := v.(*QP); i { case 0: return &v.state case 1: @@ -31732,7 +32215,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_CollectionMessage); i { + switch v := v.(*DeviceProps_HistorySyncConfig); i { case 0: return &v.state case 1: @@ -31744,7 +32227,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_CarouselMessage); i { + switch v := v.(*DeviceProps_AppVersion); i { case 0: return &v.state case 1: @@ -31756,30 +32239,6 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_binary_proto_def_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_NativeFlowMessage_NativeFlowButton); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_binary_proto_def_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter); i { case 0: return &v.state @@ -31791,7 +32250,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime); i { case 0: return &v.state @@ -31803,7 +32262,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency); i { case 0: return &v.state @@ -31815,7 +32274,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch); i { case 0: return &v.state @@ -31827,7 +32286,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent); i { case 0: return &v.state @@ -31839,7 +32298,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CallLogMessage_CallParticipant); i { case 0: return &v.state @@ -31851,7 +32310,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ButtonsMessage_Button); i { case 0: return &v.state @@ -31863,7 +32322,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ButtonsMessage_Button_NativeFlowInfo); i { case 0: return &v.state @@ -31875,7 +32334,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ButtonsMessage_Button_ButtonText); i { case 0: return &v.state @@ -31887,7 +32346,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HydratedTemplateButton_HydratedURLButton); i { case 0: return &v.state @@ -31899,7 +32358,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HydratedTemplateButton_HydratedQuickReplyButton); i { case 0: return &v.state @@ -31911,7 +32370,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HydratedTemplateButton_HydratedCallButton); i { case 0: return &v.state @@ -31923,7 +32382,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[226].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContextInfo_UTMInfo); i { case 0: return &v.state @@ -31935,7 +32394,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[227].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContextInfo_ExternalAdReplyInfo); i { case 0: return &v.state @@ -31947,7 +32406,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[228].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[226].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContextInfo_DataSharingContext); i { case 0: return &v.state @@ -31959,7 +32418,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[229].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[227].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContextInfo_BusinessMessageForwardInfo); i { case 0: return &v.state @@ -31971,7 +32430,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[230].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[228].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContextInfo_AdReplyInfo); i { case 0: return &v.state @@ -31983,7 +32442,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[231].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[229].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TemplateButton_URLButton); i { case 0: return &v.state @@ -31995,7 +32454,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[232].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[230].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TemplateButton_QuickReplyButton); i { case 0: return &v.state @@ -32007,7 +32466,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[233].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[231].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TemplateButton_CallButton); i { case 0: return &v.state @@ -32019,7 +32478,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[234].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[232].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PaymentBackground_MediaData); i { case 0: return &v.state @@ -32031,7 +32490,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[235].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[233].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TemplateMessage_HydratedFourRowTemplate); i { case 0: return &v.state @@ -32043,7 +32502,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[236].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[234].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TemplateMessage_FourRowTemplate); i { case 0: return &v.state @@ -32055,7 +32514,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[237].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[235].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProductMessage_ProductSnapshot); i { case 0: return &v.state @@ -32067,7 +32526,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[238].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[236].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProductMessage_CatalogSnapshot); i { case 0: return &v.state @@ -32079,7 +32538,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[239].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[237].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PollCreationMessage_Option); i { case 0: return &v.state @@ -32091,7 +32550,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[240].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[238].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult); i { case 0: return &v.state @@ -32103,7 +32562,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[241].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[239].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse); i { case 0: return &v.state @@ -32115,7 +32574,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[242].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[240].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse); i { case 0: return &v.state @@ -32127,7 +32586,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[243].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[241].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail); i { case 0: return &v.state @@ -32139,7 +32598,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[244].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[242].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestMessage_RequestUrlPreview); i { case 0: return &v.state @@ -32151,7 +32610,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[245].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[243].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestMessage_RequestStickerReupload); i { case 0: return &v.state @@ -32163,7 +32622,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[246].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[244].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestMessage_PlaceholderMessageResendRequest); i { case 0: return &v.state @@ -32175,7 +32634,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[247].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[245].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerDataOperationRequestMessage_HistorySyncOnDemandRequest); i { case 0: return &v.state @@ -32187,7 +32646,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[248].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[246].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListResponseMessage_SingleSelectReply); i { case 0: return &v.state @@ -32199,7 +32658,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[249].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[247].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMessage_Section); i { case 0: return &v.state @@ -32211,7 +32670,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[250].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[248].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMessage_Row); i { case 0: return &v.state @@ -32223,7 +32682,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[251].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[249].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMessage_Product); i { case 0: return &v.state @@ -32235,7 +32694,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[252].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[250].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMessage_ProductSection); i { case 0: return &v.state @@ -32247,7 +32706,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[253].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[251].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMessage_ProductListInfo); i { case 0: return &v.state @@ -32259,7 +32718,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[254].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[252].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMessage_ProductListHeaderImage); i { case 0: return &v.state @@ -32271,7 +32730,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[255].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[253].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InteractiveResponseMessage_NativeFlowResponseMessage); i { case 0: return &v.state @@ -32283,7 +32742,7 @@ func file_binary_proto_def_proto_init() { return nil } } - file_binary_proto_def_proto_msgTypes[256].Exporter = func(v interface{}, i int) interface{} { + file_binary_proto_def_proto_msgTypes[254].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InteractiveResponseMessage_Body); i { case 0: return &v.state @@ -32295,8 +32754,32 @@ func file_binary_proto_def_proto_init() { return nil } } + file_binary_proto_def_proto_msgTypes[255].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InteractiveMessage_NativeFlowMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[256].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InteractiveMessage_Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_binary_proto_def_proto_msgTypes[257].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallLogRecord_ParticipantInfo); i { + switch v := v.(*InteractiveMessage_Footer); i { case 0: return &v.state case 1: @@ -32308,7 +32791,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[258].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifiedNameCertificate_Details); i { + switch v := v.(*InteractiveMessage_CollectionMessage); i { case 0: return &v.state case 1: @@ -32320,7 +32803,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[259].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_WebInfo); i { + switch v := v.(*InteractiveMessage_CarouselMessage); i { case 0: return &v.state case 1: @@ -32332,7 +32815,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[260].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_UserAgent); i { + switch v := v.(*InteractiveMessage_Body); i { case 0: return &v.state case 1: @@ -32344,7 +32827,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[261].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_InteropData); i { + switch v := v.(*InteractiveMessage_ShopMessage); i { case 0: return &v.state case 1: @@ -32356,7 +32839,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[262].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_DevicePairingRegistrationData); i { + switch v := v.(*InteractiveMessage_NativeFlowMessage_NativeFlowButton); i { case 0: return &v.state case 1: @@ -32368,7 +32851,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[263].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_DNSSource); i { + switch v := v.(*CallLogRecord_ParticipantInfo); i { case 0: return &v.state case 1: @@ -32380,7 +32863,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[264].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_WebInfo_WebdPayload); i { + switch v := v.(*VerifiedNameCertificate_Details); i { case 0: return &v.state case 1: @@ -32392,7 +32875,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[265].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_UserAgent_AppVersion); i { + switch v := v.(*ClientPayload_WebInfo); i { case 0: return &v.state case 1: @@ -32404,7 +32887,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[266].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoiseCertificate_Details); i { + switch v := v.(*ClientPayload_UserAgent); i { case 0: return &v.state case 1: @@ -32416,7 +32899,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[267].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertChain_NoiseCertificate); i { + switch v := v.(*ClientPayload_InteropData); i { case 0: return &v.state case 1: @@ -32428,7 +32911,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[268].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertChain_NoiseCertificate_Details); i { + switch v := v.(*ClientPayload_DevicePairingRegistrationData); i { case 0: return &v.state case 1: @@ -32440,7 +32923,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[269].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QP_Filter); i { + switch v := v.(*ClientPayload_DNSSource); i { case 0: return &v.state case 1: @@ -32452,7 +32935,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[270].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QP_FilterParameters); i { + switch v := v.(*ClientPayload_WebInfo_WebdPayload); i { case 0: return &v.state case 1: @@ -32464,6 +32947,78 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[271].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientPayload_UserAgent_AppVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[272].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NoiseCertificate_Details); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[273].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CertChain_NoiseCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[274].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CertChain_NoiseCertificate_Details); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[275].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QP_Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[276].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QP_FilterParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[277].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QP_FilterClause); i { case 0: return &v.state @@ -32476,12 +33031,6 @@ func file_binary_proto_def_proto_init() { } } } - file_binary_proto_def_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*InteractiveMessage_ShopStorefrontMessage)(nil), - (*InteractiveMessage_CollectionMessage_)(nil), - (*InteractiveMessage_NativeFlowMessage_)(nil), - (*InteractiveMessage_CarouselMessage_)(nil), - } file_binary_proto_def_proto_msgTypes[29].OneofWrappers = []interface{}{ (*ButtonsResponseMessage_SelectedDisplayText)(nil), } @@ -32492,64 +33041,70 @@ func file_binary_proto_def_proto_init() { (*ButtonsMessage_VideoMessage)(nil), (*ButtonsMessage_LocationMessage)(nil), } - file_binary_proto_def_proto_msgTypes[42].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[43].OneofWrappers = []interface{}{ (*InteractiveAnnotation_Location)(nil), (*InteractiveAnnotation_Newsletter)(nil), } - file_binary_proto_def_proto_msgTypes[43].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[44].OneofWrappers = []interface{}{ (*HydratedTemplateButton_QuickReplyButton)(nil), (*HydratedTemplateButton_UrlButton)(nil), (*HydratedTemplateButton_CallButton)(nil), } - file_binary_proto_def_proto_msgTypes[54].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[55].OneofWrappers = []interface{}{ (*TemplateButton_QuickReplyButton_)(nil), (*TemplateButton_UrlButton)(nil), (*TemplateButton_CallButton_)(nil), } - file_binary_proto_def_proto_msgTypes[62].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[63].OneofWrappers = []interface{}{ (*TemplateMessage_FourRowTemplate_)(nil), (*TemplateMessage_HydratedFourRowTemplate_)(nil), (*TemplateMessage_InteractiveMessageTemplate)(nil), } - file_binary_proto_def_proto_msgTypes[94].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[96].OneofWrappers = []interface{}{ (*InteractiveResponseMessage_NativeFlowResponseMessage_)(nil), } - file_binary_proto_def_proto_msgTypes[208].OneofWrappers = []interface{}{ - (*InteractiveMessage_Header_DocumentMessage)(nil), - (*InteractiveMessage_Header_ImageMessage)(nil), - (*InteractiveMessage_Header_JpegThumbnail)(nil), - (*InteractiveMessage_Header_VideoMessage)(nil), - (*InteractiveMessage_Header_LocationMessage)(nil), + file_binary_proto_def_proto_msgTypes[97].OneofWrappers = []interface{}{ + (*InteractiveMessage_ShopStorefrontMessage)(nil), + (*InteractiveMessage_CollectionMessage_)(nil), + (*InteractiveMessage_NativeFlowMessage_)(nil), + (*InteractiveMessage_CarouselMessage_)(nil), } - file_binary_proto_def_proto_msgTypes[214].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[212].OneofWrappers = []interface{}{ (*HighlyStructuredMessage_HSMLocalizableParameter_Currency)(nil), (*HighlyStructuredMessage_HSMLocalizableParameter_DateTime)(nil), } - file_binary_proto_def_proto_msgTypes[215].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[213].OneofWrappers = []interface{}{ (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_Component)(nil), (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_UnixEpoch)(nil), } - file_binary_proto_def_proto_msgTypes[235].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[233].OneofWrappers = []interface{}{ (*TemplateMessage_HydratedFourRowTemplate_DocumentMessage)(nil), (*TemplateMessage_HydratedFourRowTemplate_HydratedTitleText)(nil), (*TemplateMessage_HydratedFourRowTemplate_ImageMessage)(nil), (*TemplateMessage_HydratedFourRowTemplate_VideoMessage)(nil), (*TemplateMessage_HydratedFourRowTemplate_LocationMessage)(nil), } - file_binary_proto_def_proto_msgTypes[236].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[234].OneofWrappers = []interface{}{ (*TemplateMessage_FourRowTemplate_DocumentMessage)(nil), (*TemplateMessage_FourRowTemplate_HighlyStructuredMessage)(nil), (*TemplateMessage_FourRowTemplate_ImageMessage)(nil), (*TemplateMessage_FourRowTemplate_VideoMessage)(nil), (*TemplateMessage_FourRowTemplate_LocationMessage)(nil), } + file_binary_proto_def_proto_msgTypes[256].OneofWrappers = []interface{}{ + (*InteractiveMessage_Header_DocumentMessage)(nil), + (*InteractiveMessage_Header_ImageMessage)(nil), + (*InteractiveMessage_Header_JpegThumbnail)(nil), + (*InteractiveMessage_Header_VideoMessage)(nil), + (*InteractiveMessage_Header_LocationMessage)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_binary_proto_def_proto_rawDesc, - NumEnums: 83, - NumMessages: 272, + NumEnums: 84, + NumMessages: 278, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw index 0ca7ef6f..86a6c690 100644 Binary files a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw and b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw differ diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto b/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto index 7d51e919..16b20942 100644 --- a/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto +++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto @@ -92,74 +92,6 @@ message DeviceProps { optional HistorySyncConfig historySyncConfig = 5; } -message InteractiveMessage { - message ShopMessage { - enum Surface { - UNKNOWN_SURFACE = 0; - FB = 1; - IG = 2; - WA = 3; - } - optional string id = 1; - optional Surface surface = 2; - optional int32 messageVersion = 3; - } - - message NativeFlowMessage { - message NativeFlowButton { - optional string name = 1; - optional string buttonParamsJson = 2; - } - - repeated NativeFlowButton buttons = 1; - optional string messageParamsJson = 2; - optional int32 messageVersion = 3; - } - - message Header { - optional string title = 1; - optional string subtitle = 2; - optional bool hasMediaAttachment = 5; - oneof media { - DocumentMessage documentMessage = 3; - ImageMessage imageMessage = 4; - bytes jpegThumbnail = 6; - VideoMessage videoMessage = 7; - LocationMessage locationMessage = 8; - } - } - - message Footer { - optional string text = 1; - } - - message CollectionMessage { - optional string bizJid = 1; - optional string id = 2; - optional int32 messageVersion = 3; - } - - message CarouselMessage { - repeated InteractiveMessage cards = 1; - optional int32 messageVersion = 2; - } - - message Body { - optional string text = 1; - } - - optional Header header = 1; - optional Body body = 2; - optional Footer footer = 3; - optional ContextInfo contextInfo = 15; - oneof interactiveMessage { - ShopMessage shopStorefrontMessage = 4; - CollectionMessage collectionMessage = 5; - NativeFlowMessage nativeFlowMessage = 6; - CarouselMessage carouselMessage = 7; - } -} - message InitialSecurityNotificationSettingSync { optional bool securityNotificationEnabled = 1; } @@ -296,6 +228,11 @@ message FutureProofMessage { optional Message message = 1; } +message ExtendedTextMessageWithParentKey { + optional MessageKey key = 1; + optional ExtendedTextMessage extendedTextMessage = 2; +} + message ExtendedTextMessage { enum PreviewType { NONE = 0; @@ -633,6 +570,12 @@ message AppStateFatalExceptionNotification { optional int64 timestamp = 2; } +message MediaNotifyMessage { + optional string expressPathUrl = 1; + optional bytes fileEncSha256 = 2; + optional uint64 fileLength = 3; +} + message Location { optional double degreesLatitude = 1; optional double degreesLongitude = 2; @@ -695,11 +638,13 @@ message DisappearingMode { CHAT_SETTING = 1; ACCOUNT_SETTING = 2; BULK_CHANGE = 3; + BIZ_SUPPORTS_FB_HOSTING = 4; } enum Initiator { CHANGED_IN_CHAT = 0; INITIATED_BY_ME = 1; INITIATED_BY_OTHER = 2; + BIZ_UPGRADE_FB_HOSTING = 3; } optional Initiator initiator = 1; optional Trigger trigger = 2; @@ -834,6 +779,8 @@ message BotPluginMetadata { optional string profilePhotoCdnUrl = 4; optional string searchProviderUrl = 5; optional uint32 referenceIndex = 6; + optional uint32 expectedLinksCount = 7; + optional uint32 pluginVersion = 8; } message BotMetadata { @@ -841,6 +788,7 @@ message BotMetadata { optional string personaId = 2; optional BotPluginMetadata pluginMetadata = 3; optional BotSuggestedPromptMetadata suggestedPromptMetadata = 4; + optional string invokerJid = 5; } message BotAvatarMetadata { @@ -985,6 +933,8 @@ message Message { optional EncEventResponseMessage encEventResponseMessage = 76; optional CommentMessage commentMessage = 77; optional NewsletterAdminInviteMessage newsletterAdminInviteMessage = 78; + optional ExtendedTextMessageWithParentKey extendedTextMessageWithParentKey = 79; + optional PlaceholderMessage placeholderMessage = 80; } message MessageSecretMessage { @@ -1042,6 +992,7 @@ message TemplateMessage { optional string hydratedFooterText = 7; repeated HydratedTemplateButton hydratedButtons = 8; optional string templateId = 9; + optional bool maskLinkedDevices = 10; oneof title { DocumentMessage documentMessage = 1; string hydratedTitleText = 2; @@ -1187,6 +1138,7 @@ message ProtocolMessage { PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17; REQUEST_WELCOME_MESSAGE = 18; BOT_FEEDBACK_MESSAGE = 19; + MEDIA_NOTIFY_MESSAGE = 20; } optional MessageKey key = 1; optional Type type = 2; @@ -1205,6 +1157,7 @@ message ProtocolMessage { optional BotFeedbackMessage botFeedbackMessage = 18; optional string invokerJid = 19; optional RequestWelcomeMessageMetadata requestWelcomeMessageMetadata = 20; + optional MediaNotifyMessage mediaNotifyMessage = 21; } message ProductMessage { @@ -1267,6 +1220,13 @@ message PollCreationMessage { optional ContextInfo contextInfo = 5; } +message PlaceholderMessage { + enum PlaceholderType { + MASK_LINKED_DEVICES = 0; + } + optional PlaceholderType type = 1; +} + message PinInChatMessage { enum Type { UNKNOWN_TYPE = 0; @@ -1544,6 +1504,74 @@ message InteractiveResponseMessage { } } +message InteractiveMessage { + message NativeFlowMessage { + message NativeFlowButton { + optional string name = 1; + optional string buttonParamsJson = 2; + } + + repeated NativeFlowButton buttons = 1; + optional string messageParamsJson = 2; + optional int32 messageVersion = 3; + } + + message Header { + optional string title = 1; + optional string subtitle = 2; + optional bool hasMediaAttachment = 5; + oneof media { + DocumentMessage documentMessage = 3; + ImageMessage imageMessage = 4; + bytes jpegThumbnail = 6; + VideoMessage videoMessage = 7; + LocationMessage locationMessage = 8; + } + } + + message Footer { + optional string text = 1; + } + + message CollectionMessage { + optional string bizJid = 1; + optional string id = 2; + optional int32 messageVersion = 3; + } + + message CarouselMessage { + repeated InteractiveMessage cards = 1; + optional int32 messageVersion = 2; + } + + message Body { + optional string text = 1; + } + + message ShopMessage { + enum Surface { + UNKNOWN_SURFACE = 0; + FB = 1; + IG = 2; + WA = 3; + } + optional string id = 1; + optional Surface surface = 2; + optional int32 messageVersion = 3; + } + + optional Header header = 1; + optional Body body = 2; + optional Footer footer = 3; + optional ContextInfo contextInfo = 15; + oneof interactiveMessage { + ShopMessage shopStorefrontMessage = 4; + CollectionMessage collectionMessage = 5; + NativeFlowMessage nativeFlowMessage = 6; + CarouselMessage carouselMessage = 7; + } +} + message EphemeralSetting { optional sfixed32 duration = 1; optional sfixed64 timestamp = 2; @@ -1880,6 +1908,7 @@ message SyncActionValue { optional DeleteIndividualCallLogAction deleteIndividualCallLog = 46; optional LabelReorderingAction labelReorderingAction = 47; optional PaymentInfoAction paymentInfoAction = 48; + optional CustomPaymentMethodsAction customPaymentMethodsAction = 49; } message UserStatusMuteAction { @@ -2060,6 +2089,22 @@ message DeleteChatAction { optional SyncActionMessageRange messageRange = 1; } +message CustomPaymentMethodsAction { + repeated CustomPaymentMethod customPaymentMethods = 1; +} + +message CustomPaymentMethod { + required string credentialId = 1; + required string country = 2; + required string type = 3; + repeated CustomPaymentMethodMetadata metadata = 4; +} + +message CustomPaymentMethodMetadata { + required string key = 1; + required string value = 2; +} + message ContactAction { optional string fullName = 1; optional string firstName = 2; @@ -2343,6 +2388,7 @@ message ClientPayload { BLUE_WEB = 32; IPAD = 33; TEST = 34; + SMART_GLASSES = 35; } enum DeviceType { PHONE = 0; diff --git a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go index 62dcf529..1374c46c 100644 --- a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +++ b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go @@ -74,7 +74,7 @@ func (vc WAVersionContainer) ProtoAppVersion() *waProto.ClientPayload_UserAgent_ } // waVersion is the WhatsApp web client version -var waVersion = WAVersionContainer{2, 2353, 59} +var waVersion = WAVersionContainer{2, 2402, 5} // waVersionHash is the md5 hash of a dot-separated waVersion var waVersionHash [16]byte diff --git a/vendor/go.mau.fi/whatsmeow/upload.go b/vendor/go.mau.fi/whatsmeow/upload.go index 2f6c7cec..207d4077 100644 --- a/vendor/go.mau.fi/whatsmeow/upload.go +++ b/vendor/go.mau.fi/whatsmeow/upload.go @@ -120,7 +120,6 @@ func (cli *Client) Upload(ctx context.Context, plaintext []byte, appInfo MediaTy // MediaHandle: resp.Handle, // }) // // handle error again - func (cli *Client) UploadNewsletter(ctx context.Context, data []byte, appInfo MediaType) (resp UploadResponse, err error) { resp.FileLength = uint64(len(data)) hash := sha256.Sum256(data) diff --git a/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go b/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go deleted file mode 100644 index d33c8890..00000000 --- a/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.13 - -package poly1305 - -// Generic fallbacks for the math/bits intrinsics, copied from -// src/math/bits/bits.go. They were added in Go 1.12, but Add64 and Sum64 had -// variable time fallbacks until Go 1.13. - -func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) { - sum = x + y + carry - carryOut = ((x & y) | ((x | y) &^ sum)) >> 63 - return -} - -func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) { - diff = x - y - borrow - borrowOut = ((^x & y) | (^(x ^ y) & diff)) >> 63 - return -} - -func bitsMul64(x, y uint64) (hi, lo uint64) { - const mask32 = 1<<32 - 1 - x0 := x & mask32 - x1 := x >> 32 - y0 := y & mask32 - y1 := y >> 32 - w0 := x0 * y0 - t := x1*y0 + w0>>32 - w1 := t & mask32 - w2 := t >> 32 - w1 += x0 * y1 - hi = x1*y1 + w2 + w1>>32 - lo = x * y - return -} diff --git a/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go b/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go deleted file mode 100644 index 495c1fa6..00000000 --- a/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.13 - -package poly1305 - -import "math/bits" - -func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) { - return bits.Add64(x, y, carry) -} - -func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) { - return bits.Sub64(x, y, borrow) -} - -func bitsMul64(x, y uint64) (hi, lo uint64) { - return bits.Mul64(x, y) -} diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go index e041da5e..ec2202bd 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go @@ -7,7 +7,10 @@ package poly1305 -import "encoding/binary" +import ( + "encoding/binary" + "math/bits" +) // Poly1305 [RFC 7539] is a relatively simple algorithm: the authentication tag // for a 64 bytes message is approximately @@ -114,13 +117,13 @@ type uint128 struct { } func mul64(a, b uint64) uint128 { - hi, lo := bitsMul64(a, b) + hi, lo := bits.Mul64(a, b) return uint128{lo, hi} } func add128(a, b uint128) uint128 { - lo, c := bitsAdd64(a.lo, b.lo, 0) - hi, c := bitsAdd64(a.hi, b.hi, c) + lo, c := bits.Add64(a.lo, b.lo, 0) + hi, c := bits.Add64(a.hi, b.hi, c) if c != 0 { panic("poly1305: unexpected overflow") } @@ -155,8 +158,8 @@ func updateGeneric(state *macState, msg []byte) { // hide leading zeroes. For full chunks, that's 1 << 128, so we can just // add 1 to the most significant (2¹²⁸) limb, h2. if len(msg) >= TagSize { - h0, c = bitsAdd64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0) - h1, c = bitsAdd64(h1, binary.LittleEndian.Uint64(msg[8:16]), c) + h0, c = bits.Add64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0) + h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(msg[8:16]), c) h2 += c + 1 msg = msg[TagSize:] @@ -165,8 +168,8 @@ func updateGeneric(state *macState, msg []byte) { copy(buf[:], msg) buf[len(msg)] = 1 - h0, c = bitsAdd64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0) - h1, c = bitsAdd64(h1, binary.LittleEndian.Uint64(buf[8:16]), c) + h0, c = bits.Add64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0) + h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(buf[8:16]), c) h2 += c msg = nil @@ -219,9 +222,9 @@ func updateGeneric(state *macState, msg []byte) { m3 := h2r1 t0 := m0.lo - t1, c := bitsAdd64(m1.lo, m0.hi, 0) - t2, c := bitsAdd64(m2.lo, m1.hi, c) - t3, _ := bitsAdd64(m3.lo, m2.hi, c) + t1, c := bits.Add64(m1.lo, m0.hi, 0) + t2, c := bits.Add64(m2.lo, m1.hi, c) + t3, _ := bits.Add64(m3.lo, m2.hi, c) // Now we have the result as 4 64-bit limbs, and we need to reduce it // modulo 2¹³⁰ - 5. The special shape of this Crandall prime lets us do @@ -243,14 +246,14 @@ func updateGeneric(state *macState, msg []byte) { // To add c * 5 to h, we first add cc = c * 4, and then add (cc >> 2) = c. - h0, c = bitsAdd64(h0, cc.lo, 0) - h1, c = bitsAdd64(h1, cc.hi, c) + h0, c = bits.Add64(h0, cc.lo, 0) + h1, c = bits.Add64(h1, cc.hi, c) h2 += c cc = shiftRightBy2(cc) - h0, c = bitsAdd64(h0, cc.lo, 0) - h1, c = bitsAdd64(h1, cc.hi, c) + h0, c = bits.Add64(h0, cc.lo, 0) + h1, c = bits.Add64(h1, cc.hi, c) h2 += c // h2 is at most 3 + 1 + 1 = 5, making the whole of h at most @@ -287,9 +290,9 @@ func finalize(out *[TagSize]byte, h *[3]uint64, s *[2]uint64) { // in constant time, we compute t = h - (2¹³⁰ - 5), and select h as the // result if the subtraction underflows, and t otherwise. - hMinusP0, b := bitsSub64(h0, p0, 0) - hMinusP1, b := bitsSub64(h1, p1, b) - _, b = bitsSub64(h2, p2, b) + hMinusP0, b := bits.Sub64(h0, p0, 0) + hMinusP1, b := bits.Sub64(h1, p1, b) + _, b = bits.Sub64(h2, p2, b) // h = h if h < p else h - p h0 = select64(b, h0, hMinusP0) @@ -301,8 +304,8 @@ func finalize(out *[TagSize]byte, h *[3]uint64, s *[2]uint64) { // // by just doing a wide addition with the 128 low bits of h and discarding // the overflow. - h0, c := bitsAdd64(h0, s[0], 0) - h1, _ = bitsAdd64(h1, s[1], c) + h0, c := bits.Add64(h0, s[0], 0) + h1, _ = bits.Add64(h1, s[1], c) binary.LittleEndian.PutUint64(out[0:8], h0) binary.LittleEndian.PutUint64(out[8:16], h1) diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go index b18efb74..948a3ee6 100644 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -4,6 +4,9 @@ // Package errgroup provides synchronization, error propagation, and Context // cancelation for groups of goroutines working on subtasks of a common task. +// +// [errgroup.Group] is related to [sync.WaitGroup] but adds handling of tasks +// returning errors. package errgroup import ( diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 6202638b..c6492020 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -248,6 +248,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -283,10 +284,6 @@ struct ltchars { #include #endif -#ifndef MSG_FASTOPEN -#define MSG_FASTOPEN 0x20000000 -#endif - #ifndef PTRACE_GETREGS #define PTRACE_GETREGS 0xc #endif @@ -295,14 +292,6 @@ struct ltchars { #define PTRACE_SETREGS 0xd #endif -#ifndef SOL_NETLINK -#define SOL_NETLINK 270 -#endif - -#ifndef SOL_SMC -#define SOL_SMC 286 -#endif - #ifdef SOL_BLUETOOTH // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h // but it is already in bluetooth_linux.go @@ -319,10 +308,23 @@ struct ltchars { #undef TIPC_WAIT_FOREVER #define TIPC_WAIT_FOREVER 0xffffffff -// Copied from linux/l2tp.h -// Including linux/l2tp.h here causes conflicts between linux/in.h -// and netinet/in.h included via net/route.h above. -#define IPPROTO_L2TP 115 +// Copied from linux/netfilter/nf_nat.h +// Including linux/netfilter/nf_nat.h here causes conflicts between linux/in.h +// and netinet/in.h. +#define NF_NAT_RANGE_MAP_IPS (1 << 0) +#define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1) +#define NF_NAT_RANGE_PROTO_RANDOM (1 << 2) +#define NF_NAT_RANGE_PERSISTENT (1 << 3) +#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4) +#define NF_NAT_RANGE_PROTO_OFFSET (1 << 5) +#define NF_NAT_RANGE_NETMAP (1 << 6) +#define NF_NAT_RANGE_PROTO_RANDOM_ALL \ + (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) +#define NF_NAT_RANGE_MASK \ + (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ + NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ + NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \ + NF_NAT_RANGE_NETMAP) // Copied from linux/hid.h. // Keep in sync with the size of the referenced fields. @@ -603,6 +605,9 @@ ccflags="$@" $2 ~ /^FSOPT_/ || $2 ~ /^WDIO[CFS]_/ || $2 ~ /^NFN/ || + $2 !~ /^NFT_META_IIFTYPE/ && + $2 ~ /^NFT_/ || + $2 ~ /^NF_NAT_/ || $2 ~ /^XDP_/ || $2 ~ /^RWF_/ || $2 ~ /^(HDIO|WIN|SMART)_/ || diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index c73cfe2f..a5d3ff8d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -2127,6 +2127,60 @@ const ( NFNL_SUBSYS_QUEUE = 0x3 NFNL_SUBSYS_ULOG = 0x4 NFS_SUPER_MAGIC = 0x6969 + NFT_CHAIN_FLAGS = 0x7 + NFT_CHAIN_MAXNAMELEN = 0x100 + NFT_CT_MAX = 0x17 + NFT_DATA_RESERVED_MASK = 0xffffff00 + NFT_DATA_VALUE_MAXLEN = 0x40 + NFT_EXTHDR_OP_MAX = 0x4 + NFT_FIB_RESULT_MAX = 0x3 + NFT_INNER_MASK = 0xf + NFT_LOGLEVEL_MAX = 0x8 + NFT_NAME_MAXLEN = 0x100 + NFT_NG_MAX = 0x1 + NFT_OBJECT_CONNLIMIT = 0x5 + NFT_OBJECT_COUNTER = 0x1 + NFT_OBJECT_CT_EXPECT = 0x9 + NFT_OBJECT_CT_HELPER = 0x3 + NFT_OBJECT_CT_TIMEOUT = 0x7 + NFT_OBJECT_LIMIT = 0x4 + NFT_OBJECT_MAX = 0xa + NFT_OBJECT_QUOTA = 0x2 + NFT_OBJECT_SECMARK = 0x8 + NFT_OBJECT_SYNPROXY = 0xa + NFT_OBJECT_TUNNEL = 0x6 + NFT_OBJECT_UNSPEC = 0x0 + NFT_OBJ_MAXNAMELEN = 0x100 + NFT_OSF_MAXGENRELEN = 0x10 + NFT_QUEUE_FLAG_BYPASS = 0x1 + NFT_QUEUE_FLAG_CPU_FANOUT = 0x2 + NFT_QUEUE_FLAG_MASK = 0x3 + NFT_REG32_COUNT = 0x10 + NFT_REG32_SIZE = 0x4 + NFT_REG_MAX = 0x4 + NFT_REG_SIZE = 0x10 + NFT_REJECT_ICMPX_MAX = 0x3 + NFT_RT_MAX = 0x4 + NFT_SECMARK_CTX_MAXLEN = 0x100 + NFT_SET_MAXNAMELEN = 0x100 + NFT_SOCKET_MAX = 0x3 + NFT_TABLE_F_MASK = 0x3 + NFT_TABLE_MAXNAMELEN = 0x100 + NFT_TRACETYPE_MAX = 0x3 + NFT_TUNNEL_F_MASK = 0x7 + NFT_TUNNEL_MAX = 0x1 + NFT_TUNNEL_MODE_MAX = 0x2 + NFT_USERDATA_MAXLEN = 0x100 + NFT_XFRM_KEY_MAX = 0x6 + NF_NAT_RANGE_MAP_IPS = 0x1 + NF_NAT_RANGE_MASK = 0x7f + NF_NAT_RANGE_NETMAP = 0x40 + NF_NAT_RANGE_PERSISTENT = 0x8 + NF_NAT_RANGE_PROTO_OFFSET = 0x20 + NF_NAT_RANGE_PROTO_RANDOM = 0x4 + NF_NAT_RANGE_PROTO_RANDOM_ALL = 0x14 + NF_NAT_RANGE_PROTO_RANDOM_FULLY = 0x10 + NF_NAT_RANGE_PROTO_SPECIFIED = 0x2 NILFS_SUPER_MAGIC = 0x3434 NL0 = 0x0 NL1 = 0x100 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index a1d06159..9dc42410 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 5b2a7409..0d3a0751 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index f6eda134..c39f7776 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 55df20ae..57571d07 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index 8c1155cb..e62963e6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 7cc80c58..00831354 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 0688737f..79029ed5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -2297,5 +2297,3 @@ func unveil(path *byte, flags *byte) (err error) { var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" - - diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 47dc5796..ffb8708c 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -194,6 +194,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW //sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW //sys SetEndOfFile(handle Handle) (err error) +//sys SetFileValidData(handle Handle, validDataLength int64) (err error) //sys GetSystemTimeAsFileTime(time *Filetime) //sys GetSystemTimePreciseAsFileTime(time *Filetime) //sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 146a1f01..e8791c82 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -342,6 +342,7 @@ var ( procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") + procSetFileValidData = modkernel32.NewProc("SetFileValidData") procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW") procSetErrorMode = modkernel32.NewProc("SetErrorMode") procSetEvent = modkernel32.NewProc("SetEvent") @@ -2988,6 +2989,14 @@ func SetEndOfFile(handle Handle) (err error) { return } +func SetFileValidData(handle Handle, validDataLength int64) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0) if r1 == 0 { diff --git a/vendor/gopkg.in/yaml.v2/.travis.yml b/vendor/gopkg.in/yaml.v2/.travis.yml deleted file mode 100644 index 7348c50c..00000000 --- a/vendor/gopkg.in/yaml.v2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: go - -go: - - "1.4.x" - - "1.5.x" - - "1.6.x" - - "1.7.x" - - "1.8.x" - - "1.9.x" - - "1.10.x" - - "1.11.x" - - "1.12.x" - - "1.13.x" - - "1.14.x" - - "tip" - -go_import_path: gopkg.in/yaml.v2 diff --git a/vendor/gopkg.in/yaml.v2/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/vendor/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/gopkg.in/yaml.v2/LICENSE.libyaml b/vendor/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fbf..00000000 --- a/vendor/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -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. diff --git a/vendor/gopkg.in/yaml.v2/NOTICE b/vendor/gopkg.in/yaml.v2/NOTICE deleted file mode 100644 index 866d74a7..00000000 --- a/vendor/gopkg.in/yaml.v2/NOTICE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2011-2016 Canonical Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/vendor/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md deleted file mode 100644 index b50c6e87..00000000 --- a/vendor/gopkg.in/yaml.v2/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# YAML support for the Go language - -Introduction ------------- - -The yaml package enables Go programs to comfortably encode and decode YAML -values. It was developed within [Canonical](https://www.canonical.com) as -part of the [juju](https://juju.ubuntu.com) project, and is based on a -pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) -C library to parse and generate YAML data quickly and reliably. - -Compatibility -------------- - -The yaml package supports most of YAML 1.1 and 1.2, including support for -anchors, tags, map merging, etc. Multi-document unmarshalling is not yet -implemented, and base-60 floats from YAML 1.1 are purposefully not -supported since they're a poor design and are gone in YAML 1.2. - -Installation and usage ----------------------- - -The import path for the package is *gopkg.in/yaml.v2*. - -To install it, run: - - go get gopkg.in/yaml.v2 - -API documentation ------------------ - -If opened in a browser, the import path itself leads to the API documentation: - - * [https://gopkg.in/yaml.v2](https://gopkg.in/yaml.v2) - -API stability -------------- - -The package API for yaml v2 will remain stable as described in [gopkg.in](https://gopkg.in). - - -License -------- - -The yaml package is licensed under the Apache License 2.0. Please see the LICENSE file for details. - - -Example -------- - -```Go -package main - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v2" -) - -var data = ` -a: Easy! -b: - c: 2 - d: [3, 4] -` - -// Note: struct fields must be public in order for unmarshal to -// correctly populate the data. -type T struct { - A string - B struct { - RenamedC int `yaml:"c"` - D []int `yaml:",flow"` - } -} - -func main() { - t := T{} - - err := yaml.Unmarshal([]byte(data), &t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t:\n%v\n\n", t) - - d, err := yaml.Marshal(&t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t dump:\n%s\n\n", string(d)) - - m := make(map[interface{}]interface{}) - - err = yaml.Unmarshal([]byte(data), &m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m:\n%v\n\n", m) - - d, err = yaml.Marshal(&m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m dump:\n%s\n\n", string(d)) -} -``` - -This example will generate the following output: - -``` ---- t: -{Easy! {2 [3 4]}} - ---- t dump: -a: Easy! -b: - c: 2 - d: [3, 4] - - ---- m: -map[a:Easy! b:map[c:2 d:[3 4]]] - ---- m dump: -a: Easy! -b: - c: 2 - d: - - 3 - - 4 -``` - diff --git a/vendor/gopkg.in/yaml.v2/apic.go b/vendor/gopkg.in/yaml.v2/apic.go deleted file mode 100644 index acf71402..00000000 --- a/vendor/gopkg.in/yaml.v2/apic.go +++ /dev/null @@ -1,744 +0,0 @@ -package yaml - -import ( - "io" -) - -func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { - //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) - - // Check if we can move the queue at the beginning of the buffer. - if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { - if parser.tokens_head != len(parser.tokens) { - copy(parser.tokens, parser.tokens[parser.tokens_head:]) - } - parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] - parser.tokens_head = 0 - } - parser.tokens = append(parser.tokens, *token) - if pos < 0 { - return - } - copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) - parser.tokens[parser.tokens_head+pos] = *token -} - -// Create a new parser object. -func yaml_parser_initialize(parser *yaml_parser_t) bool { - *parser = yaml_parser_t{ - raw_buffer: make([]byte, 0, input_raw_buffer_size), - buffer: make([]byte, 0, input_buffer_size), - } - return true -} - -// Destroy a parser object. -func yaml_parser_delete(parser *yaml_parser_t) { - *parser = yaml_parser_t{} -} - -// String read handler. -func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - if parser.input_pos == len(parser.input) { - return 0, io.EOF - } - n = copy(buffer, parser.input[parser.input_pos:]) - parser.input_pos += n - return n, nil -} - -// Reader read handler. -func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - return parser.input_reader.Read(buffer) -} - -// Set a string input. -func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_string_read_handler - parser.input = input - parser.input_pos = 0 -} - -// Set a file input. -func yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_reader_read_handler - parser.input_reader = r -} - -// Set the source encoding. -func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { - if parser.encoding != yaml_ANY_ENCODING { - panic("must set the encoding only once") - } - parser.encoding = encoding -} - -var disableLineWrapping = false - -// Create a new emitter object. -func yaml_emitter_initialize(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{ - buffer: make([]byte, output_buffer_size), - raw_buffer: make([]byte, 0, output_raw_buffer_size), - states: make([]yaml_emitter_state_t, 0, initial_stack_size), - events: make([]yaml_event_t, 0, initial_queue_size), - } - if disableLineWrapping { - emitter.best_width = -1 - } -} - -// Destroy an emitter object. -func yaml_emitter_delete(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{} -} - -// String write handler. -func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - *emitter.output_buffer = append(*emitter.output_buffer, buffer...) - return nil -} - -// yaml_writer_write_handler uses emitter.output_writer to write the -// emitted text. -func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - _, err := emitter.output_writer.Write(buffer) - return err -} - -// Set a string output. -func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_string_write_handler - emitter.output_buffer = output_buffer -} - -// Set a file output. -func yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_writer_write_handler - emitter.output_writer = w -} - -// Set the output encoding. -func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { - if emitter.encoding != yaml_ANY_ENCODING { - panic("must set the output encoding only once") - } - emitter.encoding = encoding -} - -// Set the canonical output style. -func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { - emitter.canonical = canonical -} - -//// Set the indentation increment. -func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { - if indent < 2 || indent > 9 { - indent = 2 - } - emitter.best_indent = indent -} - -// Set the preferred line width. -func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { - if width < 0 { - width = -1 - } - emitter.best_width = width -} - -// Set if unescaped non-ASCII characters are allowed. -func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { - emitter.unicode = unicode -} - -// Set the preferred line break character. -func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { - emitter.line_break = line_break -} - -///* -// * Destroy a token object. -// */ -// -//YAML_DECLARE(void) -//yaml_token_delete(yaml_token_t *token) -//{ -// assert(token); // Non-NULL token object expected. -// -// switch (token.type) -// { -// case YAML_TAG_DIRECTIVE_TOKEN: -// yaml_free(token.data.tag_directive.handle); -// yaml_free(token.data.tag_directive.prefix); -// break; -// -// case YAML_ALIAS_TOKEN: -// yaml_free(token.data.alias.value); -// break; -// -// case YAML_ANCHOR_TOKEN: -// yaml_free(token.data.anchor.value); -// break; -// -// case YAML_TAG_TOKEN: -// yaml_free(token.data.tag.handle); -// yaml_free(token.data.tag.suffix); -// break; -// -// case YAML_SCALAR_TOKEN: -// yaml_free(token.data.scalar.value); -// break; -// -// default: -// break; -// } -// -// memset(token, 0, sizeof(yaml_token_t)); -//} -// -///* -// * Check if a string is a valid UTF-8 sequence. -// * -// * Check 'reader.c' for more details on UTF-8 encoding. -// */ -// -//static int -//yaml_check_utf8(yaml_char_t *start, size_t length) -//{ -// yaml_char_t *end = start+length; -// yaml_char_t *pointer = start; -// -// while (pointer < end) { -// unsigned char octet; -// unsigned int width; -// unsigned int value; -// size_t k; -// -// octet = pointer[0]; -// width = (octet & 0x80) == 0x00 ? 1 : -// (octet & 0xE0) == 0xC0 ? 2 : -// (octet & 0xF0) == 0xE0 ? 3 : -// (octet & 0xF8) == 0xF0 ? 4 : 0; -// value = (octet & 0x80) == 0x00 ? octet & 0x7F : -// (octet & 0xE0) == 0xC0 ? octet & 0x1F : -// (octet & 0xF0) == 0xE0 ? octet & 0x0F : -// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; -// if (!width) return 0; -// if (pointer+width > end) return 0; -// for (k = 1; k < width; k ++) { -// octet = pointer[k]; -// if ((octet & 0xC0) != 0x80) return 0; -// value = (value << 6) + (octet & 0x3F); -// } -// if (!((width == 1) || -// (width == 2 && value >= 0x80) || -// (width == 3 && value >= 0x800) || -// (width == 4 && value >= 0x10000))) return 0; -// -// pointer += width; -// } -// -// return 1; -//} -// - -// Create STREAM-START. -func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) { - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - encoding: encoding, - } -} - -// Create STREAM-END. -func yaml_stream_end_event_initialize(event *yaml_event_t) { - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - } -} - -// Create DOCUMENT-START. -func yaml_document_start_event_initialize( - event *yaml_event_t, - version_directive *yaml_version_directive_t, - tag_directives []yaml_tag_directive_t, - implicit bool, -) { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: implicit, - } -} - -// Create DOCUMENT-END. -func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - implicit: implicit, - } -} - -///* -// * Create ALIAS. -// */ -// -//YAML_DECLARE(int) -//yaml_alias_event_initialize(event *yaml_event_t, anchor *yaml_char_t) -//{ -// mark yaml_mark_t = { 0, 0, 0 } -// anchor_copy *yaml_char_t = NULL -// -// assert(event) // Non-NULL event object is expected. -// assert(anchor) // Non-NULL anchor is expected. -// -// if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0 -// -// anchor_copy = yaml_strdup(anchor) -// if (!anchor_copy) -// return 0 -// -// ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark) -// -// return 1 -//} - -// Create SCALAR. -func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - anchor: anchor, - tag: tag, - value: value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-START. -func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-END. -func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - } - return true -} - -// Create MAPPING-START. -func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) { - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } -} - -// Create MAPPING-END. -func yaml_mapping_end_event_initialize(event *yaml_event_t) { - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - } -} - -// Destroy an event object. -func yaml_event_delete(event *yaml_event_t) { - *event = yaml_event_t{} -} - -///* -// * Create a document object. -// */ -// -//YAML_DECLARE(int) -//yaml_document_initialize(document *yaml_document_t, -// version_directive *yaml_version_directive_t, -// tag_directives_start *yaml_tag_directive_t, -// tag_directives_end *yaml_tag_directive_t, -// start_implicit int, end_implicit int) -//{ -// struct { -// error yaml_error_type_t -// } context -// struct { -// start *yaml_node_t -// end *yaml_node_t -// top *yaml_node_t -// } nodes = { NULL, NULL, NULL } -// version_directive_copy *yaml_version_directive_t = NULL -// struct { -// start *yaml_tag_directive_t -// end *yaml_tag_directive_t -// top *yaml_tag_directive_t -// } tag_directives_copy = { NULL, NULL, NULL } -// value yaml_tag_directive_t = { NULL, NULL } -// mark yaml_mark_t = { 0, 0, 0 } -// -// assert(document) // Non-NULL document object is expected. -// assert((tag_directives_start && tag_directives_end) || -// (tag_directives_start == tag_directives_end)) -// // Valid tag directives are expected. -// -// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error -// -// if (version_directive) { -// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) -// if (!version_directive_copy) goto error -// version_directive_copy.major = version_directive.major -// version_directive_copy.minor = version_directive.minor -// } -// -// if (tag_directives_start != tag_directives_end) { -// tag_directive *yaml_tag_directive_t -// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) -// goto error -// for (tag_directive = tag_directives_start -// tag_directive != tag_directives_end; tag_directive ++) { -// assert(tag_directive.handle) -// assert(tag_directive.prefix) -// if (!yaml_check_utf8(tag_directive.handle, -// strlen((char *)tag_directive.handle))) -// goto error -// if (!yaml_check_utf8(tag_directive.prefix, -// strlen((char *)tag_directive.prefix))) -// goto error -// value.handle = yaml_strdup(tag_directive.handle) -// value.prefix = yaml_strdup(tag_directive.prefix) -// if (!value.handle || !value.prefix) goto error -// if (!PUSH(&context, tag_directives_copy, value)) -// goto error -// value.handle = NULL -// value.prefix = NULL -// } -// } -// -// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, -// tag_directives_copy.start, tag_directives_copy.top, -// start_implicit, end_implicit, mark, mark) -// -// return 1 -// -//error: -// STACK_DEL(&context, nodes) -// yaml_free(version_directive_copy) -// while (!STACK_EMPTY(&context, tag_directives_copy)) { -// value yaml_tag_directive_t = POP(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// } -// STACK_DEL(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// -// return 0 -//} -// -///* -// * Destroy a document object. -// */ -// -//YAML_DECLARE(void) -//yaml_document_delete(document *yaml_document_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// tag_directive *yaml_tag_directive_t -// -// context.error = YAML_NO_ERROR // Eliminate a compiler warning. -// -// assert(document) // Non-NULL document object is expected. -// -// while (!STACK_EMPTY(&context, document.nodes)) { -// node yaml_node_t = POP(&context, document.nodes) -// yaml_free(node.tag) -// switch (node.type) { -// case YAML_SCALAR_NODE: -// yaml_free(node.data.scalar.value) -// break -// case YAML_SEQUENCE_NODE: -// STACK_DEL(&context, node.data.sequence.items) -// break -// case YAML_MAPPING_NODE: -// STACK_DEL(&context, node.data.mapping.pairs) -// break -// default: -// assert(0) // Should not happen. -// } -// } -// STACK_DEL(&context, document.nodes) -// -// yaml_free(document.version_directive) -// for (tag_directive = document.tag_directives.start -// tag_directive != document.tag_directives.end -// tag_directive++) { -// yaml_free(tag_directive.handle) -// yaml_free(tag_directive.prefix) -// } -// yaml_free(document.tag_directives.start) -// -// memset(document, 0, sizeof(yaml_document_t)) -//} -// -///** -// * Get a document node. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_node(document *yaml_document_t, index int) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (index > 0 && document.nodes.start + index <= document.nodes.top) { -// return document.nodes.start + index - 1 -// } -// return NULL -//} -// -///** -// * Get the root object. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_root_node(document *yaml_document_t) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (document.nodes.top != document.nodes.start) { -// return document.nodes.start -// } -// return NULL -//} -// -///* -// * Add a scalar node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_scalar(document *yaml_document_t, -// tag *yaml_char_t, value *yaml_char_t, length int, -// style yaml_scalar_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// value_copy *yaml_char_t = NULL -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// assert(value) // Non-NULL value is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (length < 0) { -// length = strlen((char *)value) -// } -// -// if (!yaml_check_utf8(value, length)) goto error -// value_copy = yaml_malloc(length+1) -// if (!value_copy) goto error -// memcpy(value_copy, value, length) -// value_copy[length] = '\0' -// -// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// yaml_free(tag_copy) -// yaml_free(value_copy) -// -// return 0 -//} -// -///* -// * Add a sequence node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_sequence(document *yaml_document_t, -// tag *yaml_char_t, style yaml_sequence_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_item_t -// end *yaml_node_item_t -// top *yaml_node_item_t -// } items = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error -// -// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, items) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Add a mapping node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_mapping(document *yaml_document_t, -// tag *yaml_char_t, style yaml_mapping_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_pair_t -// end *yaml_node_pair_t -// top *yaml_node_pair_t -// } pairs = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error -// -// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, pairs) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Append an item to a sequence node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_sequence_item(document *yaml_document_t, -// sequence int, item int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// assert(document) // Non-NULL document is required. -// assert(sequence > 0 -// && document.nodes.start + sequence <= document.nodes.top) -// // Valid sequence id is required. -// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) -// // A sequence node is required. -// assert(item > 0 && document.nodes.start + item <= document.nodes.top) -// // Valid item id is required. -// -// if (!PUSH(&context, -// document.nodes.start[sequence-1].data.sequence.items, item)) -// return 0 -// -// return 1 -//} -// -///* -// * Append a pair of a key and a value to a mapping node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_mapping_pair(document *yaml_document_t, -// mapping int, key int, value int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// pair yaml_node_pair_t -// -// assert(document) // Non-NULL document is required. -// assert(mapping > 0 -// && document.nodes.start + mapping <= document.nodes.top) -// // Valid mapping id is required. -// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) -// // A mapping node is required. -// assert(key > 0 && document.nodes.start + key <= document.nodes.top) -// // Valid key id is required. -// assert(value > 0 && document.nodes.start + value <= document.nodes.top) -// // Valid value id is required. -// -// pair.key = key -// pair.value = value -// -// if (!PUSH(&context, -// document.nodes.start[mapping-1].data.mapping.pairs, pair)) -// return 0 -// -// return 1 -//} -// -// diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go deleted file mode 100644 index 129bc2a9..00000000 --- a/vendor/gopkg.in/yaml.v2/decode.go +++ /dev/null @@ -1,815 +0,0 @@ -package yaml - -import ( - "encoding" - "encoding/base64" - "fmt" - "io" - "math" - "reflect" - "strconv" - "time" -) - -const ( - documentNode = 1 << iota - mappingNode - sequenceNode - scalarNode - aliasNode -) - -type node struct { - kind int - line, column int - tag string - // For an alias node, alias holds the resolved alias. - alias *node - value string - implicit bool - children []*node - anchors map[string]*node -} - -// ---------------------------------------------------------------------------- -// Parser, produces a node tree out of a libyaml event stream. - -type parser struct { - parser yaml_parser_t - event yaml_event_t - doc *node - doneInit bool -} - -func newParser(b []byte) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - if len(b) == 0 { - b = []byte{'\n'} - } - yaml_parser_set_input_string(&p.parser, b) - return &p -} - -func newParserFromReader(r io.Reader) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - yaml_parser_set_input_reader(&p.parser, r) - return &p -} - -func (p *parser) init() { - if p.doneInit { - return - } - p.expect(yaml_STREAM_START_EVENT) - p.doneInit = true -} - -func (p *parser) destroy() { - if p.event.typ != yaml_NO_EVENT { - yaml_event_delete(&p.event) - } - yaml_parser_delete(&p.parser) -} - -// expect consumes an event from the event stream and -// checks that it's of the expected type. -func (p *parser) expect(e yaml_event_type_t) { - if p.event.typ == yaml_NO_EVENT { - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } - } - if p.event.typ == yaml_STREAM_END_EVENT { - failf("attempted to go past the end of stream; corrupted value?") - } - if p.event.typ != e { - p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) - p.fail() - } - yaml_event_delete(&p.event) - p.event.typ = yaml_NO_EVENT -} - -// peek peeks at the next event in the event stream, -// puts the results into p.event and returns the event type. -func (p *parser) peek() yaml_event_type_t { - if p.event.typ != yaml_NO_EVENT { - return p.event.typ - } - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } - return p.event.typ -} - -func (p *parser) fail() { - var where string - var line int - if p.parser.problem_mark.line != 0 { - line = p.parser.problem_mark.line - // Scanner errors don't iterate line before returning error - if p.parser.error == yaml_SCANNER_ERROR { - line++ - } - } else if p.parser.context_mark.line != 0 { - line = p.parser.context_mark.line - } - if line != 0 { - where = "line " + strconv.Itoa(line) + ": " - } - var msg string - if len(p.parser.problem) > 0 { - msg = p.parser.problem - } else { - msg = "unknown problem parsing YAML content" - } - failf("%s%s", where, msg) -} - -func (p *parser) anchor(n *node, anchor []byte) { - if anchor != nil { - p.doc.anchors[string(anchor)] = n - } -} - -func (p *parser) parse() *node { - p.init() - switch p.peek() { - case yaml_SCALAR_EVENT: - return p.scalar() - case yaml_ALIAS_EVENT: - return p.alias() - case yaml_MAPPING_START_EVENT: - return p.mapping() - case yaml_SEQUENCE_START_EVENT: - return p.sequence() - case yaml_DOCUMENT_START_EVENT: - return p.document() - case yaml_STREAM_END_EVENT: - // Happens when attempting to decode an empty buffer. - return nil - default: - panic("attempted to parse unknown event: " + p.event.typ.String()) - } -} - -func (p *parser) node(kind int) *node { - return &node{ - kind: kind, - line: p.event.start_mark.line, - column: p.event.start_mark.column, - } -} - -func (p *parser) document() *node { - n := p.node(documentNode) - n.anchors = make(map[string]*node) - p.doc = n - p.expect(yaml_DOCUMENT_START_EVENT) - n.children = append(n.children, p.parse()) - p.expect(yaml_DOCUMENT_END_EVENT) - return n -} - -func (p *parser) alias() *node { - n := p.node(aliasNode) - n.value = string(p.event.anchor) - n.alias = p.doc.anchors[n.value] - if n.alias == nil { - failf("unknown anchor '%s' referenced", n.value) - } - p.expect(yaml_ALIAS_EVENT) - return n -} - -func (p *parser) scalar() *node { - n := p.node(scalarNode) - n.value = string(p.event.value) - n.tag = string(p.event.tag) - n.implicit = p.event.implicit - p.anchor(n, p.event.anchor) - p.expect(yaml_SCALAR_EVENT) - return n -} - -func (p *parser) sequence() *node { - n := p.node(sequenceNode) - p.anchor(n, p.event.anchor) - p.expect(yaml_SEQUENCE_START_EVENT) - for p.peek() != yaml_SEQUENCE_END_EVENT { - n.children = append(n.children, p.parse()) - } - p.expect(yaml_SEQUENCE_END_EVENT) - return n -} - -func (p *parser) mapping() *node { - n := p.node(mappingNode) - p.anchor(n, p.event.anchor) - p.expect(yaml_MAPPING_START_EVENT) - for p.peek() != yaml_MAPPING_END_EVENT { - n.children = append(n.children, p.parse(), p.parse()) - } - p.expect(yaml_MAPPING_END_EVENT) - return n -} - -// ---------------------------------------------------------------------------- -// Decoder, unmarshals a node into a provided value. - -type decoder struct { - doc *node - aliases map[*node]bool - mapType reflect.Type - terrors []string - strict bool - - decodeCount int - aliasCount int - aliasDepth int -} - -var ( - mapItemType = reflect.TypeOf(MapItem{}) - durationType = reflect.TypeOf(time.Duration(0)) - defaultMapType = reflect.TypeOf(map[interface{}]interface{}{}) - ifaceType = defaultMapType.Elem() - timeType = reflect.TypeOf(time.Time{}) - ptrTimeType = reflect.TypeOf(&time.Time{}) -) - -func newDecoder(strict bool) *decoder { - d := &decoder{mapType: defaultMapType, strict: strict} - d.aliases = make(map[*node]bool) - return d -} - -func (d *decoder) terror(n *node, tag string, out reflect.Value) { - if n.tag != "" { - tag = n.tag - } - value := n.value - if tag != yaml_SEQ_TAG && tag != yaml_MAP_TAG { - if len(value) > 10 { - value = " `" + value[:7] + "...`" - } else { - value = " `" + value + "`" - } - } - d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.line+1, shortTag(tag), value, out.Type())) -} - -func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { - terrlen := len(d.terrors) - err := u.UnmarshalYAML(func(v interface{}) (err error) { - defer handleErr(&err) - d.unmarshal(n, reflect.ValueOf(v)) - if len(d.terrors) > terrlen { - issues := d.terrors[terrlen:] - d.terrors = d.terrors[:terrlen] - return &TypeError{issues} - } - return nil - }) - if e, ok := err.(*TypeError); ok { - d.terrors = append(d.terrors, e.Errors...) - return false - } - if err != nil { - fail(err) - } - return true -} - -// d.prepare initializes and dereferences pointers and calls UnmarshalYAML -// if a value is found to implement it. -// It returns the initialized and dereferenced out value, whether -// unmarshalling was already done by UnmarshalYAML, and if so whether -// its types unmarshalled appropriately. -// -// If n holds a null value, prepare returns before doing anything. -func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { - if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "~" || n.value == "" && n.implicit) { - return out, false, false - } - again := true - for again { - again = false - if out.Kind() == reflect.Ptr { - if out.IsNil() { - out.Set(reflect.New(out.Type().Elem())) - } - out = out.Elem() - again = true - } - if out.CanAddr() { - if u, ok := out.Addr().Interface().(Unmarshaler); ok { - good = d.callUnmarshaler(n, u) - return out, true, good - } - } - } - return out, false, false -} - -const ( - // 400,000 decode operations is ~500kb of dense object declarations, or - // ~5kb of dense object declarations with 10000% alias expansion - alias_ratio_range_low = 400000 - - // 4,000,000 decode operations is ~5MB of dense object declarations, or - // ~4.5MB of dense object declarations with 10% alias expansion - alias_ratio_range_high = 4000000 - - // alias_ratio_range is the range over which we scale allowed alias ratios - alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) -) - -func allowedAliasRatio(decodeCount int) float64 { - switch { - case decodeCount <= alias_ratio_range_low: - // allow 99% to come from alias expansion for small-to-medium documents - return 0.99 - case decodeCount >= alias_ratio_range_high: - // allow 10% to come from alias expansion for very large documents - return 0.10 - default: - // scale smoothly from 99% down to 10% over the range. - // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. - // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). - return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) - } -} - -func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) { - d.decodeCount++ - if d.aliasDepth > 0 { - d.aliasCount++ - } - if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { - failf("document contains excessive aliasing") - } - switch n.kind { - case documentNode: - return d.document(n, out) - case aliasNode: - return d.alias(n, out) - } - out, unmarshaled, good := d.prepare(n, out) - if unmarshaled { - return good - } - switch n.kind { - case scalarNode: - good = d.scalar(n, out) - case mappingNode: - good = d.mapping(n, out) - case sequenceNode: - good = d.sequence(n, out) - default: - panic("internal error: unknown node kind: " + strconv.Itoa(n.kind)) - } - return good -} - -func (d *decoder) document(n *node, out reflect.Value) (good bool) { - if len(n.children) == 1 { - d.doc = n - d.unmarshal(n.children[0], out) - return true - } - return false -} - -func (d *decoder) alias(n *node, out reflect.Value) (good bool) { - if d.aliases[n] { - // TODO this could actually be allowed in some circumstances. - failf("anchor '%s' value contains itself", n.value) - } - d.aliases[n] = true - d.aliasDepth++ - good = d.unmarshal(n.alias, out) - d.aliasDepth-- - delete(d.aliases, n) - return good -} - -var zeroValue reflect.Value - -func resetMap(out reflect.Value) { - for _, k := range out.MapKeys() { - out.SetMapIndex(k, zeroValue) - } -} - -func (d *decoder) scalar(n *node, out reflect.Value) bool { - var tag string - var resolved interface{} - if n.tag == "" && !n.implicit { - tag = yaml_STR_TAG - resolved = n.value - } else { - tag, resolved = resolve(n.tag, n.value) - if tag == yaml_BINARY_TAG { - data, err := base64.StdEncoding.DecodeString(resolved.(string)) - if err != nil { - failf("!!binary value contains invalid base64 data") - } - resolved = string(data) - } - } - if resolved == nil { - if out.Kind() == reflect.Map && !out.CanAddr() { - resetMap(out) - } else { - out.Set(reflect.Zero(out.Type())) - } - return true - } - if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { - // We've resolved to exactly the type we want, so use that. - out.Set(resolvedv) - return true - } - // Perhaps we can use the value as a TextUnmarshaler to - // set its value. - if out.CanAddr() { - u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) - if ok { - var text []byte - if tag == yaml_BINARY_TAG { - text = []byte(resolved.(string)) - } else { - // We let any value be unmarshaled into TextUnmarshaler. - // That might be more lax than we'd like, but the - // TextUnmarshaler itself should bowl out any dubious values. - text = []byte(n.value) - } - err := u.UnmarshalText(text) - if err != nil { - fail(err) - } - return true - } - } - switch out.Kind() { - case reflect.String: - if tag == yaml_BINARY_TAG { - out.SetString(resolved.(string)) - return true - } - if resolved != nil { - out.SetString(n.value) - return true - } - case reflect.Interface: - if resolved == nil { - out.Set(reflect.Zero(out.Type())) - } else if tag == yaml_TIMESTAMP_TAG { - // It looks like a timestamp but for backward compatibility - // reasons we set it as a string, so that code that unmarshals - // timestamp-like values into interface{} will continue to - // see a string and not a time.Time. - // TODO(v3) Drop this. - out.Set(reflect.ValueOf(n.value)) - } else { - out.Set(reflect.ValueOf(resolved)) - } - return true - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch resolved := resolved.(type) { - case int: - if !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case int64: - if !out.OverflowInt(resolved) { - out.SetInt(resolved) - return true - } - case uint64: - if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case float64: - if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case string: - if out.Type() == durationType { - d, err := time.ParseDuration(resolved) - if err == nil { - out.SetInt(int64(d)) - return true - } - } - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch resolved := resolved.(type) { - case int: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case int64: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case uint64: - if !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case float64: - if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - } - case reflect.Bool: - switch resolved := resolved.(type) { - case bool: - out.SetBool(resolved) - return true - } - case reflect.Float32, reflect.Float64: - switch resolved := resolved.(type) { - case int: - out.SetFloat(float64(resolved)) - return true - case int64: - out.SetFloat(float64(resolved)) - return true - case uint64: - out.SetFloat(float64(resolved)) - return true - case float64: - out.SetFloat(resolved) - return true - } - case reflect.Struct: - if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { - out.Set(resolvedv) - return true - } - case reflect.Ptr: - if out.Type().Elem() == reflect.TypeOf(resolved) { - // TODO DOes this make sense? When is out a Ptr except when decoding a nil value? - elem := reflect.New(out.Type().Elem()) - elem.Elem().Set(reflect.ValueOf(resolved)) - out.Set(elem) - return true - } - } - d.terror(n, tag, out) - return false -} - -func settableValueOf(i interface{}) reflect.Value { - v := reflect.ValueOf(i) - sv := reflect.New(v.Type()).Elem() - sv.Set(v) - return sv -} - -func (d *decoder) sequence(n *node, out reflect.Value) (good bool) { - l := len(n.children) - - var iface reflect.Value - switch out.Kind() { - case reflect.Slice: - out.Set(reflect.MakeSlice(out.Type(), l, l)) - case reflect.Array: - if l != out.Len() { - failf("invalid array: want %d elements but got %d", out.Len(), l) - } - case reflect.Interface: - // No type hints. Will have to use a generic sequence. - iface = out - out = settableValueOf(make([]interface{}, l)) - default: - d.terror(n, yaml_SEQ_TAG, out) - return false - } - et := out.Type().Elem() - - j := 0 - for i := 0; i < l; i++ { - e := reflect.New(et).Elem() - if ok := d.unmarshal(n.children[i], e); ok { - out.Index(j).Set(e) - j++ - } - } - if out.Kind() != reflect.Array { - out.Set(out.Slice(0, j)) - } - if iface.IsValid() { - iface.Set(out) - } - return true -} - -func (d *decoder) mapping(n *node, out reflect.Value) (good bool) { - switch out.Kind() { - case reflect.Struct: - return d.mappingStruct(n, out) - case reflect.Slice: - return d.mappingSlice(n, out) - case reflect.Map: - // okay - case reflect.Interface: - if d.mapType.Kind() == reflect.Map { - iface := out - out = reflect.MakeMap(d.mapType) - iface.Set(out) - } else { - slicev := reflect.New(d.mapType).Elem() - if !d.mappingSlice(n, slicev) { - return false - } - out.Set(slicev) - return true - } - default: - d.terror(n, yaml_MAP_TAG, out) - return false - } - outt := out.Type() - kt := outt.Key() - et := outt.Elem() - - mapType := d.mapType - if outt.Key() == ifaceType && outt.Elem() == ifaceType { - d.mapType = outt - } - - if out.IsNil() { - out.Set(reflect.MakeMap(outt)) - } - l := len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - k := reflect.New(kt).Elem() - if d.unmarshal(n.children[i], k) { - kkind := k.Kind() - if kkind == reflect.Interface { - kkind = k.Elem().Kind() - } - if kkind == reflect.Map || kkind == reflect.Slice { - failf("invalid map key: %#v", k.Interface()) - } - e := reflect.New(et).Elem() - if d.unmarshal(n.children[i+1], e) { - d.setMapIndex(n.children[i+1], out, k, e) - } - } - } - d.mapType = mapType - return true -} - -func (d *decoder) setMapIndex(n *node, out, k, v reflect.Value) { - if d.strict && out.MapIndex(k) != zeroValue { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: key %#v already set in map", n.line+1, k.Interface())) - return - } - out.SetMapIndex(k, v) -} - -func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) { - outt := out.Type() - if outt.Elem() != mapItemType { - d.terror(n, yaml_MAP_TAG, out) - return false - } - - mapType := d.mapType - d.mapType = outt - - var slice []MapItem - var l = len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - item := MapItem{} - k := reflect.ValueOf(&item.Key).Elem() - if d.unmarshal(n.children[i], k) { - v := reflect.ValueOf(&item.Value).Elem() - if d.unmarshal(n.children[i+1], v) { - slice = append(slice, item) - } - } - } - out.Set(reflect.ValueOf(slice)) - d.mapType = mapType - return true -} - -func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { - sinfo, err := getStructInfo(out.Type()) - if err != nil { - panic(err) - } - name := settableValueOf("") - l := len(n.children) - - var inlineMap reflect.Value - var elemType reflect.Type - if sinfo.InlineMap != -1 { - inlineMap = out.Field(sinfo.InlineMap) - inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) - elemType = inlineMap.Type().Elem() - } - - var doneFields []bool - if d.strict { - doneFields = make([]bool, len(sinfo.FieldsList)) - } - for i := 0; i < l; i += 2 { - ni := n.children[i] - if isMerge(ni) { - d.merge(n.children[i+1], out) - continue - } - if !d.unmarshal(ni, name) { - continue - } - if info, ok := sinfo.FieldsMap[name.String()]; ok { - if d.strict { - if doneFields[info.Id] { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.line+1, name.String(), out.Type())) - continue - } - doneFields[info.Id] = true - } - var field reflect.Value - if info.Inline == nil { - field = out.Field(info.Num) - } else { - field = out.FieldByIndex(info.Inline) - } - d.unmarshal(n.children[i+1], field) - } else if sinfo.InlineMap != -1 { - if inlineMap.IsNil() { - inlineMap.Set(reflect.MakeMap(inlineMap.Type())) - } - value := reflect.New(elemType).Elem() - d.unmarshal(n.children[i+1], value) - d.setMapIndex(n.children[i+1], inlineMap, name, value) - } else if d.strict { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.line+1, name.String(), out.Type())) - } - } - return true -} - -func failWantMap() { - failf("map merge requires map or sequence of maps as the value") -} - -func (d *decoder) merge(n *node, out reflect.Value) { - switch n.kind { - case mappingNode: - d.unmarshal(n, out) - case aliasNode: - if n.alias != nil && n.alias.kind != mappingNode { - failWantMap() - } - d.unmarshal(n, out) - case sequenceNode: - // Step backwards as earlier nodes take precedence. - for i := len(n.children) - 1; i >= 0; i-- { - ni := n.children[i] - if ni.kind == aliasNode { - if ni.alias != nil && ni.alias.kind != mappingNode { - failWantMap() - } - } else if ni.kind != mappingNode { - failWantMap() - } - d.unmarshal(ni, out) - } - default: - failWantMap() - } -} - -func isMerge(n *node) bool { - return n.kind == scalarNode && n.value == "<<" && (n.implicit == true || n.tag == yaml_MERGE_TAG) -} diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go deleted file mode 100644 index a1c2cc52..00000000 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ /dev/null @@ -1,1685 +0,0 @@ -package yaml - -import ( - "bytes" - "fmt" -) - -// Flush the buffer if needed. -func flush(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) { - return yaml_emitter_flush(emitter) - } - return true -} - -// Put a character to the output buffer. -func put(emitter *yaml_emitter_t, value byte) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - emitter.buffer[emitter.buffer_pos] = value - emitter.buffer_pos++ - emitter.column++ - return true -} - -// Put a line break to the output buffer. -func put_break(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - switch emitter.line_break { - case yaml_CR_BREAK: - emitter.buffer[emitter.buffer_pos] = '\r' - emitter.buffer_pos += 1 - case yaml_LN_BREAK: - emitter.buffer[emitter.buffer_pos] = '\n' - emitter.buffer_pos += 1 - case yaml_CRLN_BREAK: - emitter.buffer[emitter.buffer_pos+0] = '\r' - emitter.buffer[emitter.buffer_pos+1] = '\n' - emitter.buffer_pos += 2 - default: - panic("unknown line break setting") - } - emitter.column = 0 - emitter.line++ - return true -} - -// Copy a character from a string into buffer. -func write(emitter *yaml_emitter_t, s []byte, i *int) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - p := emitter.buffer_pos - w := width(s[*i]) - switch w { - case 4: - emitter.buffer[p+3] = s[*i+3] - fallthrough - case 3: - emitter.buffer[p+2] = s[*i+2] - fallthrough - case 2: - emitter.buffer[p+1] = s[*i+1] - fallthrough - case 1: - emitter.buffer[p+0] = s[*i+0] - default: - panic("unknown character width") - } - emitter.column++ - emitter.buffer_pos += w - *i += w - return true -} - -// Write a whole string into buffer. -func write_all(emitter *yaml_emitter_t, s []byte) bool { - for i := 0; i < len(s); { - if !write(emitter, s, &i) { - return false - } - } - return true -} - -// Copy a line break character from a string into buffer. -func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { - if s[*i] == '\n' { - if !put_break(emitter) { - return false - } - *i++ - } else { - if !write(emitter, s, i) { - return false - } - emitter.column = 0 - emitter.line++ - } - return true -} - -// Set an emitter error and return false. -func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_EMITTER_ERROR - emitter.problem = problem - return false -} - -// Emit an event. -func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.events = append(emitter.events, *event) - for !yaml_emitter_need_more_events(emitter) { - event := &emitter.events[emitter.events_head] - if !yaml_emitter_analyze_event(emitter, event) { - return false - } - if !yaml_emitter_state_machine(emitter, event) { - return false - } - yaml_event_delete(event) - emitter.events_head++ - } - return true -} - -// Check if we need to accumulate more events before emitting. -// -// We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// -func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { - if emitter.events_head == len(emitter.events) { - return true - } - var accumulate int - switch emitter.events[emitter.events_head].typ { - case yaml_DOCUMENT_START_EVENT: - accumulate = 1 - break - case yaml_SEQUENCE_START_EVENT: - accumulate = 2 - break - case yaml_MAPPING_START_EVENT: - accumulate = 3 - break - default: - return false - } - if len(emitter.events)-emitter.events_head > accumulate { - return false - } - var level int - for i := emitter.events_head; i < len(emitter.events); i++ { - switch emitter.events[i].typ { - case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: - level++ - case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: - level-- - } - if level == 0 { - return false - } - } - return true -} - -// Append a directive to the directives stack. -func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { - for i := 0; i < len(emitter.tag_directives); i++ { - if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") - } - } - - // [Go] Do we actually need to copy this given garbage collection - // and the lack of deallocating destructors? - tag_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(tag_copy.handle, value.handle) - copy(tag_copy.prefix, value.prefix) - emitter.tag_directives = append(emitter.tag_directives, tag_copy) - return true -} - -// Increase the indentation level. -func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { - emitter.indents = append(emitter.indents, emitter.indent) - if emitter.indent < 0 { - if flow { - emitter.indent = emitter.best_indent - } else { - emitter.indent = 0 - } - } else if !indentless { - emitter.indent += emitter.best_indent - } - return true -} - -// State dispatcher. -func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { - switch emitter.state { - default: - case yaml_EMIT_STREAM_START_STATE: - return yaml_emitter_emit_stream_start(emitter, event) - - case yaml_EMIT_FIRST_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, true) - - case yaml_EMIT_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, false) - - case yaml_EMIT_DOCUMENT_CONTENT_STATE: - return yaml_emitter_emit_document_content(emitter, event) - - case yaml_EMIT_DOCUMENT_END_STATE: - return yaml_emitter_emit_document_end(emitter, event) - - case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, true) - - case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, false) - - case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, true) - - case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, false) - - case yaml_EMIT_END_STATE: - return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") - } - panic("invalid emitter state") -} - -// Expect STREAM-START. -func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_STREAM_START_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") - } - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = event.encoding - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = yaml_UTF8_ENCODING - } - } - if emitter.best_indent < 2 || emitter.best_indent > 9 { - emitter.best_indent = 2 - } - if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { - emitter.best_width = 80 - } - if emitter.best_width < 0 { - emitter.best_width = 1<<31 - 1 - } - if emitter.line_break == yaml_ANY_BREAK { - emitter.line_break = yaml_LN_BREAK - } - - emitter.indent = -1 - emitter.line = 0 - emitter.column = 0 - emitter.whitespace = true - emitter.indention = true - - if emitter.encoding != yaml_UTF8_ENCODING { - if !yaml_emitter_write_bom(emitter) { - return false - } - } - emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE - return true -} - -// Expect DOCUMENT-START or STREAM-END. -func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - - if event.typ == yaml_DOCUMENT_START_EVENT { - - if event.version_directive != nil { - if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { - return false - } - } - - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { - return false - } - if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { - return false - } - } - - for i := 0; i < len(default_tag_directives); i++ { - tag_directive := &default_tag_directives[i] - if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { - return false - } - } - - implicit := event.implicit - if !first || emitter.canonical { - implicit = false - } - - if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if event.version_directive != nil { - implicit = false - if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if len(event.tag_directives) > 0 { - implicit = false - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { - return false - } - if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - if yaml_emitter_check_empty_document(emitter) { - implicit = false - } - if !implicit { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { - return false - } - if emitter.canonical { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE - return true - } - - if event.typ == yaml_STREAM_END_EVENT { - if emitter.open_ended { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_END_STATE - return true - } - - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") -} - -// Expect the root node. -func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) - return yaml_emitter_emit_node(emitter, event, true, false, false, false) -} - -// Expect DOCUMENT-END. -func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_DOCUMENT_END_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !event.implicit { - // [Go] Allocate the slice elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_DOCUMENT_START_STATE - emitter.tag_directives = emitter.tag_directives[:0] - return true -} - -// Expect a flow item node. -func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a flow key node. -func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_MAPPING_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a flow value node. -func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block item node. -func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, emitter.mapping_context && !emitter.indention) { - return false - } - } - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a block key node. -func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, false) { - return false - } - } - if event.typ == yaml_MAPPING_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block value node. -func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a node. -func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, - root bool, sequence bool, mapping bool, simple_key bool) bool { - - emitter.root_context = root - emitter.sequence_context = sequence - emitter.mapping_context = mapping - emitter.simple_key_context = simple_key - - switch event.typ { - case yaml_ALIAS_EVENT: - return yaml_emitter_emit_alias(emitter, event) - case yaml_SCALAR_EVENT: - return yaml_emitter_emit_scalar(emitter, event) - case yaml_SEQUENCE_START_EVENT: - return yaml_emitter_emit_sequence_start(emitter, event) - case yaml_MAPPING_START_EVENT: - return yaml_emitter_emit_mapping_start(emitter, event) - default: - return yaml_emitter_set_emitter_error(emitter, - fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) - } -} - -// Expect ALIAS. -func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SCALAR. -func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_select_scalar_style(emitter, event) { - return false - } - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - if !yaml_emitter_process_scalar(emitter) { - return false - } - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SEQUENCE-START. -func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || - yaml_emitter_check_empty_sequence(emitter) { - emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE - } - return true -} - -// Expect MAPPING-START. -func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || - yaml_emitter_check_empty_mapping(emitter) { - emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE - } - return true -} - -// Check if the document content is an empty scalar. -func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { - return false // [Go] Huh? -} - -// Check if the next events represent an empty sequence. -func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT -} - -// Check if the next events represent an empty mapping. -func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT -} - -// Check if the next node can be expressed as a simple key. -func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { - length := 0 - switch emitter.events[emitter.events_head].typ { - case yaml_ALIAS_EVENT: - length += len(emitter.anchor_data.anchor) - case yaml_SCALAR_EVENT: - if emitter.scalar_data.multiline { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) + - len(emitter.scalar_data.value) - case yaml_SEQUENCE_START_EVENT: - if !yaml_emitter_check_empty_sequence(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - case yaml_MAPPING_START_EVENT: - if !yaml_emitter_check_empty_mapping(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - default: - return false - } - return length <= 128 -} - -// Determine an acceptable scalar style. -func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 - if no_tag && !event.implicit && !event.quoted_implicit { - return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") - } - - style := event.scalar_style() - if style == yaml_ANY_SCALAR_STYLE { - style = yaml_PLAIN_SCALAR_STYLE - } - if emitter.canonical { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - if emitter.simple_key_context && emitter.scalar_data.multiline { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - - if style == yaml_PLAIN_SCALAR_STYLE { - if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || - emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if no_tag && !event.implicit { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { - if !emitter.scalar_data.single_quoted_allowed { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { - if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - - if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { - emitter.tag_data.handle = []byte{'!'} - } - emitter.scalar_data.style = style - return true -} - -// Write an anchor. -func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { - if emitter.anchor_data.anchor == nil { - return true - } - c := []byte{'&'} - if emitter.anchor_data.alias { - c[0] = '*' - } - if !yaml_emitter_write_indicator(emitter, c, true, false, false) { - return false - } - return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) -} - -// Write a tag. -func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { - if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { - return true - } - if len(emitter.tag_data.handle) > 0 { - if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { - return false - } - if len(emitter.tag_data.suffix) > 0 { - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - } - } else { - // [Go] Allocate these slices elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { - return false - } - } - return true -} - -// Write a scalar. -func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { - switch emitter.scalar_data.style { - case yaml_PLAIN_SCALAR_STYLE: - return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_SINGLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_DOUBLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_LITERAL_SCALAR_STYLE: - return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) - - case yaml_FOLDED_SCALAR_STYLE: - return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) - } - panic("unknown scalar style") -} - -// Check if a %YAML directive is valid. -func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { - if version_directive.major != 1 || version_directive.minor != 1 { - return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") - } - return true -} - -// Check if a %TAG directive is valid. -func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { - handle := tag_directive.handle - prefix := tag_directive.prefix - if len(handle) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") - } - if handle[0] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") - } - if handle[len(handle)-1] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") - } - for i := 1; i < len(handle)-1; i += width(handle[i]) { - if !is_alpha(handle, i) { - return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") - } - } - if len(prefix) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") - } - return true -} - -// Check if an anchor is valid. -func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { - if len(anchor) == 0 { - problem := "anchor value must not be empty" - if alias { - problem = "alias value must not be empty" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - for i := 0; i < len(anchor); i += width(anchor[i]) { - if !is_alpha(anchor, i) { - problem := "anchor value must contain alphanumerical characters only" - if alias { - problem = "alias value must contain alphanumerical characters only" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - } - emitter.anchor_data.anchor = anchor - emitter.anchor_data.alias = alias - return true -} - -// Check if a tag is valid. -func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { - if len(tag) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") - } - for i := 0; i < len(emitter.tag_directives); i++ { - tag_directive := &emitter.tag_directives[i] - if bytes.HasPrefix(tag, tag_directive.prefix) { - emitter.tag_data.handle = tag_directive.handle - emitter.tag_data.suffix = tag[len(tag_directive.prefix):] - return true - } - } - emitter.tag_data.suffix = tag - return true -} - -// Check if a scalar is valid. -func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { - var ( - block_indicators = false - flow_indicators = false - line_breaks = false - special_characters = false - - leading_space = false - leading_break = false - trailing_space = false - trailing_break = false - break_space = false - space_break = false - - preceded_by_whitespace = false - followed_by_whitespace = false - previous_space = false - previous_break = false - ) - - emitter.scalar_data.value = value - - if len(value) == 0 { - emitter.scalar_data.multiline = false - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = false - return true - } - - if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { - block_indicators = true - flow_indicators = true - } - - preceded_by_whitespace = true - for i, w := 0, 0; i < len(value); i += w { - w = width(value[i]) - followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) - - if i == 0 { - switch value[i] { - case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': - flow_indicators = true - block_indicators = true - case '?', ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '-': - if followed_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } else { - switch value[i] { - case ',', '?', '[', ']', '{', '}': - flow_indicators = true - case ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '#': - if preceded_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } - - if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { - special_characters = true - } - if is_space(value, i) { - if i == 0 { - leading_space = true - } - if i+width(value[i]) == len(value) { - trailing_space = true - } - if previous_break { - break_space = true - } - previous_space = true - previous_break = false - } else if is_break(value, i) { - line_breaks = true - if i == 0 { - leading_break = true - } - if i+width(value[i]) == len(value) { - trailing_break = true - } - if previous_space { - space_break = true - } - previous_space = false - previous_break = true - } else { - previous_space = false - previous_break = false - } - - // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceded_by_whitespace = is_blankz(value, i) - } - - emitter.scalar_data.multiline = line_breaks - emitter.scalar_data.flow_plain_allowed = true - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = true - - if leading_space || leading_break || trailing_space || trailing_break { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if trailing_space { - emitter.scalar_data.block_allowed = false - } - if break_space { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - } - if space_break || special_characters { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - emitter.scalar_data.block_allowed = false - } - if line_breaks { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if flow_indicators { - emitter.scalar_data.flow_plain_allowed = false - } - if block_indicators { - emitter.scalar_data.block_plain_allowed = false - } - return true -} - -// Check if the event data is valid. -func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - emitter.anchor_data.anchor = nil - emitter.tag_data.handle = nil - emitter.tag_data.suffix = nil - emitter.scalar_data.value = nil - - switch event.typ { - case yaml_ALIAS_EVENT: - if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { - return false - } - - case yaml_SCALAR_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - if !yaml_emitter_analyze_scalar(emitter, event.value) { - return false - } - - case yaml_SEQUENCE_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - - case yaml_MAPPING_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - } - return true -} - -// Write the BOM character. -func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { - if !flush(emitter) { - return false - } - pos := emitter.buffer_pos - emitter.buffer[pos+0] = '\xEF' - emitter.buffer[pos+1] = '\xBB' - emitter.buffer[pos+2] = '\xBF' - emitter.buffer_pos += 3 - return true -} - -func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { - indent := emitter.indent - if indent < 0 { - indent = 0 - } - if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { - if !put_break(emitter) { - return false - } - } - for emitter.column < indent { - if !put(emitter, ' ') { - return false - } - } - emitter.whitespace = true - emitter.indention = true - return true -} - -func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, indicator) { - return false - } - emitter.whitespace = is_whitespace - emitter.indention = (emitter.indention && is_indention) - emitter.open_ended = false - return true -} - -func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - for i := 0; i < len(value); { - var must_write bool - switch value[i] { - case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': - must_write = true - default: - must_write = is_alpha(value, i) - } - if must_write { - if !write(emitter, value, &i) { - return false - } - } else { - w := width(value[i]) - for k := 0; k < w; k++ { - octet := value[i] - i++ - if !put(emitter, '%') { - return false - } - - c := octet >> 4 - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - - c = octet & 0x0f - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - } - } - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - - emitter.whitespace = false - emitter.indention = false - if emitter.root_context { - emitter.open_ended = true - } - - return true -} - -func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { - return false - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if value[i] == '\'' { - if !put(emitter, '\'') { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - spaces := false - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { - return false - } - - for i := 0; i < len(value); { - if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || - is_bom(value, i) || is_break(value, i) || - value[i] == '"' || value[i] == '\\' { - - octet := value[i] - - var w int - var v rune - switch { - case octet&0x80 == 0x00: - w, v = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, v = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, v = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, v = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = value[i+k] - v = (v << 6) + (rune(octet) & 0x3F) - } - i += w - - if !put(emitter, '\\') { - return false - } - - var ok bool - switch v { - case 0x00: - ok = put(emitter, '0') - case 0x07: - ok = put(emitter, 'a') - case 0x08: - ok = put(emitter, 'b') - case 0x09: - ok = put(emitter, 't') - case 0x0A: - ok = put(emitter, 'n') - case 0x0b: - ok = put(emitter, 'v') - case 0x0c: - ok = put(emitter, 'f') - case 0x0d: - ok = put(emitter, 'r') - case 0x1b: - ok = put(emitter, 'e') - case 0x22: - ok = put(emitter, '"') - case 0x5c: - ok = put(emitter, '\\') - case 0x85: - ok = put(emitter, 'N') - case 0xA0: - ok = put(emitter, '_') - case 0x2028: - ok = put(emitter, 'L') - case 0x2029: - ok = put(emitter, 'P') - default: - if v <= 0xFF { - ok = put(emitter, 'x') - w = 2 - } else if v <= 0xFFFF { - ok = put(emitter, 'u') - w = 4 - } else { - ok = put(emitter, 'U') - w = 8 - } - for k := (w - 1) * 4; ok && k >= 0; k -= 4 { - digit := byte((v >> uint(k)) & 0x0F) - if digit < 10 { - ok = put(emitter, digit+'0') - } else { - ok = put(emitter, digit+'A'-10) - } - } - } - if !ok { - return false - } - spaces = false - } else if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { - if !yaml_emitter_write_indent(emitter) { - return false - } - if is_space(value, i+1) { - if !put(emitter, '\\') { - return false - } - } - i += width(value[i]) - } else if !write(emitter, value, &i) { - return false - } - spaces = true - } else { - if !write(emitter, value, &i) { - return false - } - spaces = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { - if is_space(value, 0) || is_break(value, 0) { - indent_hint := []byte{'0' + byte(emitter.best_indent)} - if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { - return false - } - } - - emitter.open_ended = false - - var chomp_hint [1]byte - if len(value) == 0 { - chomp_hint[0] = '-' - } else { - i := len(value) - 1 - for value[i]&0xC0 == 0x80 { - i-- - } - if !is_break(value, i) { - chomp_hint[0] = '-' - } else if i == 0 { - chomp_hint[0] = '+' - emitter.open_ended = true - } else { - i-- - for value[i]&0xC0 == 0x80 { - i-- - } - if is_break(value, i) { - chomp_hint[0] = '+' - emitter.open_ended = true - } - } - } - if chomp_hint[0] != 0 { - if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { - return false - } - } - return true -} - -func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - breaks := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - breaks = false - } - } - - return true -} - -func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - - breaks := true - leading_spaces := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !breaks && !leading_spaces && value[i] == '\n' { - k := 0 - for is_break(value, k) { - k += width(value[k]) - } - if !is_blankz(value, k) { - if !put_break(emitter) { - return false - } - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - leading_spaces = is_blank(value, i) - } - if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - emitter.indention = false - breaks = false - } - } - return true -} diff --git a/vendor/gopkg.in/yaml.v2/encode.go b/vendor/gopkg.in/yaml.v2/encode.go deleted file mode 100644 index 0ee738e1..00000000 --- a/vendor/gopkg.in/yaml.v2/encode.go +++ /dev/null @@ -1,390 +0,0 @@ -package yaml - -import ( - "encoding" - "fmt" - "io" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode/utf8" -) - -// jsonNumber is the interface of the encoding/json.Number datatype. -// Repeating the interface here avoids a dependency on encoding/json, and also -// supports other libraries like jsoniter, which use a similar datatype with -// the same interface. Detecting this interface is useful when dealing with -// structures containing json.Number, which is a string under the hood. The -// encoder should prefer the use of Int64(), Float64() and string(), in that -// order, when encoding this type. -type jsonNumber interface { - Float64() (float64, error) - Int64() (int64, error) - String() string -} - -type encoder struct { - emitter yaml_emitter_t - event yaml_event_t - out []byte - flow bool - // doneInit holds whether the initial stream_start_event has been - // emitted. - doneInit bool -} - -func newEncoder() *encoder { - e := &encoder{} - yaml_emitter_initialize(&e.emitter) - yaml_emitter_set_output_string(&e.emitter, &e.out) - yaml_emitter_set_unicode(&e.emitter, true) - return e -} - -func newEncoderWithWriter(w io.Writer) *encoder { - e := &encoder{} - yaml_emitter_initialize(&e.emitter) - yaml_emitter_set_output_writer(&e.emitter, w) - yaml_emitter_set_unicode(&e.emitter, true) - return e -} - -func (e *encoder) init() { - if e.doneInit { - return - } - yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) - e.emit() - e.doneInit = true -} - -func (e *encoder) finish() { - e.emitter.open_ended = false - yaml_stream_end_event_initialize(&e.event) - e.emit() -} - -func (e *encoder) destroy() { - yaml_emitter_delete(&e.emitter) -} - -func (e *encoder) emit() { - // This will internally delete the e.event value. - e.must(yaml_emitter_emit(&e.emitter, &e.event)) -} - -func (e *encoder) must(ok bool) { - if !ok { - msg := e.emitter.problem - if msg == "" { - msg = "unknown problem generating YAML content" - } - failf("%s", msg) - } -} - -func (e *encoder) marshalDoc(tag string, in reflect.Value) { - e.init() - yaml_document_start_event_initialize(&e.event, nil, nil, true) - e.emit() - e.marshal(tag, in) - yaml_document_end_event_initialize(&e.event, true) - e.emit() -} - -func (e *encoder) marshal(tag string, in reflect.Value) { - if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { - e.nilv() - return - } - iface := in.Interface() - switch m := iface.(type) { - case jsonNumber: - integer, err := m.Int64() - if err == nil { - // In this case the json.Number is a valid int64 - in = reflect.ValueOf(integer) - break - } - float, err := m.Float64() - if err == nil { - // In this case the json.Number is a valid float64 - in = reflect.ValueOf(float) - break - } - // fallback case - no number could be obtained - in = reflect.ValueOf(m.String()) - case time.Time, *time.Time: - // Although time.Time implements TextMarshaler, - // we don't want to treat it as a string for YAML - // purposes because YAML has special support for - // timestamps. - case Marshaler: - v, err := m.MarshalYAML() - if err != nil { - fail(err) - } - if v == nil { - e.nilv() - return - } - in = reflect.ValueOf(v) - case encoding.TextMarshaler: - text, err := m.MarshalText() - if err != nil { - fail(err) - } - in = reflect.ValueOf(string(text)) - case nil: - e.nilv() - return - } - switch in.Kind() { - case reflect.Interface: - e.marshal(tag, in.Elem()) - case reflect.Map: - e.mapv(tag, in) - case reflect.Ptr: - if in.Type() == ptrTimeType { - e.timev(tag, in.Elem()) - } else { - e.marshal(tag, in.Elem()) - } - case reflect.Struct: - if in.Type() == timeType { - e.timev(tag, in) - } else { - e.structv(tag, in) - } - case reflect.Slice, reflect.Array: - if in.Type().Elem() == mapItemType { - e.itemsv(tag, in) - } else { - e.slicev(tag, in) - } - case reflect.String: - e.stringv(tag, in) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if in.Type() == durationType { - e.stringv(tag, reflect.ValueOf(iface.(time.Duration).String())) - } else { - e.intv(tag, in) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - e.uintv(tag, in) - case reflect.Float32, reflect.Float64: - e.floatv(tag, in) - case reflect.Bool: - e.boolv(tag, in) - default: - panic("cannot marshal type: " + in.Type().String()) - } -} - -func (e *encoder) mapv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - keys := keyList(in.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - e.marshal("", k) - e.marshal("", in.MapIndex(k)) - } - }) -} - -func (e *encoder) itemsv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - slice := in.Convert(reflect.TypeOf([]MapItem{})).Interface().([]MapItem) - for _, item := range slice { - e.marshal("", reflect.ValueOf(item.Key)) - e.marshal("", reflect.ValueOf(item.Value)) - } - }) -} - -func (e *encoder) structv(tag string, in reflect.Value) { - sinfo, err := getStructInfo(in.Type()) - if err != nil { - panic(err) - } - e.mappingv(tag, func() { - for _, info := range sinfo.FieldsList { - var value reflect.Value - if info.Inline == nil { - value = in.Field(info.Num) - } else { - value = in.FieldByIndex(info.Inline) - } - if info.OmitEmpty && isZero(value) { - continue - } - e.marshal("", reflect.ValueOf(info.Key)) - e.flow = info.Flow - e.marshal("", value) - } - if sinfo.InlineMap >= 0 { - m := in.Field(sinfo.InlineMap) - if m.Len() > 0 { - e.flow = false - keys := keyList(m.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - if _, found := sinfo.FieldsMap[k.String()]; found { - panic(fmt.Sprintf("Can't have key %q in inlined map; conflicts with struct field", k.String())) - } - e.marshal("", k) - e.flow = false - e.marshal("", m.MapIndex(k)) - } - } - } - }) -} - -func (e *encoder) mappingv(tag string, f func()) { - implicit := tag == "" - style := yaml_BLOCK_MAPPING_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_MAPPING_STYLE - } - yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) - e.emit() - f() - yaml_mapping_end_event_initialize(&e.event) - e.emit() -} - -func (e *encoder) slicev(tag string, in reflect.Value) { - implicit := tag == "" - style := yaml_BLOCK_SEQUENCE_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_SEQUENCE_STYLE - } - e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - n := in.Len() - for i := 0; i < n; i++ { - e.marshal("", in.Index(i)) - } - e.must(yaml_sequence_end_event_initialize(&e.event)) - e.emit() -} - -// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. -// -// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported -// in YAML 1.2 and by this package, but these should be marshalled quoted for -// the time being for compatibility with other parsers. -func isBase60Float(s string) (result bool) { - // Fast path. - if s == "" { - return false - } - c := s[0] - if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { - return false - } - // Do the full match. - return base60float.MatchString(s) -} - -// From http://yaml.org/type/float.html, except the regular expression there -// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. -var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) - -func (e *encoder) stringv(tag string, in reflect.Value) { - var style yaml_scalar_style_t - s := in.String() - canUsePlain := true - switch { - case !utf8.ValidString(s): - if tag == yaml_BINARY_TAG { - failf("explicitly tagged !!binary data must be base64-encoded") - } - if tag != "" { - failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) - } - // It can't be encoded directly as YAML so use a binary tag - // and encode it as base64. - tag = yaml_BINARY_TAG - s = encodeBase64(s) - case tag == "": - // Check to see if it would resolve to a specific - // tag when encoded unquoted. If it doesn't, - // there's no need to quote it. - rtag, _ := resolve("", s) - canUsePlain = rtag == yaml_STR_TAG && !isBase60Float(s) - } - // Note: it's possible for user code to emit invalid YAML - // if they explicitly specify a tag and a string containing - // text that's incompatible with that tag. - switch { - case strings.Contains(s, "\n"): - style = yaml_LITERAL_SCALAR_STYLE - case canUsePlain: - style = yaml_PLAIN_SCALAR_STYLE - default: - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - e.emitScalar(s, "", tag, style) -} - -func (e *encoder) boolv(tag string, in reflect.Value) { - var s string - if in.Bool() { - s = "true" - } else { - s = "false" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) intv(tag string, in reflect.Value) { - s := strconv.FormatInt(in.Int(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) uintv(tag string, in reflect.Value) { - s := strconv.FormatUint(in.Uint(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) timev(tag string, in reflect.Value) { - t := in.Interface().(time.Time) - s := t.Format(time.RFC3339Nano) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) floatv(tag string, in reflect.Value) { - // Issue #352: When formatting, use the precision of the underlying value - precision := 64 - if in.Kind() == reflect.Float32 { - precision = 32 - } - - s := strconv.FormatFloat(in.Float(), 'g', -1, precision) - switch s { - case "+Inf": - s = ".inf" - case "-Inf": - s = "-.inf" - case "NaN": - s = ".nan" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) nilv() { - e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t) { - implicit := tag == "" - e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) - e.emit() -} diff --git a/vendor/gopkg.in/yaml.v2/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go deleted file mode 100644 index 81d05dfe..00000000 --- a/vendor/gopkg.in/yaml.v2/parserc.go +++ /dev/null @@ -1,1095 +0,0 @@ -package yaml - -import ( - "bytes" -) - -// The parser implements the following grammar: -// -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// implicit_document ::= block_node DOCUMENT-END* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// block_node_or_indentless_sequence ::= -// ALIAS -// | properties (block_content | indentless_block_sequence)? -// | block_content -// | indentless_block_sequence -// block_node ::= ALIAS -// | properties block_content? -// | block_content -// flow_node ::= ALIAS -// | properties flow_content? -// | flow_content -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// block_content ::= block_collection | flow_collection | SCALAR -// flow_content ::= flow_collection | SCALAR -// block_collection ::= block_sequence | block_mapping -// flow_collection ::= flow_sequence | flow_mapping -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// block_mapping ::= BLOCK-MAPPING_START -// ((KEY block_node_or_indentless_sequence?)? -// (VALUE block_node_or_indentless_sequence?)?)* -// BLOCK-END -// flow_sequence ::= FLOW-SEQUENCE-START -// (flow_sequence_entry FLOW-ENTRY)* -// flow_sequence_entry? -// FLOW-SEQUENCE-END -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// flow_mapping ::= FLOW-MAPPING-START -// (flow_mapping_entry FLOW-ENTRY)* -// flow_mapping_entry? -// FLOW-MAPPING-END -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? - -// Peek the next token in the token queue. -func peek_token(parser *yaml_parser_t) *yaml_token_t { - if parser.token_available || yaml_parser_fetch_more_tokens(parser) { - return &parser.tokens[parser.tokens_head] - } - return nil -} - -// Remove the next token from the queue (must be called after peek_token). -func skip_token(parser *yaml_parser_t) { - parser.token_available = false - parser.tokens_parsed++ - parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN - parser.tokens_head++ -} - -// Get the next event. -func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { - // Erase the event object. - *event = yaml_event_t{} - - // No events after the end of the stream or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { - return true - } - - // Generate the next event. - return yaml_parser_state_machine(parser, event) -} - -// Set parser error. -func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -// State dispatcher. -func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { - //trace("yaml_parser_state_machine", "state:", parser.state.String()) - - switch parser.state { - case yaml_PARSE_STREAM_START_STATE: - return yaml_parser_parse_stream_start(parser, event) - - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, true) - - case yaml_PARSE_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, false) - - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return yaml_parser_parse_document_content(parser, event) - - case yaml_PARSE_DOCUMENT_END_STATE: - return yaml_parser_parse_document_end(parser, event) - - case yaml_PARSE_BLOCK_NODE_STATE: - return yaml_parser_parse_node(parser, event, true, false) - - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return yaml_parser_parse_node(parser, event, true, true) - - case yaml_PARSE_FLOW_NODE_STATE: - return yaml_parser_parse_node(parser, event, false, false) - - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, true) - - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, false) - - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_indentless_sequence_entry(parser, event) - - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, true) - - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, false) - - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return yaml_parser_parse_block_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, true) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, false) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) - - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, true) - - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, true) - - default: - panic("invalid parser state") - } -} - -// Parse the production: -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ -func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_STREAM_START_TOKEN { - return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) - } - parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - encoding: token.encoding, - } - skip_token(parser) - return true -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// * -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* -func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { - - token := peek_token(parser) - if token == nil { - return false - } - - // Parse extra document end indicators. - if !implicit { - for token.typ == yaml_DOCUMENT_END_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && - token.typ != yaml_TAG_DIRECTIVE_TOKEN && - token.typ != yaml_DOCUMENT_START_TOKEN && - token.typ != yaml_STREAM_END_TOKEN { - // Parse an implicit document. - if !yaml_parser_process_directives(parser, nil, nil) { - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_BLOCK_NODE_STATE - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - } else if token.typ != yaml_STREAM_END_TOKEN { - // Parse an explicit document. - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - start_mark := token.start_mark - if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { - return false - } - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_DOCUMENT_START_TOKEN { - yaml_parser_set_parser_error(parser, - "did not find expected ", token.start_mark) - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE - end_mark := token.end_mark - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: false, - } - skip_token(parser) - - } else { - // Parse the stream end. - parser.state = yaml_PARSE_END_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - } - - return true -} - -// Parse the productions: -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** -// -func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || - token.typ == yaml_TAG_DIRECTIVE_TOKEN || - token.typ == yaml_DOCUMENT_START_TOKEN || - token.typ == yaml_DOCUMENT_END_TOKEN || - token.typ == yaml_STREAM_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - return yaml_parser_process_empty_scalar(parser, event, - token.start_mark) - } - return yaml_parser_parse_node(parser, event, true, false) -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// -func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - start_mark := token.start_mark - end_mark := token.start_mark - - implicit := true - if token.typ == yaml_DOCUMENT_END_TOKEN { - end_mark = token.end_mark - skip_token(parser) - implicit = false - } - - parser.tag_directives = parser.tag_directives[:0] - - parser.state = yaml_PARSE_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - start_mark: start_mark, - end_mark: end_mark, - implicit: implicit, - } - return true -} - -// Parse the productions: -// block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * -// block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * -// flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* -// block_content ::= block_collection | flow_collection | SCALAR -// ****** -// flow_content ::= flow_collection | SCALAR -// ****** -func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { - //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_ALIAS_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - *event = yaml_event_t{ - typ: yaml_ALIAS_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - anchor: token.value, - } - skip_token(parser) - return true - } - - start_mark := token.start_mark - end_mark := token.start_mark - - var tag_token bool - var tag_handle, tag_suffix, anchor []byte - var tag_mark yaml_mark_t - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - start_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } else if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - start_mark = token.start_mark - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - var tag []byte - if tag_token { - if len(tag_handle) == 0 { - tag = tag_suffix - tag_suffix = nil - } else { - for i := range parser.tag_directives { - if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { - tag = append([]byte(nil), parser.tag_directives[i].prefix...) - tag = append(tag, tag_suffix...) - break - } - } - if len(tag) == 0 { - yaml_parser_set_parser_error_context(parser, - "while parsing a node", start_mark, - "found undefined tag handle", tag_mark) - return false - } - } - } - - implicit := len(tag) == 0 - if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_SCALAR_TOKEN { - var plain_implicit, quoted_implicit bool - end_mark = token.end_mark - if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { - plain_implicit = true - } else if len(tag) == 0 { - quoted_implicit = true - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - value: token.value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(token.style), - } - skip_token(parser) - return true - } - if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { - // [Go] Some of the events below can be merged as they differ only on style. - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_FLOW_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), - } - return true - } - if len(anchor) > 0 || len(tag) > 0 { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - quoted_implicit: false, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true - } - - context := "while parsing a flow node" - if block { - context = "while parsing a block node" - } - yaml_parser_set_parser_error_context(parser, context, start_mark, - "did not find expected node content", token.start_mark) - return false -} - -// Parse the productions: -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* -// -func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } else { - parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } - if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block collection", context_mark, - "did not find expected '-' indicator", token.start_mark) -} - -// Parse the productions: -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * -func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && - token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? - } - return true -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* -// -// BLOCK-END -// ********* -// -func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_KEY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } else { - parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } else if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block mapping", context_mark, - "did not find expected key", token.start_mark) -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// -// -func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow sequence", context_mark, - "did not find expected ',' or ']'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - implicit: true, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - skip_token(parser) - return true - } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true -} - -// -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - mark := token.end_mark - skip_token(parser) - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? - } - return true -} - -// Parse the productions: -// flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * -// -func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow mapping", context_mark, - "did not find expected ',' or '}'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } else { - parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true -} - -// Parse the productions: -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// -func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { - token := peek_token(parser) - if token == nil { - return false - } - if empty { - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Generate an empty scalar event. -func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: mark, - end_mark: mark, - value: nil, // Empty - implicit: true, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true -} - -var default_tag_directives = []yaml_tag_directive_t{ - {[]byte("!"), []byte("!")}, - {[]byte("!!"), []byte("tag:yaml.org,2002:")}, -} - -// Parse directives. -func yaml_parser_process_directives(parser *yaml_parser_t, - version_directive_ref **yaml_version_directive_t, - tag_directives_ref *[]yaml_tag_directive_t) bool { - - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - - token := peek_token(parser) - if token == nil { - return false - } - - for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { - if version_directive != nil { - yaml_parser_set_parser_error(parser, - "found duplicate %YAML directive", token.start_mark) - return false - } - if token.major != 1 || token.minor != 1 { - yaml_parser_set_parser_error(parser, - "found incompatible YAML document", token.start_mark) - return false - } - version_directive = &yaml_version_directive_t{ - major: token.major, - minor: token.minor, - } - } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { - value := yaml_tag_directive_t{ - handle: token.value, - prefix: token.prefix, - } - if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { - return false - } - tag_directives = append(tag_directives, value) - } - - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - - for i := range default_tag_directives { - if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { - return false - } - } - - if version_directive_ref != nil { - *version_directive_ref = version_directive - } - if tag_directives_ref != nil { - *tag_directives_ref = tag_directives - } - return true -} - -// Append a tag directive to the directives stack. -func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { - for i := range parser.tag_directives { - if bytes.Equal(value.handle, parser.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) - } - } - - // [Go] I suspect the copy is unnecessary. This was likely done - // because there was no way to track ownership of the data. - value_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(value_copy.handle, value.handle) - copy(value_copy.prefix, value.prefix) - parser.tag_directives = append(parser.tag_directives, value_copy) - return true -} diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go deleted file mode 100644 index 7c1f5fac..00000000 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ /dev/null @@ -1,412 +0,0 @@ -package yaml - -import ( - "io" -) - -// Set the reader error and return 0. -func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { - parser.error = yaml_READER_ERROR - parser.problem = problem - parser.problem_offset = offset - parser.problem_value = value - return false -} - -// Byte order marks. -const ( - bom_UTF8 = "\xef\xbb\xbf" - bom_UTF16LE = "\xff\xfe" - bom_UTF16BE = "\xfe\xff" -) - -// Determine the input stream encoding by checking the BOM symbol. If no BOM is -// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. -func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { - // Ensure that we had enough bytes in the raw buffer. - for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { - if !yaml_parser_update_raw_buffer(parser) { - return false - } - } - - // Determine the encoding. - buf := parser.raw_buffer - pos := parser.raw_buffer_pos - avail := len(buf) - pos - if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { - parser.encoding = yaml_UTF16LE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { - parser.encoding = yaml_UTF16BE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { - parser.encoding = yaml_UTF8_ENCODING - parser.raw_buffer_pos += 3 - parser.offset += 3 - } else { - parser.encoding = yaml_UTF8_ENCODING - } - return true -} - -// Update the raw buffer. -func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { - size_read := 0 - - // Return if the raw buffer is full. - if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { - return true - } - - // Return on EOF. - if parser.eof { - return true - } - - // Move the remaining bytes in the raw buffer to the beginning. - if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { - copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) - } - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] - parser.raw_buffer_pos = 0 - - // Call the read handler to fill the buffer. - size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] - if err == io.EOF { - parser.eof = true - } else if err != nil { - return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) - } - return true -} - -// Ensure that the buffer contains at least `length` characters. -// Return true on success, false on failure. -// -// The length is supposed to be significantly less that the buffer size. -func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { - if parser.read_handler == nil { - panic("read handler must be set") - } - - // [Go] This function was changed to guarantee the requested length size at EOF. - // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests - - // If the EOF flag is set and the raw buffer is empty, do nothing. - if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { - // [Go] ACTUALLY! Read the documentation of this function above. - // This is just broken. To return true, we need to have the - // given length in the buffer. Not doing that means every single - // check that calls this function to make sure the buffer has a - // given length is Go) panicking; or C) accessing invalid memory. - //return true - } - - // Return if the buffer contains enough characters. - if parser.unread >= length { - return true - } - - // Determine the input encoding if it is not known yet. - if parser.encoding == yaml_ANY_ENCODING { - if !yaml_parser_determine_encoding(parser) { - return false - } - } - - // Move the unread characters to the beginning of the buffer. - buffer_len := len(parser.buffer) - if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { - copy(parser.buffer, parser.buffer[parser.buffer_pos:]) - buffer_len -= parser.buffer_pos - parser.buffer_pos = 0 - } else if parser.buffer_pos == buffer_len { - buffer_len = 0 - parser.buffer_pos = 0 - } - - // Open the whole buffer for writing, and cut it before returning. - parser.buffer = parser.buffer[:cap(parser.buffer)] - - // Fill the buffer until it has enough characters. - first := true - for parser.unread < length { - - // Fill the raw buffer if necessary. - if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { - if !yaml_parser_update_raw_buffer(parser) { - parser.buffer = parser.buffer[:buffer_len] - return false - } - } - first = false - - // Decode the raw buffer. - inner: - for parser.raw_buffer_pos != len(parser.raw_buffer) { - var value rune - var width int - - raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos - - // Decode the next character. - switch parser.encoding { - case yaml_UTF8_ENCODING: - // Decode a UTF-8 character. Check RFC 3629 - // (http://www.ietf.org/rfc/rfc3629.txt) for more details. - // - // The following table (taken from the RFC) is used for - // decoding. - // - // Char. number range | UTF-8 octet sequence - // (hexadecimal) | (binary) - // --------------------+------------------------------------ - // 0000 0000-0000 007F | 0xxxxxxx - // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx - // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx - // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // - // Additionally, the characters in the range 0xD800-0xDFFF - // are prohibited as they are reserved for use with UTF-16 - // surrogate pairs. - - // Determine the length of the UTF-8 sequence. - octet := parser.raw_buffer[parser.raw_buffer_pos] - switch { - case octet&0x80 == 0x00: - width = 1 - case octet&0xE0 == 0xC0: - width = 2 - case octet&0xF0 == 0xE0: - width = 3 - case octet&0xF8 == 0xF0: - width = 4 - default: - // The leading octet is invalid. - return yaml_parser_set_reader_error(parser, - "invalid leading UTF-8 octet", - parser.offset, int(octet)) - } - - // Check if the raw buffer contains an incomplete character. - if width > raw_unread { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-8 octet sequence", - parser.offset, -1) - } - break inner - } - - // Decode the leading octet. - switch { - case octet&0x80 == 0x00: - value = rune(octet & 0x7F) - case octet&0xE0 == 0xC0: - value = rune(octet & 0x1F) - case octet&0xF0 == 0xE0: - value = rune(octet & 0x0F) - case octet&0xF8 == 0xF0: - value = rune(octet & 0x07) - default: - value = 0 - } - - // Check and decode the trailing octets. - for k := 1; k < width; k++ { - octet = parser.raw_buffer[parser.raw_buffer_pos+k] - - // Check if the octet is valid. - if (octet & 0xC0) != 0x80 { - return yaml_parser_set_reader_error(parser, - "invalid trailing UTF-8 octet", - parser.offset+k, int(octet)) - } - - // Decode the octet. - value = (value << 6) + rune(octet&0x3F) - } - - // Check the length of the sequence against the value. - switch { - case width == 1: - case width == 2 && value >= 0x80: - case width == 3 && value >= 0x800: - case width == 4 && value >= 0x10000: - default: - return yaml_parser_set_reader_error(parser, - "invalid length of a UTF-8 sequence", - parser.offset, -1) - } - - // Check the range of the value. - if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { - return yaml_parser_set_reader_error(parser, - "invalid Unicode character", - parser.offset, int(value)) - } - - case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: - var low, high int - if parser.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - low, high = 1, 0 - } - - // The UTF-16 encoding is not as simple as one might - // naively think. Check RFC 2781 - // (http://www.ietf.org/rfc/rfc2781.txt). - // - // Normally, two subsequent bytes describe a Unicode - // character. However a special technique (called a - // surrogate pair) is used for specifying character - // values larger than 0xFFFF. - // - // A surrogate pair consists of two pseudo-characters: - // high surrogate area (0xD800-0xDBFF) - // low surrogate area (0xDC00-0xDFFF) - // - // The following formulas are used for decoding - // and encoding characters using surrogate pairs: - // - // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) - // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) - // W1 = 110110yyyyyyyyyy - // W2 = 110111xxxxxxxxxx - // - // where U is the character value, W1 is the high surrogate - // area, W2 is the low surrogate area. - - // Check for incomplete UTF-16 character. - if raw_unread < 2 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 character", - parser.offset, -1) - } - break inner - } - - // Get the character. - value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) - - // Check for unexpected low surrogate area. - if value&0xFC00 == 0xDC00 { - return yaml_parser_set_reader_error(parser, - "unexpected low surrogate area", - parser.offset, int(value)) - } - - // Check for a high surrogate area. - if value&0xFC00 == 0xD800 { - width = 4 - - // Check for incomplete surrogate pair. - if raw_unread < 4 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 surrogate pair", - parser.offset, -1) - } - break inner - } - - // Get the next character. - value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) - - // Check for a low surrogate area. - if value2&0xFC00 != 0xDC00 { - return yaml_parser_set_reader_error(parser, - "expected low surrogate area", - parser.offset+2, int(value2)) - } - - // Generate the value of the surrogate pair. - value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) - } else { - width = 2 - } - - default: - panic("impossible") - } - - // Check if the character is in the allowed range: - // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) - // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) - // | [#x10000-#x10FFFF] (32 bit) - switch { - case value == 0x09: - case value == 0x0A: - case value == 0x0D: - case value >= 0x20 && value <= 0x7E: - case value == 0x85: - case value >= 0xA0 && value <= 0xD7FF: - case value >= 0xE000 && value <= 0xFFFD: - case value >= 0x10000 && value <= 0x10FFFF: - default: - return yaml_parser_set_reader_error(parser, - "control characters are not allowed", - parser.offset, int(value)) - } - - // Move the raw pointers. - parser.raw_buffer_pos += width - parser.offset += width - - // Finally put the character into the buffer. - if value <= 0x7F { - // 0000 0000-0000 007F . 0xxxxxxx - parser.buffer[buffer_len+0] = byte(value) - buffer_len += 1 - } else if value <= 0x7FF { - // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) - parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) - buffer_len += 2 - } else if value <= 0xFFFF { - // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) - buffer_len += 3 - } else { - // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) - buffer_len += 4 - } - - parser.unread++ - } - - // On EOF, put NUL into the buffer and return. - if parser.eof { - parser.buffer[buffer_len] = 0 - buffer_len++ - parser.unread++ - break - } - } - // [Go] Read the documentation of this function above. To return true, - // we need to have the given length in the buffer. Not doing that means - // every single check that calls this function to make sure the buffer - // has a given length is Go) panicking; or C) accessing invalid memory. - // This happens here due to the EOF above breaking early. - for buffer_len < length { - parser.buffer[buffer_len] = 0 - buffer_len++ - } - parser.buffer = parser.buffer[:buffer_len] - return true -} diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go deleted file mode 100644 index 4120e0c9..00000000 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ /dev/null @@ -1,258 +0,0 @@ -package yaml - -import ( - "encoding/base64" - "math" - "regexp" - "strconv" - "strings" - "time" -) - -type resolveMapItem struct { - value interface{} - tag string -} - -var resolveTable = make([]byte, 256) -var resolveMap = make(map[string]resolveMapItem) - -func init() { - t := resolveTable - t[int('+')] = 'S' // Sign - t[int('-')] = 'S' - for _, c := range "0123456789" { - t[int(c)] = 'D' // Digit - } - for _, c := range "yYnNtTfFoO~" { - t[int(c)] = 'M' // In map - } - t[int('.')] = '.' // Float (potentially in map) - - var resolveMapList = []struct { - v interface{} - tag string - l []string - }{ - {true, yaml_BOOL_TAG, []string{"y", "Y", "yes", "Yes", "YES"}}, - {true, yaml_BOOL_TAG, []string{"true", "True", "TRUE"}}, - {true, yaml_BOOL_TAG, []string{"on", "On", "ON"}}, - {false, yaml_BOOL_TAG, []string{"n", "N", "no", "No", "NO"}}, - {false, yaml_BOOL_TAG, []string{"false", "False", "FALSE"}}, - {false, yaml_BOOL_TAG, []string{"off", "Off", "OFF"}}, - {nil, yaml_NULL_TAG, []string{"", "~", "null", "Null", "NULL"}}, - {math.NaN(), yaml_FLOAT_TAG, []string{".nan", ".NaN", ".NAN"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{".inf", ".Inf", ".INF"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{"+.inf", "+.Inf", "+.INF"}}, - {math.Inf(-1), yaml_FLOAT_TAG, []string{"-.inf", "-.Inf", "-.INF"}}, - {"<<", yaml_MERGE_TAG, []string{"<<"}}, - } - - m := resolveMap - for _, item := range resolveMapList { - for _, s := range item.l { - m[s] = resolveMapItem{item.v, item.tag} - } - } -} - -const longTagPrefix = "tag:yaml.org,2002:" - -func shortTag(tag string) string { - // TODO This can easily be made faster and produce less garbage. - if strings.HasPrefix(tag, longTagPrefix) { - return "!!" + tag[len(longTagPrefix):] - } - return tag -} - -func longTag(tag string) string { - if strings.HasPrefix(tag, "!!") { - return longTagPrefix + tag[2:] - } - return tag -} - -func resolvableTag(tag string) bool { - switch tag { - case "", yaml_STR_TAG, yaml_BOOL_TAG, yaml_INT_TAG, yaml_FLOAT_TAG, yaml_NULL_TAG, yaml_TIMESTAMP_TAG: - return true - } - return false -} - -var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) - -func resolve(tag string, in string) (rtag string, out interface{}) { - if !resolvableTag(tag) { - return tag, in - } - - defer func() { - switch tag { - case "", rtag, yaml_STR_TAG, yaml_BINARY_TAG: - return - case yaml_FLOAT_TAG: - if rtag == yaml_INT_TAG { - switch v := out.(type) { - case int64: - rtag = yaml_FLOAT_TAG - out = float64(v) - return - case int: - rtag = yaml_FLOAT_TAG - out = float64(v) - return - } - } - } - failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) - }() - - // Any data is accepted as a !!str or !!binary. - // Otherwise, the prefix is enough of a hint about what it might be. - hint := byte('N') - if in != "" { - hint = resolveTable[in[0]] - } - if hint != 0 && tag != yaml_STR_TAG && tag != yaml_BINARY_TAG { - // Handle things we can lookup in a map. - if item, ok := resolveMap[in]; ok { - return item.tag, item.value - } - - // Base 60 floats are a bad idea, were dropped in YAML 1.2, and - // are purposefully unsupported here. They're still quoted on - // the way out for compatibility with other parser, though. - - switch hint { - case 'M': - // We've already checked the map above. - - case '.': - // Not in the map, so maybe a normal float. - floatv, err := strconv.ParseFloat(in, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - - case 'D', 'S': - // Int, float, or timestamp. - // Only try values as a timestamp if the value is unquoted or there's an explicit - // !!timestamp tag. - if tag == "" || tag == yaml_TIMESTAMP_TAG { - t, ok := parseTimestamp(in) - if ok { - return yaml_TIMESTAMP_TAG, t - } - } - - plain := strings.Replace(in, "_", "", -1) - intv, err := strconv.ParseInt(plain, 0, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - uintv, err := strconv.ParseUint(plain, 0, 64) - if err == nil { - return yaml_INT_TAG, uintv - } - if yamlStyleFloat.MatchString(plain) { - floatv, err := strconv.ParseFloat(plain, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - } - if strings.HasPrefix(plain, "0b") { - intv, err := strconv.ParseInt(plain[2:], 2, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - uintv, err := strconv.ParseUint(plain[2:], 2, 64) - if err == nil { - return yaml_INT_TAG, uintv - } - } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) - if err == nil { - if true || intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - } - default: - panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") - } - } - return yaml_STR_TAG, in -} - -// encodeBase64 encodes s as base64 that is broken up into multiple lines -// as appropriate for the resulting length. -func encodeBase64(s string) string { - const lineLen = 70 - encLen := base64.StdEncoding.EncodedLen(len(s)) - lines := encLen/lineLen + 1 - buf := make([]byte, encLen*2+lines) - in := buf[0:encLen] - out := buf[encLen:] - base64.StdEncoding.Encode(in, []byte(s)) - k := 0 - for i := 0; i < len(in); i += lineLen { - j := i + lineLen - if j > len(in) { - j = len(in) - } - k += copy(out[k:], in[i:j]) - if lines > 1 { - out[k] = '\n' - k++ - } - } - return string(out[:k]) -} - -// This is a subset of the formats allowed by the regular expression -// defined at http://yaml.org/type/timestamp.html. -var allowedTimestampFormats = []string{ - "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. - "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". - "2006-1-2 15:4:5.999999999", // space separated with no time zone - "2006-1-2", // date only - // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" - // from the set of examples. -} - -// parseTimestamp parses s as a timestamp string and -// returns the timestamp and reports whether it succeeded. -// Timestamp formats are defined at http://yaml.org/type/timestamp.html -func parseTimestamp(s string) (time.Time, bool) { - // TODO write code to check all the formats supported by - // http://yaml.org/type/timestamp.html instead of using time.Parse. - - // Quick check: all date formats start with YYYY-. - i := 0 - for ; i < len(s); i++ { - if c := s[i]; c < '0' || c > '9' { - break - } - } - if i != 4 || i == len(s) || s[i] != '-' { - return time.Time{}, false - } - for _, format := range allowedTimestampFormats { - if t, err := time.Parse(format, s); err == nil { - return t, true - } - } - return time.Time{}, false -} diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go deleted file mode 100644 index 0b9bb603..00000000 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ /dev/null @@ -1,2711 +0,0 @@ -package yaml - -import ( - "bytes" - "fmt" -) - -// Introduction -// ************ -// -// The following notes assume that you are familiar with the YAML specification -// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in -// some cases we are less restrictive that it requires. -// -// The process of transforming a YAML stream into a sequence of events is -// divided on two steps: Scanning and Parsing. -// -// The Scanner transforms the input stream into a sequence of tokens, while the -// parser transform the sequence of tokens produced by the Scanner into a -// sequence of parsing events. -// -// The Scanner is rather clever and complicated. The Parser, on the contrary, -// is a straightforward implementation of a recursive-descendant parser (or, -// LL(1) parser, as it is usually called). -// -// Actually there are two issues of Scanning that might be called "clever", the -// rest is quite straightforward. The issues are "block collection start" and -// "simple keys". Both issues are explained below in details. -// -// Here the Scanning step is explained and implemented. We start with the list -// of all the tokens produced by the Scanner together with short descriptions. -// -// Now, tokens: -// -// STREAM-START(encoding) # The stream start. -// STREAM-END # The stream end. -// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. -// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. -// DOCUMENT-START # '---' -// DOCUMENT-END # '...' -// BLOCK-SEQUENCE-START # Indentation increase denoting a block -// BLOCK-MAPPING-START # sequence or a block mapping. -// BLOCK-END # Indentation decrease. -// FLOW-SEQUENCE-START # '[' -// FLOW-SEQUENCE-END # ']' -// BLOCK-SEQUENCE-START # '{' -// BLOCK-SEQUENCE-END # '}' -// BLOCK-ENTRY # '-' -// FLOW-ENTRY # ',' -// KEY # '?' or nothing (simple keys). -// VALUE # ':' -// ALIAS(anchor) # '*anchor' -// ANCHOR(anchor) # '&anchor' -// TAG(handle,suffix) # '!handle!suffix' -// SCALAR(value,style) # A scalar. -// -// The following two tokens are "virtual" tokens denoting the beginning and the -// end of the stream: -// -// STREAM-START(encoding) -// STREAM-END -// -// We pass the information about the input stream encoding with the -// STREAM-START token. -// -// The next two tokens are responsible for tags: -// -// VERSION-DIRECTIVE(major,minor) -// TAG-DIRECTIVE(handle,prefix) -// -// Example: -// -// %YAML 1.1 -// %TAG ! !foo -// %TAG !yaml! tag:yaml.org,2002: -// --- -// -// The correspoding sequence of tokens: -// -// STREAM-START(utf-8) -// VERSION-DIRECTIVE(1,1) -// TAG-DIRECTIVE("!","!foo") -// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") -// DOCUMENT-START -// STREAM-END -// -// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole -// line. -// -// The document start and end indicators are represented by: -// -// DOCUMENT-START -// DOCUMENT-END -// -// Note that if a YAML stream contains an implicit document (without '---' -// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be -// produced. -// -// In the following examples, we present whole documents together with the -// produced tokens. -// -// 1. An implicit document: -// -// 'a scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// STREAM-END -// -// 2. An explicit document: -// -// --- -// 'a scalar' -// ... -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// SCALAR("a scalar",single-quoted) -// DOCUMENT-END -// STREAM-END -// -// 3. Several documents in a stream: -// -// 'a scalar' -// --- -// 'another scalar' -// --- -// 'yet another scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// DOCUMENT-START -// SCALAR("another scalar",single-quoted) -// DOCUMENT-START -// SCALAR("yet another scalar",single-quoted) -// STREAM-END -// -// We have already introduced the SCALAR token above. The following tokens are -// used to describe aliases, anchors, tag, and scalars: -// -// ALIAS(anchor) -// ANCHOR(anchor) -// TAG(handle,suffix) -// SCALAR(value,style) -// -// The following series of examples illustrate the usage of these tokens: -// -// 1. A recursive sequence: -// -// &A [ *A ] -// -// Tokens: -// -// STREAM-START(utf-8) -// ANCHOR("A") -// FLOW-SEQUENCE-START -// ALIAS("A") -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A tagged scalar: -// -// !!float "3.14" # A good approximation. -// -// Tokens: -// -// STREAM-START(utf-8) -// TAG("!!","float") -// SCALAR("3.14",double-quoted) -// STREAM-END -// -// 3. Various scalar styles: -// -// --- # Implicit empty plain scalars do not produce tokens. -// --- a plain scalar -// --- 'a single-quoted scalar' -// --- "a double-quoted scalar" -// --- |- -// a literal scalar -// --- >- -// a folded -// scalar -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// DOCUMENT-START -// SCALAR("a plain scalar",plain) -// DOCUMENT-START -// SCALAR("a single-quoted scalar",single-quoted) -// DOCUMENT-START -// SCALAR("a double-quoted scalar",double-quoted) -// DOCUMENT-START -// SCALAR("a literal scalar",literal) -// DOCUMENT-START -// SCALAR("a folded scalar",folded) -// STREAM-END -// -// Now it's time to review collection-related tokens. We will start with -// flow collections: -// -// FLOW-SEQUENCE-START -// FLOW-SEQUENCE-END -// FLOW-MAPPING-START -// FLOW-MAPPING-END -// FLOW-ENTRY -// KEY -// VALUE -// -// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and -// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' -// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the -// indicators '?' and ':', which are used for denoting mapping keys and values, -// are represented by the KEY and VALUE tokens. -// -// The following examples show flow collections: -// -// 1. A flow sequence: -// -// [item 1, item 2, item 3] -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-SEQUENCE-START -// SCALAR("item 1",plain) -// FLOW-ENTRY -// SCALAR("item 2",plain) -// FLOW-ENTRY -// SCALAR("item 3",plain) -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A flow mapping: -// -// { -// a simple key: a value, # Note that the KEY token is produced. -// ? a complex key: another value, -// } -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// FLOW-ENTRY -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// FLOW-ENTRY -// FLOW-MAPPING-END -// STREAM-END -// -// A simple key is a key which is not denoted by the '?' indicator. Note that -// the Scanner still produce the KEY token whenever it encounters a simple key. -// -// For scanning block collections, the following tokens are used (note that we -// repeat KEY and VALUE here): -// -// BLOCK-SEQUENCE-START -// BLOCK-MAPPING-START -// BLOCK-END -// BLOCK-ENTRY -// KEY -// VALUE -// -// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation -// increase that precedes a block collection (cf. the INDENT token in Python). -// The token BLOCK-END denote indentation decrease that ends a block collection -// (cf. the DEDENT token in Python). However YAML has some syntax pecularities -// that makes detections of these tokens more complex. -// -// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators -// '-', '?', and ':' correspondingly. -// -// The following examples show how the tokens BLOCK-SEQUENCE-START, -// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: -// -// 1. Block sequences: -// -// - item 1 -// - item 2 -// - -// - item 3.1 -// - item 3.2 -// - -// key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 3.1",plain) -// BLOCK-ENTRY -// SCALAR("item 3.2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Block mappings: -// -// a simple key: a value # The KEY token is produced here. -// ? a complex key -// : another value -// a mapping: -// key 1: value 1 -// key 2: value 2 -// a sequence: -// - item 1 -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// KEY -// SCALAR("a mapping",plain) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML does not always require to start a new block collection from a new -// line. If the current line contains only '-', '?', and ':' indicators, a new -// block collection may start at the current line. The following examples -// illustrate this case: -// -// 1. Collections in a sequence: -// -// - - item 1 -// - item 2 -// - key 1: value 1 -// key 2: value 2 -// - ? complex key -// : complex value -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("complex key") -// VALUE -// SCALAR("complex value") -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Collections in a mapping: -// -// ? a sequence -// : - item 1 -// - item 2 -// ? a mapping -// : key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// KEY -// SCALAR("a mapping",plain) -// VALUE -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML also permits non-indented sequences if they are included into a block -// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: -// -// key: -// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key",plain) -// VALUE -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// - -// Ensure that the buffer contains the required number of characters. -// Return true on success, false on failure (reader error or memory error). -func cache(parser *yaml_parser_t, length int) bool { - // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) - return parser.unread >= length || yaml_parser_update_buffer(parser, length) -} - -// Advance the buffer pointer. -func skip(parser *yaml_parser_t) { - parser.mark.index++ - parser.mark.column++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) -} - -func skip_line(parser *yaml_parser_t) { - if is_crlf(parser.buffer, parser.buffer_pos) { - parser.mark.index += 2 - parser.mark.column = 0 - parser.mark.line++ - parser.unread -= 2 - parser.buffer_pos += 2 - } else if is_break(parser.buffer, parser.buffer_pos) { - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) - } -} - -// Copy a character to a string buffer and advance pointers. -func read(parser *yaml_parser_t, s []byte) []byte { - w := width(parser.buffer[parser.buffer_pos]) - if w == 0 { - panic("invalid character sequence") - } - if len(s) == 0 { - s = make([]byte, 0, 32) - } - if w == 1 && len(s)+w <= cap(s) { - s = s[:len(s)+1] - s[len(s)-1] = parser.buffer[parser.buffer_pos] - parser.buffer_pos++ - } else { - s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) - parser.buffer_pos += w - } - parser.mark.index++ - parser.mark.column++ - parser.unread-- - return s -} - -// Copy a line break character to a string buffer and advance pointers. -func read_line(parser *yaml_parser_t, s []byte) []byte { - buf := parser.buffer - pos := parser.buffer_pos - switch { - case buf[pos] == '\r' && buf[pos+1] == '\n': - // CR LF . LF - s = append(s, '\n') - parser.buffer_pos += 2 - parser.mark.index++ - parser.unread-- - case buf[pos] == '\r' || buf[pos] == '\n': - // CR|LF . LF - s = append(s, '\n') - parser.buffer_pos += 1 - case buf[pos] == '\xC2' && buf[pos+1] == '\x85': - // NEL . LF - s = append(s, '\n') - parser.buffer_pos += 2 - case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): - // LS|PS . LS|PS - s = append(s, buf[parser.buffer_pos:pos+3]...) - parser.buffer_pos += 3 - default: - return s - } - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - return s -} - -// Get the next token. -func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { - // Erase the token object. - *token = yaml_token_t{} // [Go] Is this necessary? - - // No tokens after STREAM-END or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR { - return true - } - - // Ensure that the tokens queue contains enough tokens. - if !parser.token_available { - if !yaml_parser_fetch_more_tokens(parser) { - return false - } - } - - // Fetch the next token from the queue. - *token = parser.tokens[parser.tokens_head] - parser.tokens_head++ - parser.tokens_parsed++ - parser.token_available = false - - if token.typ == yaml_STREAM_END_TOKEN { - parser.stream_end_produced = true - } - return true -} - -// Set the scanner error and return false. -func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { - parser.error = yaml_SCANNER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = parser.mark - return false -} - -func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { - context := "while parsing a tag" - if directive { - context = "while parsing a %TAG directive" - } - return yaml_parser_set_scanner_error(parser, context, context_mark, problem) -} - -func trace(args ...interface{}) func() { - pargs := append([]interface{}{"+++"}, args...) - fmt.Println(pargs...) - pargs = append([]interface{}{"---"}, args...) - return func() { fmt.Println(pargs...) } -} - -// Ensure that the tokens queue contains at least one token which can be -// returned to the Parser. -func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { - // While we need more tokens to fetch, do it. - for { - if parser.tokens_head != len(parser.tokens) { - // If queue is non-empty, check if any potential simple key may - // occupy the head position. - head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] - if !ok { - break - } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { - return false - } else if !valid { - break - } - } - // Fetch the next token. - if !yaml_parser_fetch_next_token(parser) { - return false - } - } - - parser.token_available = true - return true -} - -// The dispatcher for token fetchers. -func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool { - // Ensure that the buffer is initialized. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we just started scanning. Fetch STREAM-START then. - if !parser.stream_start_produced { - return yaml_parser_fetch_stream_start(parser) - } - - // Eat whitespaces and comments until we reach the next token. - if !yaml_parser_scan_to_next_token(parser) { - return false - } - - // Check the indentation level against the current column. - if !yaml_parser_unroll_indent(parser, parser.mark.column) { - return false - } - - // Ensure that the buffer contains at least 4 characters. 4 is the length - // of the longest indicators ('--- ' and '... '). - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - // Is it the end of the stream? - if is_z(parser.buffer, parser.buffer_pos) { - return yaml_parser_fetch_stream_end(parser) - } - - // Is it a directive? - if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { - return yaml_parser_fetch_directive(parser) - } - - buf := parser.buffer - pos := parser.buffer_pos - - // Is it the document start indicator? - if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) - } - - // Is it the document end indicator? - if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) - } - - // Is it the flow sequence start indicator? - if buf[pos] == '[' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) - } - - // Is it the flow mapping start indicator? - if parser.buffer[parser.buffer_pos] == '{' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) - } - - // Is it the flow sequence end indicator? - if parser.buffer[parser.buffer_pos] == ']' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_SEQUENCE_END_TOKEN) - } - - // Is it the flow mapping end indicator? - if parser.buffer[parser.buffer_pos] == '}' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_MAPPING_END_TOKEN) - } - - // Is it the flow entry indicator? - if parser.buffer[parser.buffer_pos] == ',' { - return yaml_parser_fetch_flow_entry(parser) - } - - // Is it the block entry indicator? - if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { - return yaml_parser_fetch_block_entry(parser) - } - - // Is it the key indicator? - if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_key(parser) - } - - // Is it the value indicator? - if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_value(parser) - } - - // Is it an alias? - if parser.buffer[parser.buffer_pos] == '*' { - return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) - } - - // Is it an anchor? - if parser.buffer[parser.buffer_pos] == '&' { - return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) - } - - // Is it a tag? - if parser.buffer[parser.buffer_pos] == '!' { - return yaml_parser_fetch_tag(parser) - } - - // Is it a literal scalar? - if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, true) - } - - // Is it a folded scalar? - if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, false) - } - - // Is it a single-quoted scalar? - if parser.buffer[parser.buffer_pos] == '\'' { - return yaml_parser_fetch_flow_scalar(parser, true) - } - - // Is it a double-quoted scalar? - if parser.buffer[parser.buffer_pos] == '"' { - return yaml_parser_fetch_flow_scalar(parser, false) - } - - // Is it a plain scalar? - // - // A plain scalar may start with any non-blank characters except - // - // '-', '?', ':', ',', '[', ']', '{', '}', - // '#', '&', '*', '!', '|', '>', '\'', '\"', - // '%', '@', '`'. - // - // In the block context (and, for the '-' indicator, in the flow context - // too), it may also start with the characters - // - // '-', '?', ':' - // - // if it is followed by a non-space character. - // - // The last rule is more restrictive than the specification requires. - // [Go] Make this logic more reasonable. - //switch parser.buffer[parser.buffer_pos] { - //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': - //} - if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || - parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || - parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || - (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level == 0 && - (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && - !is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_plain_scalar(parser) - } - - // If we don't determine the token type so far, it is an error. - return yaml_parser_set_scanner_error(parser, - "while scanning for the next token", parser.mark, - "found character that cannot start any token") -} - -func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { - if !simple_key.possible { - return false, true - } - - // The 1.2 specification says: - // - // "If the ? indicator is omitted, parsing needs to see past the - // implicit key to recognize it as such. To limit the amount of - // lookahead required, the “:” indicator must appear at most 1024 - // Unicode characters beyond the start of the key. In addition, the key - // is restricted to a single line." - // - if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index { - // Check if the potential simple key to be removed is required. - if simple_key.required { - return false, yaml_parser_set_scanner_error(parser, - "while scanning a simple key", simple_key.mark, - "could not find expected ':'") - } - simple_key.possible = false - return false, true - } - return true, true -} - -// Check if a simple key may start at the current position and add it if -// needed. -func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { - // A simple key is required at the current position if the scanner is in - // the block context and the current column coincides with the indentation - // level. - - required := parser.flow_level == 0 && parser.indent == parser.mark.column - - // - // If the current position may start a simple key, save it. - // - if parser.simple_key_allowed { - simple_key := yaml_simple_key_t{ - possible: true, - required: required, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - mark: parser.mark, - } - - if !yaml_parser_remove_simple_key(parser) { - return false - } - parser.simple_keys[len(parser.simple_keys)-1] = simple_key - parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 - } - return true -} - -// Remove a potential simple key at the current flow level. -func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { - i := len(parser.simple_keys) - 1 - if parser.simple_keys[i].possible { - // If the key is required, it is an error. - if parser.simple_keys[i].required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", parser.simple_keys[i].mark, - "could not find expected ':'") - } - // Remove the key from the stack. - parser.simple_keys[i].possible = false - delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) - } - return true -} - -// max_flow_level limits the flow_level -const max_flow_level = 10000 - -// Increase the flow level and resize the simple key list if needed. -func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { - // Reset the simple key on the next level. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{ - possible: false, - required: false, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - mark: parser.mark, - }) - - // Increase the flow level. - parser.flow_level++ - if parser.flow_level > max_flow_level { - return yaml_parser_set_scanner_error(parser, - "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, - fmt.Sprintf("exceeded max depth of %d", max_flow_level)) - } - return true -} - -// Decrease the flow level. -func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { - if parser.flow_level > 0 { - parser.flow_level-- - last := len(parser.simple_keys) - 1 - delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) - parser.simple_keys = parser.simple_keys[:last] - } - return true -} - -// max_indents limits the indents stack size -const max_indents = 10000 - -// Push the current indentation level to the stack and set the new level -// the current column is greater than the indentation level. In this case, -// append or insert the specified token into the token queue. -func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - if parser.indent < column { - // Push the current indentation level to the stack and set the new - // indentation level. - parser.indents = append(parser.indents, parser.indent) - parser.indent = column - if len(parser.indents) > max_indents { - return yaml_parser_set_scanner_error(parser, - "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, - fmt.Sprintf("exceeded max depth of %d", max_indents)) - } - - // Create a token and insert it into the queue. - token := yaml_token_t{ - typ: typ, - start_mark: mark, - end_mark: mark, - } - if number > -1 { - number -= parser.tokens_parsed - } - yaml_insert_token(parser, number, &token) - } - return true -} - -// Pop indentation levels from the indents stack until the current level -// becomes less or equal to the column. For each indentation level, append -// the BLOCK-END token. -func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - // Loop through the indentation levels in the stack. - for parser.indent > column { - // Create a token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - - // Pop the indentation level. - parser.indent = parser.indents[len(parser.indents)-1] - parser.indents = parser.indents[:len(parser.indents)-1] - } - return true -} - -// Initialize the scanner and produce the STREAM-START token. -func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { - - // Set the initial indentation. - parser.indent = -1 - - // Initialize the simple key stack. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - parser.simple_keys_by_tok = make(map[int]int) - - // A simple key is allowed at the beginning of the stream. - parser.simple_key_allowed = true - - // We have started. - parser.stream_start_produced = true - - // Create the STREAM-START token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_START_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - encoding: parser.encoding, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the STREAM-END token and shut down the scanner. -func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { - - // Force new line. - if parser.mark.column != 0 { - parser.mark.column = 0 - parser.mark.line++ - } - - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the STREAM-END token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. -func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. - token := yaml_token_t{} - if !yaml_parser_scan_directive(parser, &token) { - return false - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the DOCUMENT-START or DOCUMENT-END token. -func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Consume the token. - start_mark := parser.mark - - skip(parser) - skip(parser) - skip(parser) - - end_mark := parser.mark - - // Create the DOCUMENT-START or DOCUMENT-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. -func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // The indicators '[' and '{' may start a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // Increase the flow level. - if !yaml_parser_increase_flow_level(parser) { - return false - } - - // A simple key may follow the indicators '[' and '{'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. -func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset any potential simple key on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Decrease the flow level. - if !yaml_parser_decrease_flow_level(parser) { - return false - } - - // No simple keys after the indicators ']' and '}'. - parser.simple_key_allowed = false - - // Consume the token. - - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-ENTRY token. -func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after ','. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_FLOW_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the BLOCK-ENTRY token. -func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { - // Check if the scanner is in the block context. - if parser.flow_level == 0 { - // Check if we are allowed to start a new entry. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "block sequence entries are not allowed in this context") - } - // Add the BLOCK-SEQUENCE-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { - return false - } - } else { - // It is an error for the '-' indicator to occur in the flow context, - // but we let the Parser detect and report about it because the Parser - // is able to point to the context. - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '-'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the BLOCK-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the KEY token. -func yaml_parser_fetch_key(parser *yaml_parser_t) bool { - - // In the block context, additional checks are required. - if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping keys are not allowed in this context") - } - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '?' in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the KEY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the VALUE token. -func yaml_parser_fetch_value(parser *yaml_parser_t) bool { - - simple_key := &parser.simple_keys[len(parser.simple_keys)-1] - - // Have we found a simple key? - if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { - return false - - } else if valid { - - // Create the KEY token and insert it into the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: simple_key.mark, - end_mark: simple_key.mark, - } - yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) - - // In the block context, we may need to add the BLOCK-MAPPING-START token. - if !yaml_parser_roll_indent(parser, simple_key.mark.column, - simple_key.token_number, - yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { - return false - } - - // Remove the simple key. - simple_key.possible = false - delete(parser.simple_keys_by_tok, simple_key.token_number) - - // A simple key cannot follow another simple key. - parser.simple_key_allowed = false - - } else { - // The ':' indicator follows a complex key. - - // In the block context, extra checks are required. - if parser.flow_level == 0 { - - // Check if we are allowed to start a complex value. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping values are not allowed in this context") - } - - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Simple keys after ':' are allowed in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - } - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the VALUE token and append it to the queue. - token := yaml_token_t{ - typ: yaml_VALUE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the ALIAS or ANCHOR token. -func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // An anchor or an alias could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow an anchor or an alias. - parser.simple_key_allowed = false - - // Create the ALIAS or ANCHOR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_anchor(parser, &token, typ) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the TAG token. -func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { - // A tag could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a tag. - parser.simple_key_allowed = false - - // Create the TAG token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_tag(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. -func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { - // Remove any potential simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // A simple key may follow a block scalar. - parser.simple_key_allowed = true - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_block_scalar(parser, &token, literal) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. -func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_flow_scalar(parser, &token, single) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,plain) token. -func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_plain_scalar(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Eat whitespaces and comments until the next token is found. -func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { - - // Until the next token is not found. - for { - // Allow the BOM mark to start a line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { - skip(parser) - } - - // Eat whitespaces. - // Tabs are allowed: - // - in the flow context - // - in the block context, but not at the beginning of the line or - // after '-', '?', or ':' (complex value). - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Eat a comment until a line break. - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // If it is a line break, eat it. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - - // In the block context, a new line may start a simple key. - if parser.flow_level == 0 { - parser.simple_key_allowed = true - } - } else { - break // We have found a token. - } - } - - return true -} - -// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { - // Eat '%'. - start_mark := parser.mark - skip(parser) - - // Scan the directive name. - var name []byte - if !yaml_parser_scan_directive_name(parser, start_mark, &name) { - return false - } - - // Is it a YAML directive? - if bytes.Equal(name, []byte("YAML")) { - // Scan the VERSION directive value. - var major, minor int8 - if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { - return false - } - end_mark := parser.mark - - // Create a VERSION-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_VERSION_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - major: major, - minor: minor, - } - - // Is it a TAG directive? - } else if bytes.Equal(name, []byte("TAG")) { - // Scan the TAG directive value. - var handle, prefix []byte - if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { - return false - } - end_mark := parser.mark - - // Create a TAG-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_TAG_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - prefix: prefix, - } - - // Unknown directive. - } else { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unknown directive name") - return false - } - - // Eat the rest of the line including any comments. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - return true -} - -// Scan the directive name. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ -// -func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { - // Consume the directive name. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - var s []byte - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the name is empty. - if len(s) == 0 { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "could not find expected directive name") - return false - } - - // Check for an blank character after the name. - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unexpected non-alphabetical character") - return false - } - *name = s - return true -} - -// Scan the value of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ -func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the major version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { - return false - } - - // Eat '.'. - if parser.buffer[parser.buffer_pos] != '.' { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected digit or '.' character") - } - - skip(parser) - - // Consume the minor version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { - return false - } - return true -} - -const max_number_length = 2 - -// Scan the version number of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ -func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { - - // Repeat while the next character is digit. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var value, length int8 - for is_digit(parser.buffer, parser.buffer_pos) { - // Check if the number is too long. - length++ - if length > max_number_length { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "found extremely long version number") - } - value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the number was present. - if length == 0 { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected version number") - } - *number = value - return true -} - -// Scan the value of a TAG-DIRECTIVE token. -// -// Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { - var handle_value, prefix_value []byte - - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a handle. - if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { - return false - } - - // Expect a whitespace. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blank(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace") - return false - } - - // Eat whitespaces. - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a prefix. - if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { - return false - } - - // Expect a whitespace or line break. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace or line break") - return false - } - - *handle = handle_value - *prefix = prefix_value - return true -} - -func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { - var s []byte - - // Eat the indicator character. - start_mark := parser.mark - skip(parser) - - // Consume the value. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - end_mark := parser.mark - - /* - * Check if length of the anchor is greater than 0 and it is followed by - * a whitespace character or one of the indicators: - * - * '?', ':', ',', ']', '}', '%', '@', '`'. - */ - - if len(s) == 0 || - !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || - parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '`') { - context := "while scanning an alias" - if typ == yaml_ANCHOR_TOKEN { - context = "while scanning an anchor" - } - yaml_parser_set_scanner_error(parser, context, start_mark, - "did not find expected alphabetic or numeric character") - return false - } - - // Create a token. - *token = yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - value: s, - } - - return true -} - -/* - * Scan a TAG token. - */ - -func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { - var handle, suffix []byte - - start_mark := parser.mark - - // Check if the tag is in the canonical form. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - if parser.buffer[parser.buffer_pos+1] == '<' { - // Keep the handle as '' - - // Eat '!<' - skip(parser) - skip(parser) - - // Consume the tag value. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - - // Check for '>' and eat it. - if parser.buffer[parser.buffer_pos] != '>' { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find the expected '>'") - return false - } - - skip(parser) - } else { - // The tag has either the '!suffix' or the '!handle!suffix' form. - - // First, try to scan a handle. - if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { - return false - } - - // Check if it is, indeed, handle. - if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { - // Scan the suffix now. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - } else { - // It wasn't a handle after all. Scan the rest of the tag. - if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { - return false - } - - // Set the handle to '!'. - handle = []byte{'!'} - - // A special case: the '!' tag. Set the handle to '' and the - // suffix to '!'. - if len(suffix) == 0 { - handle, suffix = suffix, handle - } - } - } - - // Check the character which ends the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find expected whitespace or line break") - return false - } - - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_TAG_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - suffix: suffix, - } - return true -} - -// Scan a tag handle. -func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { - // Check the initial '!' character. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] != '!' { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - - var s []byte - - // Copy the '!' character. - s = read(parser, s) - - // Copy all subsequent alphabetical and numerical characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the trailing character is '!' and copy it. - if parser.buffer[parser.buffer_pos] == '!' { - s = read(parser, s) - } else { - // It's either the '!' tag or not really a tag handle. If it's a %TAG - // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && string(s) != "!" { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - } - - *handle = s - return true -} - -// Scan a tag. -func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { - //size_t length = head ? strlen((char *)head) : 0 - var s []byte - hasTag := len(head) > 0 - - // Copy the head if needed. - // - // Note that we don't copy the leading '!' character. - if len(head) > 1 { - s = append(s, head[1:]...) - } - - // Scan the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // The set of characters that may appear in URI is as follows: - // - // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', - // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', - // '%'. - // [Go] Convert this into more reasonable logic. - for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || - parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || - parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || - parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || - parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || - parser.buffer[parser.buffer_pos] == '%' { - // Check if it is a URI-escape sequence. - if parser.buffer[parser.buffer_pos] == '%' { - if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { - return false - } - } else { - s = read(parser, s) - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - hasTag = true - } - - if !hasTag { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected tag URI") - return false - } - *uri = s - return true -} - -// Decode an URI-escape sequence corresponding to a single UTF-8 character. -func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { - - // Decode the required number of characters. - w := 1024 - for w > 0 { - // Check for a URI-escaped octet. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - - if !(parser.buffer[parser.buffer_pos] == '%' && - is_hex(parser.buffer, parser.buffer_pos+1) && - is_hex(parser.buffer, parser.buffer_pos+2)) { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find URI escaped octet") - } - - // Get the octet. - octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) - - // If it is the leading octet, determine the length of the UTF-8 sequence. - if w == 1024 { - w = width(octet) - if w == 0 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect leading UTF-8 octet") - } - } else { - // Check if the trailing octet is correct. - if octet&0xC0 != 0x80 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect trailing UTF-8 octet") - } - } - - // Copy the octet and move the pointers. - *s = append(*s, octet) - skip(parser) - skip(parser) - skip(parser) - w-- - } - return true -} - -// Scan a block scalar. -func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { - // Eat the indicator '|' or '>'. - start_mark := parser.mark - skip(parser) - - // Scan the additional block scalar indicators. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check for a chomping indicator. - var chomping, increment int - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - // Set the chomping method and eat the indicator. - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - - // Check for an indentation indicator. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_digit(parser.buffer, parser.buffer_pos) { - // Check that the indentation is greater than 0. - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an indentation indicator equal to 0") - return false - } - - // Get the indentation level and eat the indicator. - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - } - - } else if is_digit(parser.buffer, parser.buffer_pos) { - // Do the same as above, but in the opposite order. - - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an indentation indicator equal to 0") - return false - } - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - } - } - - // Eat whitespaces and comments to the end of the line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - end_mark := parser.mark - - // Set the indentation level if it was specified. - var indent int - if increment > 0 { - if parser.indent >= 0 { - indent = parser.indent + increment - } else { - indent = increment - } - } - - // Scan the leading line breaks and determine the indentation level if needed. - var s, leading_break, trailing_breaks []byte - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - - // Scan the block scalar content. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var leading_blank, trailing_blank bool - for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { - // We are at the beginning of a non-empty line. - - // Is it a trailing whitespace? - trailing_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Check if we need to fold the leading line break. - if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { - // Do we need to join the lines by space? - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } - } else { - s = append(s, leading_break...) - } - leading_break = leading_break[:0] - - // Append the remaining line breaks. - s = append(s, trailing_breaks...) - trailing_breaks = trailing_breaks[:0] - - // Is it a leading whitespace? - leading_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Consume the current line. - for !is_breakz(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - leading_break = read_line(parser, leading_break) - - // Eat the following indentation spaces and line breaks. - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - } - - // Chomp the tail. - if chomping != -1 { - s = append(s, leading_break...) - } - if chomping == 1 { - s = append(s, trailing_breaks...) - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_LITERAL_SCALAR_STYLE, - } - if !literal { - token.style = yaml_FOLDED_SCALAR_STYLE - } - return true -} - -// Scan indentation spaces and line breaks for a block scalar. Determine the -// indentation level if needed. -func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { - *end_mark = parser.mark - - // Eat the indentation spaces and line breaks. - max_indent := 0 - for { - // Eat the indentation spaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.mark.column > max_indent { - max_indent = parser.mark.column - } - - // Check for a tab character messing the indentation. - if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { - return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found a tab character where an indentation space is expected") - } - - // Have we found a non-empty line? - if !is_break(parser.buffer, parser.buffer_pos) { - break - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - // [Go] Should really be returning breaks instead. - *breaks = read_line(parser, *breaks) - *end_mark = parser.mark - } - - // Determine the indentation level if needed. - if *indent == 0 { - *indent = max_indent - if *indent < parser.indent+1 { - *indent = parser.indent + 1 - } - if *indent < 1 { - *indent = 1 - } - } - return true -} - -// Scan a quoted scalar. -func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { - // Eat the left quote. - start_mark := parser.mark - skip(parser) - - // Consume the content of the quoted scalar. - var s, leading_break, trailing_breaks, whitespaces []byte - for { - // Check that there are no document indicators at the beginning of the line. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected document indicator") - return false - } - - // Check for EOF. - if is_z(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected end of stream") - return false - } - - // Consume non-blank characters. - leading_blanks := false - for !is_blankz(parser.buffer, parser.buffer_pos) { - if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { - // Is is an escaped single quote. - s = append(s, '\'') - skip(parser) - skip(parser) - - } else if single && parser.buffer[parser.buffer_pos] == '\'' { - // It is a right single quote. - break - } else if !single && parser.buffer[parser.buffer_pos] == '"' { - // It is a right double quote. - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { - // It is an escaped line break. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - skip(parser) - skip_line(parser) - leading_blanks = true - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' { - // It is an escape sequence. - code_length := 0 - - // Check the escape character. - switch parser.buffer[parser.buffer_pos+1] { - case '0': - s = append(s, 0) - case 'a': - s = append(s, '\x07') - case 'b': - s = append(s, '\x08') - case 't', '\t': - s = append(s, '\x09') - case 'n': - s = append(s, '\x0A') - case 'v': - s = append(s, '\x0B') - case 'f': - s = append(s, '\x0C') - case 'r': - s = append(s, '\x0D') - case 'e': - s = append(s, '\x1B') - case ' ': - s = append(s, '\x20') - case '"': - s = append(s, '"') - case '\'': - s = append(s, '\'') - case '\\': - s = append(s, '\\') - case 'N': // NEL (#x85) - s = append(s, '\xC2') - s = append(s, '\x85') - case '_': // #xA0 - s = append(s, '\xC2') - s = append(s, '\xA0') - case 'L': // LS (#x2028) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA8') - case 'P': // PS (#x2029) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA9') - case 'x': - code_length = 2 - case 'u': - code_length = 4 - case 'U': - code_length = 8 - default: - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found unknown escape character") - return false - } - - skip(parser) - skip(parser) - - // Consume an arbitrary escape code. - if code_length > 0 { - var value int - - // Scan the character value. - if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { - return false - } - for k := 0; k < code_length; k++ { - if !is_hex(parser.buffer, parser.buffer_pos+k) { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "did not find expected hexdecimal number") - return false - } - value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) - } - - // Check the value and write the character. - if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found invalid Unicode character escape code") - return false - } - if value <= 0x7F { - s = append(s, byte(value)) - } else if value <= 0x7FF { - s = append(s, byte(0xC0+(value>>6))) - s = append(s, byte(0x80+(value&0x3F))) - } else if value <= 0xFFFF { - s = append(s, byte(0xE0+(value>>12))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } else { - s = append(s, byte(0xF0+(value>>18))) - s = append(s, byte(0x80+((value>>12)&0x3F))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } - - // Advance the pointer. - for k := 0; k < code_length; k++ { - skip(parser) - } - } - } else { - // It is a non-escaped non-blank character. - s = read(parser, s) - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we are at the end of the scalar. - if single { - if parser.buffer[parser.buffer_pos] == '\'' { - break - } - } else { - if parser.buffer[parser.buffer_pos] == '"' { - break - } - } - - // Consume blank characters. - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Join the whitespaces or fold line breaks. - if leading_blanks { - // Do we need to fold line breaks? - if len(leading_break) > 0 && leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Eat the right quote. - skip(parser) - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_SINGLE_QUOTED_SCALAR_STYLE, - } - if !single { - token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - return true -} - -// Scan a plain scalar. -func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { - - var s, leading_break, trailing_breaks, whitespaces []byte - var leading_blanks bool - var indent = parser.indent + 1 - - start_mark := parser.mark - end_mark := parser.mark - - // Consume the content of the plain scalar. - for { - // Check for a document indicator. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - break - } - - // Check for a comment. - if parser.buffer[parser.buffer_pos] == '#' { - break - } - - // Consume non-blank characters. - for !is_blankz(parser.buffer, parser.buffer_pos) { - - // Check for indicators that may end a plain scalar. - if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level > 0 && - (parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}')) { - break - } - - // Check if we need to join whitespaces and breaks. - if leading_blanks || len(whitespaces) > 0 { - if leading_blanks { - // Do we need to fold line breaks? - if leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - leading_blanks = false - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Copy the character. - s = read(parser, s) - - end_mark = parser.mark - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Is it the end? - if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { - break - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - - // Check for tab characters that abuse indentation. - if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found a tab character that violates indentation") - return false - } - - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check indentation level. - if parser.flow_level == 0 && parser.mark.column < indent { - break - } - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_PLAIN_SCALAR_STYLE, - } - - // Note that we change the 'simple_key_allowed' flag. - if leading_blanks { - parser.simple_key_allowed = true - } - return true -} diff --git a/vendor/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go deleted file mode 100644 index 4c45e660..00000000 --- a/vendor/gopkg.in/yaml.v2/sorter.go +++ /dev/null @@ -1,113 +0,0 @@ -package yaml - -import ( - "reflect" - "unicode" -) - -type keyList []reflect.Value - -func (l keyList) Len() int { return len(l) } -func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l keyList) Less(i, j int) bool { - a := l[i] - b := l[j] - ak := a.Kind() - bk := b.Kind() - for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { - a = a.Elem() - ak = a.Kind() - } - for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { - b = b.Elem() - bk = b.Kind() - } - af, aok := keyFloat(a) - bf, bok := keyFloat(b) - if aok && bok { - if af != bf { - return af < bf - } - if ak != bk { - return ak < bk - } - return numLess(a, b) - } - if ak != reflect.String || bk != reflect.String { - return ak < bk - } - ar, br := []rune(a.String()), []rune(b.String()) - for i := 0; i < len(ar) && i < len(br); i++ { - if ar[i] == br[i] { - continue - } - al := unicode.IsLetter(ar[i]) - bl := unicode.IsLetter(br[i]) - if al && bl { - return ar[i] < br[i] - } - if al || bl { - return bl - } - var ai, bi int - var an, bn int64 - if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { - if ar[j] != '0' { - an = 1 - bn = 1 - break - } - } - } - for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { - an = an*10 + int64(ar[ai]-'0') - } - for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { - bn = bn*10 + int64(br[bi]-'0') - } - if an != bn { - return an < bn - } - if ai != bi { - return ai < bi - } - return ar[i] < br[i] - } - return len(ar) < len(br) -} - -// keyFloat returns a float value for v if it is a number/bool -// and whether it is a number/bool or not. -func keyFloat(v reflect.Value) (f float64, ok bool) { - switch v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return float64(v.Int()), true - case reflect.Float32, reflect.Float64: - return v.Float(), true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return float64(v.Uint()), true - case reflect.Bool: - if v.Bool() { - return 1, true - } - return 0, true - } - return 0, false -} - -// numLess returns whether a < b. -// a and b must necessarily have the same kind. -func numLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return a.Int() < b.Int() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Bool: - return !a.Bool() && b.Bool() - } - panic("not a number") -} diff --git a/vendor/gopkg.in/yaml.v2/writerc.go b/vendor/gopkg.in/yaml.v2/writerc.go deleted file mode 100644 index a2dde608..00000000 --- a/vendor/gopkg.in/yaml.v2/writerc.go +++ /dev/null @@ -1,26 +0,0 @@ -package yaml - -// Set the writer error and return false. -func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_WRITER_ERROR - emitter.problem = problem - return false -} - -// Flush the output buffer. -func yaml_emitter_flush(emitter *yaml_emitter_t) bool { - if emitter.write_handler == nil { - panic("write handler not set") - } - - // Check if the buffer is empty. - if emitter.buffer_pos == 0 { - return true - } - - if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - return true -} diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go deleted file mode 100644 index 30813884..00000000 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ /dev/null @@ -1,478 +0,0 @@ -// Package yaml implements YAML support for the Go language. -// -// Source code and other details for the project are available at GitHub: -// -// https://github.com/go-yaml/yaml -// -package yaml - -import ( - "errors" - "fmt" - "io" - "reflect" - "strings" - "sync" -) - -// MapSlice encodes and decodes as a YAML map. -// The order of keys is preserved when encoding and decoding. -type MapSlice []MapItem - -// MapItem is an item in a MapSlice. -type MapItem struct { - Key, Value interface{} -} - -// The Unmarshaler interface may be implemented by types to customize their -// behavior when being unmarshaled from a YAML document. The UnmarshalYAML -// method receives a function that may be called to unmarshal the original -// YAML value into a field or variable. It is safe to call the unmarshal -// function parameter more than once if necessary. -type Unmarshaler interface { - UnmarshalYAML(unmarshal func(interface{}) error) error -} - -// The Marshaler interface may be implemented by types to customize their -// behavior when being marshaled into a YAML document. The returned value -// is marshaled in place of the original value implementing Marshaler. -// -// If an error is returned by MarshalYAML, the marshaling procedure stops -// and returns with the provided error. -type Marshaler interface { - MarshalYAML() (interface{}, error) -} - -// Unmarshal decodes the first document found within the in byte slice -// and assigns decoded values into the out value. -// -// Maps and pointers (to a struct, string, int, etc) are accepted as out -// values. If an internal pointer within a struct is not initialized, -// the yaml package will initialize it if necessary for unmarshalling -// the provided data. The out parameter must not be nil. -// -// The type of the decoded values should be compatible with the respective -// values in out. If one or more values cannot be decoded due to a type -// mismatches, decoding continues partially until the end of the YAML -// content, and a *yaml.TypeError is returned with details for all -// missed values. -// -// Struct fields are only unmarshalled if they are exported (have an -// upper case first letter), and are unmarshalled using the field name -// lowercased as the default key. Custom keys may be defined via the -// "yaml" name in the field tag: the content preceding the first comma -// is used as the key, and the following comma-separated options are -// used to tweak the marshalling process (see Marshal). -// Conflicting names result in a runtime error. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) -// -// See the documentation of Marshal for the format of tags and a list of -// supported tag options. -// -func Unmarshal(in []byte, out interface{}) (err error) { - return unmarshal(in, out, false) -} - -// UnmarshalStrict is like Unmarshal except that any fields that are found -// in the data that do not have corresponding struct members, or mapping -// keys that are duplicates, will result in -// an error. -func UnmarshalStrict(in []byte, out interface{}) (err error) { - return unmarshal(in, out, true) -} - -// A Decoder reads and decodes YAML values from an input stream. -type Decoder struct { - strict bool - parser *parser -} - -// NewDecoder returns a new decoder that reads from r. -// -// The decoder introduces its own buffering and may read -// data from r beyond the YAML values requested. -func NewDecoder(r io.Reader) *Decoder { - return &Decoder{ - parser: newParserFromReader(r), - } -} - -// SetStrict sets whether strict decoding behaviour is enabled when -// decoding items in the data (see UnmarshalStrict). By default, decoding is not strict. -func (dec *Decoder) SetStrict(strict bool) { - dec.strict = strict -} - -// Decode reads the next YAML-encoded value from its input -// and stores it in the value pointed to by v. -// -// See the documentation for Unmarshal for details about the -// conversion of YAML into a Go value. -func (dec *Decoder) Decode(v interface{}) (err error) { - d := newDecoder(dec.strict) - defer handleErr(&err) - node := dec.parser.parse() - if node == nil { - return io.EOF - } - out := reflect.ValueOf(v) - if out.Kind() == reflect.Ptr && !out.IsNil() { - out = out.Elem() - } - d.unmarshal(node, out) - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -func unmarshal(in []byte, out interface{}, strict bool) (err error) { - defer handleErr(&err) - d := newDecoder(strict) - p := newParser(in) - defer p.destroy() - node := p.parse() - if node != nil { - v := reflect.ValueOf(out) - if v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - d.unmarshal(node, v) - } - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -// Marshal serializes the value provided into a YAML document. The structure -// of the generated document will reflect the structure of the value itself. -// Maps and pointers (to struct, string, int, etc) are accepted as the in value. -// -// Struct fields are only marshalled if they are exported (have an upper case -// first letter), and are marshalled using the field name lowercased as the -// default key. Custom keys may be defined via the "yaml" name in the field -// tag: the content preceding the first comma is used as the key, and the -// following comma-separated options are used to tweak the marshalling process. -// Conflicting names result in a runtime error. -// -// The field tag format accepted is: -// -// `(...) yaml:"[][,[,]]" (...)` -// -// The following flags are currently supported: -// -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. -// -// flow Marshal using a flow style (useful for structs, -// sequences and maps). -// -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. -// -// In addition, if the key is "-", the field is ignored. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// -func Marshal(in interface{}) (out []byte, err error) { - defer handleErr(&err) - e := newEncoder() - defer e.destroy() - e.marshalDoc("", reflect.ValueOf(in)) - e.finish() - out = e.out - return -} - -// An Encoder writes YAML values to an output stream. -type Encoder struct { - encoder *encoder -} - -// NewEncoder returns a new encoder that writes to w. -// The Encoder should be closed after use to flush all data -// to w. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ - encoder: newEncoderWithWriter(w), - } -} - -// Encode writes the YAML encoding of v to the stream. -// If multiple items are encoded to the stream, the -// second and subsequent document will be preceded -// with a "---" document separator, but the first will not. -// -// See the documentation for Marshal for details about the conversion of Go -// values to YAML. -func (e *Encoder) Encode(v interface{}) (err error) { - defer handleErr(&err) - e.encoder.marshalDoc("", reflect.ValueOf(v)) - return nil -} - -// Close closes the encoder by writing any remaining data. -// It does not write a stream terminating string "...". -func (e *Encoder) Close() (err error) { - defer handleErr(&err) - e.encoder.finish() - return nil -} - -func handleErr(err *error) { - if v := recover(); v != nil { - if e, ok := v.(yamlError); ok { - *err = e.err - } else { - panic(v) - } - } -} - -type yamlError struct { - err error -} - -func fail(err error) { - panic(yamlError{err}) -} - -func failf(format string, args ...interface{}) { - panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) -} - -// A TypeError is returned by Unmarshal when one or more fields in -// the YAML document cannot be properly decoded into the requested -// types. When this error is returned, the value is still -// unmarshaled partially. -type TypeError struct { - Errors []string -} - -func (e *TypeError) Error() string { - return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) -} - -// -------------------------------------------------------------------------- -// Maintain a mapping of keys to structure field indexes - -// The code in this section was copied from mgo/bson. - -// structInfo holds details for the serialization of fields of -// a given struct. -type structInfo struct { - FieldsMap map[string]fieldInfo - FieldsList []fieldInfo - - // InlineMap is the number of the field in the struct that - // contains an ,inline map, or -1 if there's none. - InlineMap int -} - -type fieldInfo struct { - Key string - Num int - OmitEmpty bool - Flow bool - // Id holds the unique field identifier, so we can cheaply - // check for field duplicates without maintaining an extra map. - Id int - - // Inline holds the field index if the field is part of an inlined struct. - Inline []int -} - -var structMap = make(map[reflect.Type]*structInfo) -var fieldMapMutex sync.RWMutex - -func getStructInfo(st reflect.Type) (*structInfo, error) { - fieldMapMutex.RLock() - sinfo, found := structMap[st] - fieldMapMutex.RUnlock() - if found { - return sinfo, nil - } - - n := st.NumField() - fieldsMap := make(map[string]fieldInfo) - fieldsList := make([]fieldInfo, 0, n) - inlineMap := -1 - for i := 0; i != n; i++ { - field := st.Field(i) - if field.PkgPath != "" && !field.Anonymous { - continue // Private field - } - - info := fieldInfo{Num: i} - - tag := field.Tag.Get("yaml") - if tag == "" && strings.Index(string(field.Tag), ":") < 0 { - tag = string(field.Tag) - } - if tag == "-" { - continue - } - - inline := false - fields := strings.Split(tag, ",") - if len(fields) > 1 { - for _, flag := range fields[1:] { - switch flag { - case "omitempty": - info.OmitEmpty = true - case "flow": - info.Flow = true - case "inline": - inline = true - default: - return nil, errors.New(fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)) - } - } - tag = fields[0] - } - - if inline { - switch field.Type.Kind() { - case reflect.Map: - if inlineMap >= 0 { - return nil, errors.New("Multiple ,inline maps in struct " + st.String()) - } - if field.Type.Key() != reflect.TypeOf("") { - return nil, errors.New("Option ,inline needs a map with string keys in struct " + st.String()) - } - inlineMap = info.Num - case reflect.Struct: - sinfo, err := getStructInfo(field.Type) - if err != nil { - return nil, err - } - for _, finfo := range sinfo.FieldsList { - if _, found := fieldsMap[finfo.Key]; found { - msg := "Duplicated key '" + finfo.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - if finfo.Inline == nil { - finfo.Inline = []int{i, finfo.Num} - } else { - finfo.Inline = append([]int{i}, finfo.Inline...) - } - finfo.Id = len(fieldsList) - fieldsMap[finfo.Key] = finfo - fieldsList = append(fieldsList, finfo) - } - default: - //return nil, errors.New("Option ,inline needs a struct value or map field") - return nil, errors.New("Option ,inline needs a struct value field") - } - continue - } - - if tag != "" { - info.Key = tag - } else { - info.Key = strings.ToLower(field.Name) - } - - if _, found = fieldsMap[info.Key]; found { - msg := "Duplicated key '" + info.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - - info.Id = len(fieldsList) - fieldsList = append(fieldsList, info) - fieldsMap[info.Key] = info - } - - sinfo = &structInfo{ - FieldsMap: fieldsMap, - FieldsList: fieldsList, - InlineMap: inlineMap, - } - - fieldMapMutex.Lock() - structMap[st] = sinfo - fieldMapMutex.Unlock() - return sinfo, nil -} - -// IsZeroer is used to check whether an object is zero to -// determine whether it should be omitted when marshaling -// with the omitempty flag. One notable implementation -// is time.Time. -type IsZeroer interface { - IsZero() bool -} - -func isZero(v reflect.Value) bool { - kind := v.Kind() - if z, ok := v.Interface().(IsZeroer); ok { - if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { - return true - } - return z.IsZero() - } - switch kind { - case reflect.String: - return len(v.String()) == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Slice: - return v.Len() == 0 - case reflect.Map: - return v.Len() == 0 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Struct: - vt := v.Type() - for i := v.NumField() - 1; i >= 0; i-- { - if vt.Field(i).PkgPath != "" { - continue // Private field - } - if !isZero(v.Field(i)) { - return false - } - } - return true - } - return false -} - -// FutureLineWrap globally disables line wrapping when encoding long strings. -// This is a temporary and thus deprecated method introduced to faciliate -// migration towards v3, which offers more control of line lengths on -// individual encodings, and has a default matching the behavior introduced -// by this function. -// -// The default formatting of v2 was erroneously changed in v2.3.0 and reverted -// in v2.4.0, at which point this function was introduced to help migration. -func FutureLineWrap() { - disableLineWrapping = true -} diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go deleted file mode 100644 index f6a9c8e3..00000000 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ /dev/null @@ -1,739 +0,0 @@ -package yaml - -import ( - "fmt" - "io" -) - -// The version directive data. -type yaml_version_directive_t struct { - major int8 // The major version number. - minor int8 // The minor version number. -} - -// The tag directive data. -type yaml_tag_directive_t struct { - handle []byte // The tag handle. - prefix []byte // The tag prefix. -} - -type yaml_encoding_t int - -// The stream encoding. -const ( - // Let the parser choose the encoding. - yaml_ANY_ENCODING yaml_encoding_t = iota - - yaml_UTF8_ENCODING // The default UTF-8 encoding. - yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. - yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. -) - -type yaml_break_t int - -// Line break types. -const ( - // Let the parser choose the break type. - yaml_ANY_BREAK yaml_break_t = iota - - yaml_CR_BREAK // Use CR for line breaks (Mac style). - yaml_LN_BREAK // Use LN for line breaks (Unix style). - yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). -) - -type yaml_error_type_t int - -// Many bad things could happen with the parser and emitter. -const ( - // No error is produced. - yaml_NO_ERROR yaml_error_type_t = iota - - yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. - yaml_READER_ERROR // Cannot read or decode the input stream. - yaml_SCANNER_ERROR // Cannot scan the input stream. - yaml_PARSER_ERROR // Cannot parse the input stream. - yaml_COMPOSER_ERROR // Cannot compose a YAML document. - yaml_WRITER_ERROR // Cannot write to the output stream. - yaml_EMITTER_ERROR // Cannot emit a YAML stream. -) - -// The pointer position. -type yaml_mark_t struct { - index int // The position index. - line int // The position line. - column int // The position column. -} - -// Node Styles - -type yaml_style_t int8 - -type yaml_scalar_style_t yaml_style_t - -// Scalar styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota - - yaml_PLAIN_SCALAR_STYLE // The plain scalar style. - yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. - yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. - yaml_LITERAL_SCALAR_STYLE // The literal scalar style. - yaml_FOLDED_SCALAR_STYLE // The folded scalar style. -) - -type yaml_sequence_style_t yaml_style_t - -// Sequence styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota - - yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. - yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. -) - -type yaml_mapping_style_t yaml_style_t - -// Mapping styles. -const ( - // Let the emitter choose the style. - yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota - - yaml_BLOCK_MAPPING_STYLE // The block mapping style. - yaml_FLOW_MAPPING_STYLE // The flow mapping style. -) - -// Tokens - -type yaml_token_type_t int - -// Token types. -const ( - // An empty token. - yaml_NO_TOKEN yaml_token_type_t = iota - - yaml_STREAM_START_TOKEN // A STREAM-START token. - yaml_STREAM_END_TOKEN // A STREAM-END token. - - yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. - yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. - yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. - yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. - - yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. - yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. - yaml_BLOCK_END_TOKEN // A BLOCK-END token. - - yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. - yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. - yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. - yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. - - yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. - yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. - yaml_KEY_TOKEN // A KEY token. - yaml_VALUE_TOKEN // A VALUE token. - - yaml_ALIAS_TOKEN // An ALIAS token. - yaml_ANCHOR_TOKEN // An ANCHOR token. - yaml_TAG_TOKEN // A TAG token. - yaml_SCALAR_TOKEN // A SCALAR token. -) - -func (tt yaml_token_type_t) String() string { - switch tt { - case yaml_NO_TOKEN: - return "yaml_NO_TOKEN" - case yaml_STREAM_START_TOKEN: - return "yaml_STREAM_START_TOKEN" - case yaml_STREAM_END_TOKEN: - return "yaml_STREAM_END_TOKEN" - case yaml_VERSION_DIRECTIVE_TOKEN: - return "yaml_VERSION_DIRECTIVE_TOKEN" - case yaml_TAG_DIRECTIVE_TOKEN: - return "yaml_TAG_DIRECTIVE_TOKEN" - case yaml_DOCUMENT_START_TOKEN: - return "yaml_DOCUMENT_START_TOKEN" - case yaml_DOCUMENT_END_TOKEN: - return "yaml_DOCUMENT_END_TOKEN" - case yaml_BLOCK_SEQUENCE_START_TOKEN: - return "yaml_BLOCK_SEQUENCE_START_TOKEN" - case yaml_BLOCK_MAPPING_START_TOKEN: - return "yaml_BLOCK_MAPPING_START_TOKEN" - case yaml_BLOCK_END_TOKEN: - return "yaml_BLOCK_END_TOKEN" - case yaml_FLOW_SEQUENCE_START_TOKEN: - return "yaml_FLOW_SEQUENCE_START_TOKEN" - case yaml_FLOW_SEQUENCE_END_TOKEN: - return "yaml_FLOW_SEQUENCE_END_TOKEN" - case yaml_FLOW_MAPPING_START_TOKEN: - return "yaml_FLOW_MAPPING_START_TOKEN" - case yaml_FLOW_MAPPING_END_TOKEN: - return "yaml_FLOW_MAPPING_END_TOKEN" - case yaml_BLOCK_ENTRY_TOKEN: - return "yaml_BLOCK_ENTRY_TOKEN" - case yaml_FLOW_ENTRY_TOKEN: - return "yaml_FLOW_ENTRY_TOKEN" - case yaml_KEY_TOKEN: - return "yaml_KEY_TOKEN" - case yaml_VALUE_TOKEN: - return "yaml_VALUE_TOKEN" - case yaml_ALIAS_TOKEN: - return "yaml_ALIAS_TOKEN" - case yaml_ANCHOR_TOKEN: - return "yaml_ANCHOR_TOKEN" - case yaml_TAG_TOKEN: - return "yaml_TAG_TOKEN" - case yaml_SCALAR_TOKEN: - return "yaml_SCALAR_TOKEN" - } - return "" -} - -// The token structure. -type yaml_token_t struct { - // The token type. - typ yaml_token_type_t - - // The start/end of the token. - start_mark, end_mark yaml_mark_t - - // The stream encoding (for yaml_STREAM_START_TOKEN). - encoding yaml_encoding_t - - // The alias/anchor/scalar value or tag/tag directive handle - // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). - value []byte - - // The tag suffix (for yaml_TAG_TOKEN). - suffix []byte - - // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). - prefix []byte - - // The scalar style (for yaml_SCALAR_TOKEN). - style yaml_scalar_style_t - - // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). - major, minor int8 -} - -// Events - -type yaml_event_type_t int8 - -// Event types. -const ( - // An empty event. - yaml_NO_EVENT yaml_event_type_t = iota - - yaml_STREAM_START_EVENT // A STREAM-START event. - yaml_STREAM_END_EVENT // A STREAM-END event. - yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. - yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. - yaml_ALIAS_EVENT // An ALIAS event. - yaml_SCALAR_EVENT // A SCALAR event. - yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. - yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. - yaml_MAPPING_START_EVENT // A MAPPING-START event. - yaml_MAPPING_END_EVENT // A MAPPING-END event. -) - -var eventStrings = []string{ - yaml_NO_EVENT: "none", - yaml_STREAM_START_EVENT: "stream start", - yaml_STREAM_END_EVENT: "stream end", - yaml_DOCUMENT_START_EVENT: "document start", - yaml_DOCUMENT_END_EVENT: "document end", - yaml_ALIAS_EVENT: "alias", - yaml_SCALAR_EVENT: "scalar", - yaml_SEQUENCE_START_EVENT: "sequence start", - yaml_SEQUENCE_END_EVENT: "sequence end", - yaml_MAPPING_START_EVENT: "mapping start", - yaml_MAPPING_END_EVENT: "mapping end", -} - -func (e yaml_event_type_t) String() string { - if e < 0 || int(e) >= len(eventStrings) { - return fmt.Sprintf("unknown event %d", e) - } - return eventStrings[e] -} - -// The event structure. -type yaml_event_t struct { - - // The event type. - typ yaml_event_type_t - - // The start and end of the event. - start_mark, end_mark yaml_mark_t - - // The document encoding (for yaml_STREAM_START_EVENT). - encoding yaml_encoding_t - - // The version directive (for yaml_DOCUMENT_START_EVENT). - version_directive *yaml_version_directive_t - - // The list of tag directives (for yaml_DOCUMENT_START_EVENT). - tag_directives []yaml_tag_directive_t - - // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). - anchor []byte - - // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - tag []byte - - // The scalar value (for yaml_SCALAR_EVENT). - value []byte - - // Is the document start/end indicator implicit, or the tag optional? - // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). - implicit bool - - // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). - quoted_implicit bool - - // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - style yaml_style_t -} - -func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } -func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } -func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } - -// Nodes - -const ( - yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. - yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. - yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. - yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. - yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. - yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. - - yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. - yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. - - // Not in original libyaml. - yaml_BINARY_TAG = "tag:yaml.org,2002:binary" - yaml_MERGE_TAG = "tag:yaml.org,2002:merge" - - yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. - yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. - yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. -) - -type yaml_node_type_t int - -// Node types. -const ( - // An empty node. - yaml_NO_NODE yaml_node_type_t = iota - - yaml_SCALAR_NODE // A scalar node. - yaml_SEQUENCE_NODE // A sequence node. - yaml_MAPPING_NODE // A mapping node. -) - -// An element of a sequence node. -type yaml_node_item_t int - -// An element of a mapping node. -type yaml_node_pair_t struct { - key int // The key of the element. - value int // The value of the element. -} - -// The node structure. -type yaml_node_t struct { - typ yaml_node_type_t // The node type. - tag []byte // The node tag. - - // The node data. - - // The scalar parameters (for yaml_SCALAR_NODE). - scalar struct { - value []byte // The scalar value. - length int // The length of the scalar value. - style yaml_scalar_style_t // The scalar style. - } - - // The sequence parameters (for YAML_SEQUENCE_NODE). - sequence struct { - items_data []yaml_node_item_t // The stack of sequence items. - style yaml_sequence_style_t // The sequence style. - } - - // The mapping parameters (for yaml_MAPPING_NODE). - mapping struct { - pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). - pairs_start *yaml_node_pair_t // The beginning of the stack. - pairs_end *yaml_node_pair_t // The end of the stack. - pairs_top *yaml_node_pair_t // The top of the stack. - style yaml_mapping_style_t // The mapping style. - } - - start_mark yaml_mark_t // The beginning of the node. - end_mark yaml_mark_t // The end of the node. - -} - -// The document structure. -type yaml_document_t struct { - - // The document nodes. - nodes []yaml_node_t - - // The version directive. - version_directive *yaml_version_directive_t - - // The list of tag directives. - tag_directives_data []yaml_tag_directive_t - tag_directives_start int // The beginning of the tag directives list. - tag_directives_end int // The end of the tag directives list. - - start_implicit int // Is the document start indicator implicit? - end_implicit int // Is the document end indicator implicit? - - // The start/end of the document. - start_mark, end_mark yaml_mark_t -} - -// The prototype of a read handler. -// -// The read handler is called when the parser needs to read more bytes from the -// source. The handler should write not more than size bytes to the buffer. -// The number of written bytes should be set to the size_read variable. -// -// [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). -// [out] buffer The buffer to write the data from the source. -// [in] size The size of the buffer. -// [out] size_read The actual number of bytes read from the source. -// -// On success, the handler should return 1. If the handler failed, -// the returned value should be 0. On EOF, the handler should set the -// size_read to 0 and return 1. -type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) - -// This structure holds information about a potential simple key. -type yaml_simple_key_t struct { - possible bool // Is a simple key possible? - required bool // Is a simple key required? - token_number int // The number of the token. - mark yaml_mark_t // The position mark. -} - -// The states of the parser. -type yaml_parser_state_t int - -const ( - yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota - - yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. - yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. - yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. - yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. - yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. - yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. - yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. - yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. - yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. - yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. - yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. - yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. - yaml_PARSE_END_STATE // Expect nothing. -) - -func (ps yaml_parser_state_t) String() string { - switch ps { - case yaml_PARSE_STREAM_START_STATE: - return "yaml_PARSE_STREAM_START_STATE" - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_START_STATE: - return "yaml_PARSE_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return "yaml_PARSE_DOCUMENT_CONTENT_STATE" - case yaml_PARSE_DOCUMENT_END_STATE: - return "yaml_PARSE_DOCUMENT_END_STATE" - case yaml_PARSE_BLOCK_NODE_STATE: - return "yaml_PARSE_BLOCK_NODE_STATE" - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" - case yaml_PARSE_FLOW_NODE_STATE: - return "yaml_PARSE_FLOW_NODE_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" - case yaml_PARSE_END_STATE: - return "yaml_PARSE_END_STATE" - } - return "" -} - -// This structure holds aliases data. -type yaml_alias_data_t struct { - anchor []byte // The anchor. - index int // The node id. - mark yaml_mark_t // The anchor mark. -} - -// The parser structure. -// -// All members are internal. Manage the structure using the -// yaml_parser_ family of functions. -type yaml_parser_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - - problem string // Error description. - - // The byte about which the problem occurred. - problem_offset int - problem_value int - problem_mark yaml_mark_t - - // The error context. - context string - context_mark yaml_mark_t - - // Reader stuff - - read_handler yaml_read_handler_t // Read handler. - - input_reader io.Reader // File input data. - input []byte // String input data. - input_pos int - - eof bool // EOF flag - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - unread int // The number of unread characters in the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The input encoding. - - offset int // The offset of the current position (in bytes). - mark yaml_mark_t // The mark of the current position. - - // Scanner stuff - - stream_start_produced bool // Have we started to scan the input stream? - stream_end_produced bool // Have we reached the end of the input stream? - - flow_level int // The number of unclosed '[' and '{' indicators. - - tokens []yaml_token_t // The tokens queue. - tokens_head int // The head of the tokens queue. - tokens_parsed int // The number of tokens fetched from the queue. - token_available bool // Does the tokens queue contain a token ready for dequeueing. - - indent int // The current indentation level. - indents []int // The indentation levels stack. - - simple_key_allowed bool // May a simple key occur at the current position? - simple_keys []yaml_simple_key_t // The stack of simple keys. - simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number - - // Parser stuff - - state yaml_parser_state_t // The current parser state. - states []yaml_parser_state_t // The parser states stack. - marks []yaml_mark_t // The stack of marks. - tag_directives []yaml_tag_directive_t // The list of TAG directives. - - // Dumper stuff - - aliases []yaml_alias_data_t // The alias data. - - document *yaml_document_t // The currently parsed document. -} - -// Emitter Definitions - -// The prototype of a write handler. -// -// The write handler is called when the emitter needs to flush the accumulated -// characters to the output. The handler should write @a size bytes of the -// @a buffer to the output. -// -// @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). -// @param[in] buffer The buffer with bytes to be written. -// @param[in] size The size of the buffer. -// -// @returns On success, the handler should return @c 1. If the handler failed, -// the returned value should be @c 0. -// -type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error - -type yaml_emitter_state_t int - -// The emitter states. -const ( - // Expect STREAM-START. - yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota - - yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. - yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. - yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. - yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. - yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. - yaml_EMIT_END_STATE // Expect nothing. -) - -// The emitter structure. -// -// All members are internal. Manage the structure using the @c yaml_emitter_ -// family of functions. -type yaml_emitter_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - problem string // Error description. - - // Writer stuff - - write_handler yaml_write_handler_t // Write handler. - - output_buffer *[]byte // String output data. - output_writer io.Writer // File output data. - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The stream encoding. - - // Emitter stuff - - canonical bool // If the output is in the canonical style? - best_indent int // The number of indentation spaces. - best_width int // The preferred width of the output lines. - unicode bool // Allow unescaped non-ASCII characters? - line_break yaml_break_t // The preferred line break. - - state yaml_emitter_state_t // The current emitter state. - states []yaml_emitter_state_t // The stack of states. - - events []yaml_event_t // The event queue. - events_head int // The head of the event queue. - - indents []int // The stack of indentation levels. - - tag_directives []yaml_tag_directive_t // The list of tag directives. - - indent int // The current indentation level. - - flow_level int // The current flow level. - - root_context bool // Is it the document root context? - sequence_context bool // Is it a sequence context? - mapping_context bool // Is it a mapping context? - simple_key_context bool // Is it a simple mapping key context? - - line int // The current line. - column int // The current column. - whitespace bool // If the last character was a whitespace? - indention bool // If the last character was an indentation character (' ', '-', '?', ':')? - open_ended bool // If an explicit document end is required? - - // Anchor analysis. - anchor_data struct { - anchor []byte // The anchor value. - alias bool // Is it an alias? - } - - // Tag analysis. - tag_data struct { - handle []byte // The tag handle. - suffix []byte // The tag suffix. - } - - // Scalar analysis. - scalar_data struct { - value []byte // The scalar value. - multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? - block_plain_allowed bool // Can the scalar be expressed in the block plain style? - single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? - block_allowed bool // Can the scalar be expressed in the literal or folded styles? - style yaml_scalar_style_t // The output style. - } - - // Dumper stuff - - opened bool // If the stream was already opened? - closed bool // If the stream was already closed? - - // The information associated with the document nodes. - anchors *struct { - references int // The number of references. - anchor int // The anchor id. - serialized bool // If the node has been emitted? - } - - last_anchor_id int // The last assigned anchor id. - - document *yaml_document_t // The currently emitted document. -} diff --git a/vendor/gopkg.in/yaml.v2/yamlprivateh.go b/vendor/gopkg.in/yaml.v2/yamlprivateh.go deleted file mode 100644 index 8110ce3c..00000000 --- a/vendor/gopkg.in/yaml.v2/yamlprivateh.go +++ /dev/null @@ -1,173 +0,0 @@ -package yaml - -const ( - // The size of the input raw buffer. - input_raw_buffer_size = 512 - - // The size of the input buffer. - // It should be possible to decode the whole raw buffer. - input_buffer_size = input_raw_buffer_size * 3 - - // The size of the output buffer. - output_buffer_size = 128 - - // The size of the output raw buffer. - // It should be possible to encode the whole output buffer. - output_raw_buffer_size = (output_buffer_size*2 + 2) - - // The size of other stacks and queues. - initial_stack_size = 16 - initial_queue_size = 16 - initial_string_size = 16 -) - -// Check if the character at the specified position is an alphabetical -// character, a digit, '_', or '-'. -func is_alpha(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' -} - -// Check if the character at the specified position is a digit. -func is_digit(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' -} - -// Get the value of a digit. -func as_digit(b []byte, i int) int { - return int(b[i]) - '0' -} - -// Check if the character at the specified position is a hex-digit. -func is_hex(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' -} - -// Get the value of a hex-digit. -func as_hex(b []byte, i int) int { - bi := b[i] - if bi >= 'A' && bi <= 'F' { - return int(bi) - 'A' + 10 - } - if bi >= 'a' && bi <= 'f' { - return int(bi) - 'a' + 10 - } - return int(bi) - '0' -} - -// Check if the character is ASCII. -func is_ascii(b []byte, i int) bool { - return b[i] <= 0x7F -} - -// Check if the character at the start of the buffer can be printed unescaped. -func is_printable(b []byte, i int) bool { - return ((b[i] == 0x0A) || // . == #x0A - (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E - (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF - (b[i] > 0xC2 && b[i] < 0xED) || - (b[i] == 0xED && b[i+1] < 0xA0) || - (b[i] == 0xEE) || - (b[i] == 0xEF && // #xE000 <= . <= #xFFFD - !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF - !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) -} - -// Check if the character at the specified position is NUL. -func is_z(b []byte, i int) bool { - return b[i] == 0x00 -} - -// Check if the beginning of the buffer is a BOM. -func is_bom(b []byte, i int) bool { - return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF -} - -// Check if the character at the specified position is space. -func is_space(b []byte, i int) bool { - return b[i] == ' ' -} - -// Check if the character at the specified position is tab. -func is_tab(b []byte, i int) bool { - return b[i] == '\t' -} - -// Check if the character at the specified position is blank (space or tab). -func is_blank(b []byte, i int) bool { - //return is_space(b, i) || is_tab(b, i) - return b[i] == ' ' || b[i] == '\t' -} - -// Check if the character at the specified position is a line break. -func is_break(b []byte, i int) bool { - return (b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) -} - -func is_crlf(b []byte, i int) bool { - return b[i] == '\r' && b[i+1] == '\n' -} - -// Check if the character is a line break or NUL. -func is_breakz(b []byte, i int) bool { - //return is_break(b, i) || is_z(b, i) - return ( // is_break: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - // is_z: - b[i] == 0) -} - -// Check if the character is a line break, space, or NUL. -func is_spacez(b []byte, i int) bool { - //return is_space(b, i) || is_breakz(b, i) - return ( // is_space: - b[i] == ' ' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Check if the character is a line break, space, tab, or NUL. -func is_blankz(b []byte, i int) bool { - //return is_blank(b, i) || is_breakz(b, i) - return ( // is_blank: - b[i] == ' ' || b[i] == '\t' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Determine the width of the character. -func width(b byte) int { - // Don't replace these by a switch without first - // confirming that it is being inlined. - if b&0x80 == 0x00 { - return 1 - } - if b&0xE0 == 0xC0 { - return 2 - } - if b&0xF0 == 0xE0 { - return 3 - } - if b&0xF8 == 0xF0 { - return 4 - } - return 0 - -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 89c8c009..c44fa183 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -5,13 +5,14 @@ filippo.io/edwards25519/field # github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792 ## explicit; go 1.13 github.com/ManyakRus/logrus -# github.com/andybalholm/brotli v1.0.6 -## explicit; go 1.12 +# github.com/andybalholm/brotli v1.1.0 +## explicit; go 1.13 github.com/andybalholm/brotli +github.com/andybalholm/brotli/matchfinder # github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 ## explicit; go 1.13 github.com/asaskevich/govalidator -# github.com/camunda/zeebe/clients/go/v8 v8.3.4 +# github.com/camunda/zeebe/clients/go/v8 v8.4.0 ## explicit; go 1.19 github.com/camunda/zeebe/clients/go/v8/internal/embedded github.com/camunda/zeebe/clients/go/v8/internal/utils @@ -43,7 +44,7 @@ github.com/emersion/go-imap/client github.com/emersion/go-imap/commands github.com/emersion/go-imap/responses github.com/emersion/go-imap/utf7 -# github.com/emersion/go-message v0.17.0 +# github.com/emersion/go-message v0.18.0 ## explicit; go 1.14 github.com/emersion/go-message github.com/emersion/go-message/mail @@ -70,13 +71,13 @@ github.com/go-ozzo/ozzo-validation/v4 github.com/go-ozzo/ozzo-validation/v4/is # github.com/go-test/deep v1.1.0 ## explicit; go 1.16 -# github.com/gofiber/fiber/v2 v2.51.0 +# github.com/gofiber/fiber/v2 v2.52.0 ## explicit; go 1.20 github.com/gofiber/fiber/v2 github.com/gofiber/fiber/v2/internal/schema github.com/gofiber/fiber/v2/log github.com/gofiber/fiber/v2/utils -# github.com/golang-module/carbon/v2 v2.3.0 +# github.com/golang-module/carbon/v2 v2.3.5 ## explicit; go 1.16 github.com/golang-module/carbon/v2 # github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 @@ -119,7 +120,7 @@ github.com/gotd/ige # github.com/gotd/neo v0.1.5 ## explicit; go 1.12 github.com/gotd/neo -# github.com/gotd/td v0.92.0 +# github.com/gotd/td v0.93.0 ## explicit; go 1.21 github.com/gotd/td/bin github.com/gotd/td/clock @@ -188,14 +189,14 @@ github.com/jackc/pgproto3/v2 # github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 ## explicit; go 1.14 github.com/jackc/pgservicefile -# github.com/jackc/pgtype v1.14.0 +# github.com/jackc/pgtype v1.14.1 ## explicit; go 1.13 github.com/jackc/pgtype # github.com/jackc/pgx/v4 v4.18.1 ## explicit; go 1.13 github.com/jackc/pgx/v4 github.com/jackc/pgx/v4/internal/sanitize -# github.com/jackc/pgx/v5 v5.5.1 +# github.com/jackc/pgx/v5 v5.5.2 ## explicit; go 1.19 github.com/jackc/pgx/v5 github.com/jackc/pgx/v5/internal/anynil @@ -311,19 +312,19 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.2 ## explicit; go 1.12 github.com/modern-go/reflect2 -# github.com/nats-io/nats.go v1.31.0 +# github.com/nats-io/nats.go v1.32.0 ## explicit; go 1.20 github.com/nats-io/nats.go github.com/nats-io/nats.go/encoders/builtin github.com/nats-io/nats.go/internal/parser github.com/nats-io/nats.go/util -# github.com/nats-io/nkeys v0.4.6 -## explicit; go 1.19 +# github.com/nats-io/nkeys v0.4.7 +## explicit; go 1.20 github.com/nats-io/nkeys # github.com/nats-io/nuid v1.0.1 ## explicit github.com/nats-io/nuid -# github.com/pierrec/lz4/v4 v4.1.19 +# github.com/pierrec/lz4/v4 v4.1.21 ## explicit; go 1.14 github.com/pierrec/lz4/v4 github.com/pierrec/lz4/v4/internal/lz4block @@ -339,7 +340,7 @@ github.com/rivo/uniseg # github.com/rs/xid v1.5.0 ## explicit; go 1.12 github.com/rs/xid -# github.com/sashabaranov/go-openai v1.17.9 +# github.com/sashabaranov/go-openai v1.17.11 ## explicit; go 1.18 github.com/sashabaranov/go-openai github.com/sashabaranov/go-openai/internal @@ -425,7 +426,7 @@ github.com/syndtr/goleveldb/leveldb/opt github.com/syndtr/goleveldb/leveldb/storage github.com/syndtr/goleveldb/leveldb/table github.com/syndtr/goleveldb/leveldb/util -# github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 +# github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 ## explicit github.com/toorop/go-dkim # github.com/valyala/bytebufferpool v1.0.0 @@ -459,7 +460,7 @@ gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange/data_packer gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange/sync_confirm gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange/sync_global gitlab.aescorp.ru/dsp_dev/claim/common/sync_exchange/sync_types -# gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.37 +# gitlab.aescorp.ru/dsp_dev/claim/sync_service v1.2.43 ## explicit; go 1.20 gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/calc_struct_version gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/constants @@ -498,7 +499,7 @@ go.mau.fi/libsignal/util/optional go.mau.fi/util/jsontime go.mau.fi/util/random go.mau.fi/util/retryafter -# go.mau.fi/whatsmeow v0.0.0-20231216213200-9d803dd92735 +# go.mau.fi/whatsmeow v0.0.0-20240113094857-194904c8793f ## explicit; go 1.20 go.mau.fi/whatsmeow go.mau.fi/whatsmeow/appstate @@ -543,7 +544,7 @@ go.uber.org/zap/internal/exit go.uber.org/zap/internal/pool go.uber.org/zap/internal/stacktrace go.uber.org/zap/zapcore -# golang.org/x/crypto v0.17.0 +# golang.org/x/crypto v0.18.0 ## explicit; go 1.18 golang.org/x/crypto/argon2 golang.org/x/crypto/blake2b @@ -559,10 +560,10 @@ golang.org/x/crypto/nacl/secretbox golang.org/x/crypto/pbkdf2 golang.org/x/crypto/salsa20/salsa golang.org/x/crypto/ssh/terminal -# golang.org/x/exp v0.0.0-20231226003508-02704c960a9b +# golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 ## explicit; go 1.20 golang.org/x/exp/maps -# golang.org/x/net v0.19.0 +# golang.org/x/net v0.20.0 ## explicit; go 1.18 golang.org/x/net/http/httpguts golang.org/x/net/http2 @@ -573,23 +574,23 @@ golang.org/x/net/internal/timeseries golang.org/x/net/proxy golang.org/x/net/publicsuffix golang.org/x/net/trace -# golang.org/x/oauth2 v0.15.0 +# golang.org/x/oauth2 v0.16.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/clientcredentials golang.org/x/oauth2/internal -# golang.org/x/sync v0.5.0 +# golang.org/x/sync v0.6.0 ## explicit; go 1.18 golang.org/x/sync/errgroup golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.15.0 +# golang.org/x/sys v0.16.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.15.0 +# golang.org/x/term v0.16.0 ## explicit; go 1.18 golang.org/x/term # golang.org/x/text v0.14.0 @@ -621,7 +622,7 @@ google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.60.1 @@ -714,9 +715,6 @@ google.golang.org/protobuf/types/known/timestamppb # gopkg.in/ini.v1 v1.67.0 ## explicit gopkg.in/ini.v1 -# gopkg.in/yaml.v2 v2.4.0 -## explicit; go 1.15 -gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3