From fd2ace0482997d6d80844f0758f16ba4a2fa675c Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 24 Jul 2024 14:00:07 +0200 Subject: [PATCH 1/2] Keep generated files in the repository. This reduces the OS dependencies to build a released version. --- .github/workflows/generated.yml | 48 + .github/workflows/govuln.yml | 5 - .github/workflows/licensecheck.yml | 2 +- .github/workflows/lint.yml | 5 - .github/workflows/tarball.yml | 8 - .github/workflows/test.yml | 4 - .gitignore | 2 - Makefile | 18 +- README.md | 5 +- api_async_easyjson.go | 376 ++ api_backend_easyjson.go | 3554 +++++++++++++++++++ api_grpc_easyjson.go | 85 + api_proxy_easyjson.go | 1761 ++++++++++ api_signaling_easyjson.go | 5250 ++++++++++++++++++++++++++++ docker/proxy/Dockerfile | 2 +- docker/server/Dockerfile | 2 +- grpc_backend.pb.go | 238 ++ grpc_backend_grpc.pb.go | 131 + grpc_internal.pb.go | 227 ++ grpc_internal_grpc.pb.go | 131 + grpc_mcu.pb.go | 267 ++ grpc_mcu_grpc.pb.go | 131 + grpc_sessions.pb.go | 673 ++++ grpc_sessions_grpc.pb.go | 278 ++ 24 files changed, 13165 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/generated.yml create mode 100644 api_async_easyjson.go create mode 100644 api_backend_easyjson.go create mode 100644 api_grpc_easyjson.go create mode 100644 api_proxy_easyjson.go create mode 100644 api_signaling_easyjson.go create mode 100644 grpc_backend.pb.go create mode 100644 grpc_backend_grpc.pb.go create mode 100644 grpc_internal.pb.go create mode 100644 grpc_internal_grpc.pb.go create mode 100644 grpc_mcu.pb.go create mode 100644 grpc_mcu_grpc.pb.go create mode 100644 grpc_sessions.pb.go create mode 100644 grpc_sessions_grpc.pb.go diff --git a/.github/workflows/generated.yml b/.github/workflows/generated.yml new file mode 100644 index 00000000..3b4ce89e --- /dev/null +++ b/.github/workflows/generated.yml @@ -0,0 +1,48 @@ +name: generated + +on: + push: + branches: [ master ] + paths: + - '.github/workflows/generated.yml' + - 'api*.go' + - '*_easyjson.go' + - '*.pb.go' + - '*.proto' + - 'go.*' + pull_request: + branches: [ master ] + paths: + - '.github/workflows/generated.yml' + - 'api*.go' + - '*_easyjson.go' + - '*.pb.go' + - '*.proto' + - 'go.*' + +permissions: + contents: read + +jobs: + check-generated: + name: check-generated + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "stable" + + - name: Install dependencies + run: | + sudo apt -y update && sudo apt -y install protobuf-compiler + + - name: Generate files + run: | + make common + + - name: Check generated files + run: | + git add *.go + git diff --cached --exit-code *.go diff --git a/.github/workflows/govuln.yml b/.github/workflows/govuln.yml index f0de08f0..e950ccfd 100644 --- a/.github/workflows/govuln.yml +++ b/.github/workflows/govuln.yml @@ -34,11 +34,6 @@ jobs: - run: date - - name: Install dependencies - run: | - sudo apt -y update && sudo apt -y install protobuf-compiler - make common - - name: Install and run govulncheck run: | set -euo pipefail diff --git a/.github/workflows/licensecheck.yml b/.github/workflows/licensecheck.yml index 6d8327e4..058c9642 100644 --- a/.github/workflows/licensecheck.yml +++ b/.github/workflows/licensecheck.yml @@ -39,7 +39,7 @@ jobs: - name: Check for missing licenses run: | - MISSING=$(echo "$CHECK_RESULT" | grep UNKNOWN || true) + MISSING=$(echo "$CHECK_RESULT" | grep -v "_easyjson.go" | grep UNKNOWN || true) if [ -n "$MISSING" ]; then \ echo "$MISSING"; \ exit 1; \ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 416cb29e..619a8a1f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,11 +30,6 @@ jobs: with: go-version: "1.21" - - name: Install dependencies - run: | - sudo apt -y update && sudo apt -y install protobuf-compiler - make common - - name: lint uses: golangci/golangci-lint-action@v6.0.1 with: diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 21fa40d1..4718ce3e 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -33,10 +33,6 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Install dependencies - run: | - sudo apt -y update && sudo apt -y install protobuf-compiler - - name: Create tarball run: | echo "Building with $(nproc) threads" @@ -61,10 +57,6 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Install dependencies - run: | - sudo apt -y update && sudo apt -y install protobuf-compiler - - name: Download tarball uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e84c60cb..c24004cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,10 +36,6 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Install dependencies - run: | - sudo apt -y update && sudo apt -y install protobuf-compiler - - name: Build applications run: | echo "Building with $(nproc) threads" diff --git a/.gitignore b/.gitignore index 9a623dc0..680cc060 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,7 @@ bin/ vendor/ -*_easyjson.go *.pem -*.pb.go *.prof *.socket *.tar.gz diff --git a/Makefile b/Makefile index 1b980e6d..17f3072b 100644 --- a/Makefile +++ b/Makefile @@ -95,20 +95,20 @@ get: fmt: hook | $(PROTO_GO_FILES) $(GOFMT) -s -w *.go client proxy server -vet: common +vet: $(GO) vet $(ALL_PACKAGES) -test: vet common +test: vet $(GO) test -timeout $(TIMEOUT) $(TESTARGS) $(ALL_PACKAGES) -cover: vet common +cover: vet rm -f cover.out && \ $(GO) test -timeout $(TIMEOUT) -coverprofile cover.out $(ALL_PACKAGES) && \ sed -i "/_easyjson/d" cover.out && \ sed -i "/\.pb\.go/d" cover.out && \ $(GO) tool cover -func=cover.out -coverhtml: vet common +coverhtml: vet rm -f cover.out && \ $(GO) test -timeout $(TIMEOUT) -coverprofile cover.out $(ALL_PACKAGES) && \ sed -i "/_easyjson/d" cover.out && \ @@ -134,23 +134,21 @@ common: $(EASYJSON_GO_FILES) $(PROTO_GO_FILES) $(BINDIR): mkdir -p "$(BINDIR)" -client: common $(BINDIR) +client: $(BINDIR) $(GO) build $(BUILDARGS) -ldflags '$(INTERNALLDFLAGS)' -o "$(BINDIR)/client" ./client/... -server: common $(BINDIR) +server: $(BINDIR) $(GO) build $(BUILDARGS) -ldflags '$(INTERNALLDFLAGS)' -o "$(BINDIR)/signaling" ./server/... -proxy: common $(BINDIR) +proxy: $(BINDIR) $(GO) build $(BUILDARGS) -ldflags '$(INTERNALLDFLAGS)' -o "$(BINDIR)/proxy" ./proxy/... clean: - rm -f $(EASYJSON_GO_FILES) rm -f easyjson-bootstrap*.go - rm -f $(PROTO_GO_FILES) build: server proxy -vendor: go.mod go.sum common +vendor: go.mod go.sum set -e ;\ rm -rf $(VENDORDIR) $(GO) mod vendor diff --git a/README.md b/README.md index e36cbded..1e14aaae 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,14 @@ The following tools are required for building the signaling server. - git - go >= 1.21 - make -- protobuf-compiler >= 3 Usually the last two versions of Go are supported. This follows the release policy of Go: https://go.dev/doc/devel/release#policy +These additional tools are required to generate code from `.proto` files. + +- protobuf-compiler >= 3 + All other dependencies are fetched automatically while building. $ make build diff --git a/api_async_easyjson.go b/api_async_easyjson.go new file mode 100644 index 00000000..1439e788 --- /dev/null +++ b/api_async_easyjson.go @@ -0,0 +1,376 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package signaling + +import ( + json "encoding/json" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling(in *jlexer.Lexer, out *SendOfferMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "messageid": + out.MessageId = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "data": + if in.IsNull() { + in.Skip() + out.Data = nil + } else { + if out.Data == nil { + out.Data = new(MessageClientMessageData) + } + (*out.Data).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling(out *jwriter.Writer, in SendOfferMessage) { + out.RawByte('{') + first := true + _ = first + if in.MessageId != "" { + const prefix string = ",\"messageid\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.MessageId)) + } + { + const prefix string = ",\"sessionid\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"data\":" + out.RawString(prefix) + if in.Data == nil { + out.RawString("null") + } else { + (*in.Data).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SendOfferMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SendOfferMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SendOfferMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SendOfferMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling(l, v) +} +func easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling1(in *jlexer.Lexer, out *AsyncRoomMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "clienttype": + out.ClientType = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling1(out *jwriter.Writer, in AsyncRoomMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.SessionId != "" { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + if in.ClientType != "" { + const prefix string = ",\"clienttype\":" + out.RawString(prefix) + out.String(string(in.ClientType)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AsyncRoomMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AsyncRoomMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AsyncRoomMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AsyncRoomMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling1(l, v) +} +func easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling2(in *jlexer.Lexer, out *AsyncMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "sendtime": + if data := in.Raw(); in.Ok() { + in.AddError((out.SendTime).UnmarshalJSON(data)) + } + case "type": + out.Type = string(in.String()) + case "message": + if in.IsNull() { + in.Skip() + out.Message = nil + } else { + if out.Message == nil { + out.Message = new(ServerMessage) + } + (*out.Message).UnmarshalEasyJSON(in) + } + case "room": + if in.IsNull() { + in.Skip() + out.Room = nil + } else { + if out.Room == nil { + out.Room = new(BackendServerRoomRequest) + } + (*out.Room).UnmarshalEasyJSON(in) + } + case "permissions": + if in.IsNull() { + in.Skip() + out.Permissions = nil + } else { + in.Delim('[') + if out.Permissions == nil { + if !in.IsDelim(']') { + out.Permissions = make([]Permission, 0, 4) + } else { + out.Permissions = []Permission{} + } + } else { + out.Permissions = (out.Permissions)[:0] + } + for !in.IsDelim(']') { + var v1 Permission + v1 = Permission(in.String()) + out.Permissions = append(out.Permissions, v1) + in.WantComma() + } + in.Delim(']') + } + case "asyncroom": + if in.IsNull() { + in.Skip() + out.AsyncRoom = nil + } else { + if out.AsyncRoom == nil { + out.AsyncRoom = new(AsyncRoomMessage) + } + (*out.AsyncRoom).UnmarshalEasyJSON(in) + } + case "sendoffer": + if in.IsNull() { + in.Skip() + out.SendOffer = nil + } else { + if out.SendOffer == nil { + out.SendOffer = new(SendOfferMessage) + } + (*out.SendOffer).UnmarshalEasyJSON(in) + } + case "id": + out.Id = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling2(out *jwriter.Writer, in AsyncMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"sendtime\":" + out.RawString(prefix[1:]) + out.Raw((in.SendTime).MarshalJSON()) + } + { + const prefix string = ",\"type\":" + out.RawString(prefix) + out.String(string(in.Type)) + } + if in.Message != nil { + const prefix string = ",\"message\":" + out.RawString(prefix) + (*in.Message).MarshalEasyJSON(out) + } + if in.Room != nil { + const prefix string = ",\"room\":" + out.RawString(prefix) + (*in.Room).MarshalEasyJSON(out) + } + if len(in.Permissions) != 0 { + const prefix string = ",\"permissions\":" + out.RawString(prefix) + { + out.RawByte('[') + for v2, v3 := range in.Permissions { + if v2 > 0 { + out.RawByte(',') + } + out.String(string(v3)) + } + out.RawByte(']') + } + } + if in.AsyncRoom != nil { + const prefix string = ",\"asyncroom\":" + out.RawString(prefix) + (*in.AsyncRoom).MarshalEasyJSON(out) + } + if in.SendOffer != nil { + const prefix string = ",\"sendoffer\":" + out.RawString(prefix) + (*in.SendOffer).MarshalEasyJSON(out) + } + { + const prefix string = ",\"id\":" + out.RawString(prefix) + out.String(string(in.Id)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AsyncMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AsyncMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson9289e183EncodeGithubComStrukturagNextcloudSpreedSignaling2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AsyncMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AsyncMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson9289e183DecodeGithubComStrukturagNextcloudSpreedSignaling2(l, v) +} diff --git a/api_backend_easyjson.go b/api_backend_easyjson.go new file mode 100644 index 00000000..95338f04 --- /dev/null +++ b/api_backend_easyjson.go @@ -0,0 +1,3554 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package signaling + +import ( + json "encoding/json" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" + time "time" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling(in *jlexer.Lexer, out *TurnCredentials) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "username": + out.Username = string(in.String()) + case "password": + out.Password = string(in.String()) + case "ttl": + out.TTL = int64(in.Int64()) + case "uris": + if in.IsNull() { + in.Skip() + out.URIs = nil + } else { + in.Delim('[') + if out.URIs == nil { + if !in.IsDelim(']') { + out.URIs = make([]string, 0, 4) + } else { + out.URIs = []string{} + } + } else { + out.URIs = (out.URIs)[:0] + } + for !in.IsDelim(']') { + var v1 string + v1 = string(in.String()) + out.URIs = append(out.URIs, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling(out *jwriter.Writer, in TurnCredentials) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"username\":" + out.RawString(prefix[1:]) + out.String(string(in.Username)) + } + { + const prefix string = ",\"password\":" + out.RawString(prefix) + out.String(string(in.Password)) + } + { + const prefix string = ",\"ttl\":" + out.RawString(prefix) + out.Int64(int64(in.TTL)) + } + { + const prefix string = ",\"uris\":" + out.RawString(prefix) + if in.URIs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.URIs { + if v2 > 0 { + out.RawByte(',') + } + out.String(string(v3)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v TurnCredentials) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v TurnCredentials) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *TurnCredentials) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *TurnCredentials) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling1(in *jlexer.Lexer, out *RoomSessionData) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userid": + out.UserId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling1(out *jwriter.Writer, in RoomSessionData) { + out.RawByte('{') + first := true + _ = first + if in.UserId != "" { + const prefix string = ",\"userid\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.UserId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomSessionData) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomSessionData) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomSessionData) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomSessionData) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling1(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling2(in *jlexer.Lexer, out *OcsResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "ocs": + if in.IsNull() { + in.Skip() + out.Ocs = nil + } else { + if out.Ocs == nil { + out.Ocs = new(OcsBody) + } + (*out.Ocs).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling2(out *jwriter.Writer, in OcsResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"ocs\":" + out.RawString(prefix[1:]) + if in.Ocs == nil { + out.RawString("null") + } else { + (*in.Ocs).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v OcsResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v OcsResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *OcsResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *OcsResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling2(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling3(in *jlexer.Lexer, out *OcsMeta) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "status": + out.Status = string(in.String()) + case "statuscode": + out.StatusCode = int(in.Int()) + case "message": + out.Message = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling3(out *jwriter.Writer, in OcsMeta) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"status\":" + out.RawString(prefix[1:]) + out.String(string(in.Status)) + } + { + const prefix string = ",\"statuscode\":" + out.RawString(prefix) + out.Int(int(in.StatusCode)) + } + { + const prefix string = ",\"message\":" + out.RawString(prefix) + out.String(string(in.Message)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v OcsMeta) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v OcsMeta) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *OcsMeta) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *OcsMeta) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling3(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling4(in *jlexer.Lexer, out *OcsBody) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "meta": + (out.Meta).UnmarshalEasyJSON(in) + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling4(out *jwriter.Writer, in OcsBody) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"meta\":" + out.RawString(prefix[1:]) + (in.Meta).MarshalEasyJSON(out) + } + { + const prefix string = ",\"data\":" + out.RawString(prefix) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v OcsBody) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v OcsBody) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *OcsBody) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *OcsBody) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling4(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling5(in *jlexer.Lexer, out *BackendServerRoomResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "dialout": + if in.IsNull() { + in.Skip() + out.Dialout = nil + } else { + if out.Dialout == nil { + out.Dialout = new(BackendRoomDialoutResponse) + } + (*out.Dialout).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling5(out *jwriter.Writer, in BackendServerRoomResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Dialout != nil { + const prefix string = ",\"dialout\":" + out.RawString(prefix) + (*in.Dialout).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendServerRoomResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendServerRoomResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendServerRoomResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendServerRoomResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling5(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling6(in *jlexer.Lexer, out *BackendServerRoomRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "invite": + if in.IsNull() { + in.Skip() + out.Invite = nil + } else { + if out.Invite == nil { + out.Invite = new(BackendRoomInviteRequest) + } + (*out.Invite).UnmarshalEasyJSON(in) + } + case "disinvite": + if in.IsNull() { + in.Skip() + out.Disinvite = nil + } else { + if out.Disinvite == nil { + out.Disinvite = new(BackendRoomDisinviteRequest) + } + (*out.Disinvite).UnmarshalEasyJSON(in) + } + case "update": + if in.IsNull() { + in.Skip() + out.Update = nil + } else { + if out.Update == nil { + out.Update = new(BackendRoomUpdateRequest) + } + (*out.Update).UnmarshalEasyJSON(in) + } + case "delete": + if in.IsNull() { + in.Skip() + out.Delete = nil + } else { + if out.Delete == nil { + out.Delete = new(BackendRoomDeleteRequest) + } + (*out.Delete).UnmarshalEasyJSON(in) + } + case "incall": + if in.IsNull() { + in.Skip() + out.InCall = nil + } else { + if out.InCall == nil { + out.InCall = new(BackendRoomInCallRequest) + } + (*out.InCall).UnmarshalEasyJSON(in) + } + case "participants": + if in.IsNull() { + in.Skip() + out.Participants = nil + } else { + if out.Participants == nil { + out.Participants = new(BackendRoomParticipantsRequest) + } + (*out.Participants).UnmarshalEasyJSON(in) + } + case "message": + if in.IsNull() { + in.Skip() + out.Message = nil + } else { + if out.Message == nil { + out.Message = new(BackendRoomMessageRequest) + } + (*out.Message).UnmarshalEasyJSON(in) + } + case "switchto": + if in.IsNull() { + in.Skip() + out.SwitchTo = nil + } else { + if out.SwitchTo == nil { + out.SwitchTo = new(BackendRoomSwitchToMessageRequest) + } + (*out.SwitchTo).UnmarshalEasyJSON(in) + } + case "dialout": + if in.IsNull() { + in.Skip() + out.Dialout = nil + } else { + if out.Dialout == nil { + out.Dialout = new(BackendRoomDialoutRequest) + } + (*out.Dialout).UnmarshalEasyJSON(in) + } + case "transient": + if in.IsNull() { + in.Skip() + out.Transient = nil + } else { + if out.Transient == nil { + out.Transient = new(BackendRoomTransientRequest) + } + (*out.Transient).UnmarshalEasyJSON(in) + } + case "received": + out.ReceivedTime = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling6(out *jwriter.Writer, in BackendServerRoomRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Invite != nil { + const prefix string = ",\"invite\":" + out.RawString(prefix) + (*in.Invite).MarshalEasyJSON(out) + } + if in.Disinvite != nil { + const prefix string = ",\"disinvite\":" + out.RawString(prefix) + (*in.Disinvite).MarshalEasyJSON(out) + } + if in.Update != nil { + const prefix string = ",\"update\":" + out.RawString(prefix) + (*in.Update).MarshalEasyJSON(out) + } + if in.Delete != nil { + const prefix string = ",\"delete\":" + out.RawString(prefix) + (*in.Delete).MarshalEasyJSON(out) + } + if in.InCall != nil { + const prefix string = ",\"incall\":" + out.RawString(prefix) + (*in.InCall).MarshalEasyJSON(out) + } + if in.Participants != nil { + const prefix string = ",\"participants\":" + out.RawString(prefix) + (*in.Participants).MarshalEasyJSON(out) + } + if in.Message != nil { + const prefix string = ",\"message\":" + out.RawString(prefix) + (*in.Message).MarshalEasyJSON(out) + } + if in.SwitchTo != nil { + const prefix string = ",\"switchto\":" + out.RawString(prefix) + (*in.SwitchTo).MarshalEasyJSON(out) + } + if in.Dialout != nil { + const prefix string = ",\"dialout\":" + out.RawString(prefix) + (*in.Dialout).MarshalEasyJSON(out) + } + if in.Transient != nil { + const prefix string = ",\"transient\":" + out.RawString(prefix) + (*in.Transient).MarshalEasyJSON(out) + } + if in.ReceivedTime != 0 { + const prefix string = ",\"received\":" + out.RawString(prefix) + out.Int64(int64(in.ReceivedTime)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendServerRoomRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendServerRoomRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendServerRoomRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendServerRoomRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling6(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling7(in *jlexer.Lexer, out *BackendRoomUpdateRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userids": + if in.IsNull() { + in.Skip() + out.UserIds = nil + } else { + in.Delim('[') + if out.UserIds == nil { + if !in.IsDelim(']') { + out.UserIds = make([]string, 0, 4) + } else { + out.UserIds = []string{} + } + } else { + out.UserIds = (out.UserIds)[:0] + } + for !in.IsDelim(']') { + var v4 string + v4 = string(in.String()) + out.UserIds = append(out.UserIds, v4) + in.WantComma() + } + in.Delim(']') + } + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling7(out *jwriter.Writer, in BackendRoomUpdateRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.UserIds) != 0 { + const prefix string = ",\"userids\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v5, v6 := range in.UserIds { + if v5 > 0 { + out.RawByte(',') + } + out.String(string(v6)) + } + out.RawByte(']') + } + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.Properties).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomUpdateRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomUpdateRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomUpdateRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomUpdateRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling7(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling8(in *jlexer.Lexer, out *BackendRoomTransientRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "action": + out.Action = TransientAction(in.String()) + case "key": + out.Key = string(in.String()) + case "value": + if m, ok := out.Value.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := out.Value.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + out.Value = in.Interface() + } + case "ttl": + out.TTL = time.Duration(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling8(out *jwriter.Writer, in BackendRoomTransientRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"action\":" + out.RawString(prefix[1:]) + out.String(string(in.Action)) + } + { + const prefix string = ",\"key\":" + out.RawString(prefix) + out.String(string(in.Key)) + } + if in.Value != nil { + const prefix string = ",\"value\":" + out.RawString(prefix) + if m, ok := in.Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := in.Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(in.Value)) + } + } + if in.TTL != 0 { + const prefix string = ",\"ttl\":" + out.RawString(prefix) + out.Int64(int64(in.TTL)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomTransientRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomTransientRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomTransientRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomTransientRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling8(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling9(in *jlexer.Lexer, out *BackendRoomSwitchToMessageRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "sessions": + if data := in.Raw(); in.Ok() { + in.AddError((out.Sessions).UnmarshalJSON(data)) + } + case "sessionslist": + if in.IsNull() { + in.Skip() + out.SessionsList = nil + } else { + in.Delim('[') + if out.SessionsList == nil { + if !in.IsDelim(']') { + out.SessionsList = make(BackendRoomSwitchToSessionsList, 0, 4) + } else { + out.SessionsList = BackendRoomSwitchToSessionsList{} + } + } else { + out.SessionsList = (out.SessionsList)[:0] + } + for !in.IsDelim(']') { + var v7 string + v7 = string(in.String()) + out.SessionsList = append(out.SessionsList, v7) + in.WantComma() + } + in.Delim(']') + } + case "sessionsmap": + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + out.SessionsMap = make(BackendRoomSwitchToSessionsMap) + } else { + out.SessionsMap = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v8 json.RawMessage + if data := in.Raw(); in.Ok() { + in.AddError((v8).UnmarshalJSON(data)) + } + (out.SessionsMap)[key] = v8 + in.WantComma() + } + in.Delim('}') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling9(out *jwriter.Writer, in BackendRoomSwitchToMessageRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + if len(in.Sessions) != 0 { + const prefix string = ",\"sessions\":" + out.RawString(prefix) + out.Raw((in.Sessions).MarshalJSON()) + } + if len(in.SessionsList) != 0 { + const prefix string = ",\"sessionslist\":" + out.RawString(prefix) + { + out.RawByte('[') + for v9, v10 := range in.SessionsList { + if v9 > 0 { + out.RawByte(',') + } + out.String(string(v10)) + } + out.RawByte(']') + } + } + if len(in.SessionsMap) != 0 { + const prefix string = ",\"sessionsmap\":" + out.RawString(prefix) + { + out.RawByte('{') + v11First := true + for v11Name, v11Value := range in.SessionsMap { + if v11First { + v11First = false + } else { + out.RawByte(',') + } + out.String(string(v11Name)) + out.RawByte(':') + out.Raw((v11Value).MarshalJSON()) + } + out.RawByte('}') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomSwitchToMessageRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomSwitchToMessageRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomSwitchToMessageRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomSwitchToMessageRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling9(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling10(in *jlexer.Lexer, out *BackendRoomParticipantsRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "changed": + if in.IsNull() { + in.Skip() + out.Changed = nil + } else { + in.Delim('[') + if out.Changed == nil { + if !in.IsDelim(']') { + out.Changed = make([]map[string]interface{}, 0, 8) + } else { + out.Changed = []map[string]interface{}{} + } + } else { + out.Changed = (out.Changed)[:0] + } + for !in.IsDelim(']') { + var v12 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v12 = make(map[string]interface{}) + } else { + v12 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v13 interface{} + if m, ok := v13.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v13.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v13 = in.Interface() + } + (v12)[key] = v13 + in.WantComma() + } + in.Delim('}') + } + out.Changed = append(out.Changed, v12) + in.WantComma() + } + in.Delim(']') + } + case "users": + if in.IsNull() { + in.Skip() + out.Users = nil + } else { + in.Delim('[') + if out.Users == nil { + if !in.IsDelim(']') { + out.Users = make([]map[string]interface{}, 0, 8) + } else { + out.Users = []map[string]interface{}{} + } + } else { + out.Users = (out.Users)[:0] + } + for !in.IsDelim(']') { + var v14 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v14 = make(map[string]interface{}) + } else { + v14 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v15 interface{} + if m, ok := v15.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v15.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v15 = in.Interface() + } + (v14)[key] = v15 + in.WantComma() + } + in.Delim('}') + } + out.Users = append(out.Users, v14) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling10(out *jwriter.Writer, in BackendRoomParticipantsRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.Changed) != 0 { + const prefix string = ",\"changed\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v16, v17 := range in.Changed { + if v16 > 0 { + out.RawByte(',') + } + if v17 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v18First := true + for v18Name, v18Value := range v17 { + if v18First { + v18First = false + } else { + out.RawByte(',') + } + out.String(string(v18Name)) + out.RawByte(':') + if m, ok := v18Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v18Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v18Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + if len(in.Users) != 0 { + const prefix string = ",\"users\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v19, v20 := range in.Users { + if v19 > 0 { + out.RawByte(',') + } + if v20 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v21First := true + for v21Name, v21Value := range v20 { + if v21First { + v21First = false + } else { + out.RawByte(',') + } + out.String(string(v21Name)) + out.RawByte(':') + if m, ok := v21Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v21Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v21Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomParticipantsRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomParticipantsRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomParticipantsRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomParticipantsRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling10(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling11(in *jlexer.Lexer, out *BackendRoomMessageRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling11(out *jwriter.Writer, in BackendRoomMessageRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.Data) != 0 { + const prefix string = ",\"data\":" + first = false + out.RawString(prefix[1:]) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomMessageRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomMessageRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomMessageRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomMessageRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling11(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling12(in *jlexer.Lexer, out *BackendRoomInviteRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userids": + if in.IsNull() { + in.Skip() + out.UserIds = nil + } else { + in.Delim('[') + if out.UserIds == nil { + if !in.IsDelim(']') { + out.UserIds = make([]string, 0, 4) + } else { + out.UserIds = []string{} + } + } else { + out.UserIds = (out.UserIds)[:0] + } + for !in.IsDelim(']') { + var v22 string + v22 = string(in.String()) + out.UserIds = append(out.UserIds, v22) + in.WantComma() + } + in.Delim(']') + } + case "alluserids": + if in.IsNull() { + in.Skip() + out.AllUserIds = nil + } else { + in.Delim('[') + if out.AllUserIds == nil { + if !in.IsDelim(']') { + out.AllUserIds = make([]string, 0, 4) + } else { + out.AllUserIds = []string{} + } + } else { + out.AllUserIds = (out.AllUserIds)[:0] + } + for !in.IsDelim(']') { + var v23 string + v23 = string(in.String()) + out.AllUserIds = append(out.AllUserIds, v23) + in.WantComma() + } + in.Delim(']') + } + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling12(out *jwriter.Writer, in BackendRoomInviteRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.UserIds) != 0 { + const prefix string = ",\"userids\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v24, v25 := range in.UserIds { + if v24 > 0 { + out.RawByte(',') + } + out.String(string(v25)) + } + out.RawByte(']') + } + } + if len(in.AllUserIds) != 0 { + const prefix string = ",\"alluserids\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v26, v27 := range in.AllUserIds { + if v26 > 0 { + out.RawByte(',') + } + out.String(string(v27)) + } + out.RawByte(']') + } + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.Properties).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomInviteRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomInviteRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomInviteRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomInviteRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling12(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling13(in *jlexer.Lexer, out *BackendRoomInCallRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "incall": + if data := in.Raw(); in.Ok() { + in.AddError((out.InCall).UnmarshalJSON(data)) + } + case "all": + out.All = bool(in.Bool()) + case "changed": + if in.IsNull() { + in.Skip() + out.Changed = nil + } else { + in.Delim('[') + if out.Changed == nil { + if !in.IsDelim(']') { + out.Changed = make([]map[string]interface{}, 0, 8) + } else { + out.Changed = []map[string]interface{}{} + } + } else { + out.Changed = (out.Changed)[:0] + } + for !in.IsDelim(']') { + var v28 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v28 = make(map[string]interface{}) + } else { + v28 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v29 interface{} + if m, ok := v29.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v29.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v29 = in.Interface() + } + (v28)[key] = v29 + in.WantComma() + } + in.Delim('}') + } + out.Changed = append(out.Changed, v28) + in.WantComma() + } + in.Delim(']') + } + case "users": + if in.IsNull() { + in.Skip() + out.Users = nil + } else { + in.Delim('[') + if out.Users == nil { + if !in.IsDelim(']') { + out.Users = make([]map[string]interface{}, 0, 8) + } else { + out.Users = []map[string]interface{}{} + } + } else { + out.Users = (out.Users)[:0] + } + for !in.IsDelim(']') { + var v30 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v30 = make(map[string]interface{}) + } else { + v30 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v31 interface{} + if m, ok := v31.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v31.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v31 = in.Interface() + } + (v30)[key] = v31 + in.WantComma() + } + in.Delim('}') + } + out.Users = append(out.Users, v30) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling13(out *jwriter.Writer, in BackendRoomInCallRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.InCall) != 0 { + const prefix string = ",\"incall\":" + first = false + out.RawString(prefix[1:]) + out.Raw((in.InCall).MarshalJSON()) + } + if in.All { + const prefix string = ",\"all\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Bool(bool(in.All)) + } + if len(in.Changed) != 0 { + const prefix string = ",\"changed\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v32, v33 := range in.Changed { + if v32 > 0 { + out.RawByte(',') + } + if v33 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v34First := true + for v34Name, v34Value := range v33 { + if v34First { + v34First = false + } else { + out.RawByte(',') + } + out.String(string(v34Name)) + out.RawByte(':') + if m, ok := v34Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v34Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v34Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + if len(in.Users) != 0 { + const prefix string = ",\"users\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v35, v36 := range in.Users { + if v35 > 0 { + out.RawByte(',') + } + if v36 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v37First := true + for v37Name, v37Value := range v36 { + if v37First { + v37First = false + } else { + out.RawByte(',') + } + out.String(string(v37Name)) + out.RawByte(':') + if m, ok := v37Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v37Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v37Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomInCallRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomInCallRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomInCallRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomInCallRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling13(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling14(in *jlexer.Lexer, out *BackendRoomDisinviteRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userids": + if in.IsNull() { + in.Skip() + out.UserIds = nil + } else { + in.Delim('[') + if out.UserIds == nil { + if !in.IsDelim(']') { + out.UserIds = make([]string, 0, 4) + } else { + out.UserIds = []string{} + } + } else { + out.UserIds = (out.UserIds)[:0] + } + for !in.IsDelim(']') { + var v38 string + v38 = string(in.String()) + out.UserIds = append(out.UserIds, v38) + in.WantComma() + } + in.Delim(']') + } + case "sessionids": + if in.IsNull() { + in.Skip() + out.SessionIds = nil + } else { + in.Delim('[') + if out.SessionIds == nil { + if !in.IsDelim(']') { + out.SessionIds = make([]string, 0, 4) + } else { + out.SessionIds = []string{} + } + } else { + out.SessionIds = (out.SessionIds)[:0] + } + for !in.IsDelim(']') { + var v39 string + v39 = string(in.String()) + out.SessionIds = append(out.SessionIds, v39) + in.WantComma() + } + in.Delim(']') + } + case "alluserids": + if in.IsNull() { + in.Skip() + out.AllUserIds = nil + } else { + in.Delim('[') + if out.AllUserIds == nil { + if !in.IsDelim(']') { + out.AllUserIds = make([]string, 0, 4) + } else { + out.AllUserIds = []string{} + } + } else { + out.AllUserIds = (out.AllUserIds)[:0] + } + for !in.IsDelim(']') { + var v40 string + v40 = string(in.String()) + out.AllUserIds = append(out.AllUserIds, v40) + in.WantComma() + } + in.Delim(']') + } + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling14(out *jwriter.Writer, in BackendRoomDisinviteRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.UserIds) != 0 { + const prefix string = ",\"userids\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v41, v42 := range in.UserIds { + if v41 > 0 { + out.RawByte(',') + } + out.String(string(v42)) + } + out.RawByte(']') + } + } + if len(in.SessionIds) != 0 { + const prefix string = ",\"sessionids\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v43, v44 := range in.SessionIds { + if v43 > 0 { + out.RawByte(',') + } + out.String(string(v44)) + } + out.RawByte(']') + } + } + if len(in.AllUserIds) != 0 { + const prefix string = ",\"alluserids\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v45, v46 := range in.AllUserIds { + if v45 > 0 { + out.RawByte(',') + } + out.String(string(v46)) + } + out.RawByte(']') + } + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.Properties).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomDisinviteRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomDisinviteRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomDisinviteRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomDisinviteRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling14(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling15(in *jlexer.Lexer, out *BackendRoomDialoutResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "callid": + out.CallId = string(in.String()) + case "error": + if in.IsNull() { + in.Skip() + out.Error = nil + } else { + if out.Error == nil { + out.Error = new(Error) + } + (*out.Error).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling15(out *jwriter.Writer, in BackendRoomDialoutResponse) { + out.RawByte('{') + first := true + _ = first + if in.CallId != "" { + const prefix string = ",\"callid\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.CallId)) + } + if in.Error != nil { + const prefix string = ",\"error\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + (*in.Error).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomDialoutResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomDialoutResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomDialoutResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomDialoutResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling15(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling16(in *jlexer.Lexer, out *BackendRoomDialoutRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "number": + out.Number = string(in.String()) + case "options": + if data := in.Raw(); in.Ok() { + in.AddError((out.Options).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling16(out *jwriter.Writer, in BackendRoomDialoutRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"number\":" + out.RawString(prefix[1:]) + out.String(string(in.Number)) + } + if len(in.Options) != 0 { + const prefix string = ",\"options\":" + out.RawString(prefix) + out.Raw((in.Options).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomDialoutRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomDialoutRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomDialoutRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomDialoutRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling16(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling17(in *jlexer.Lexer, out *BackendRoomDialoutError) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "code": + out.Code = string(in.String()) + case "message": + out.Message = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling17(out *jwriter.Writer, in BackendRoomDialoutError) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"code\":" + out.RawString(prefix[1:]) + out.String(string(in.Code)) + } + if in.Message != "" { + const prefix string = ",\"message\":" + out.RawString(prefix) + out.String(string(in.Message)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomDialoutError) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomDialoutError) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomDialoutError) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomDialoutError) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling17(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling18(in *jlexer.Lexer, out *BackendRoomDeleteRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userids": + if in.IsNull() { + in.Skip() + out.UserIds = nil + } else { + in.Delim('[') + if out.UserIds == nil { + if !in.IsDelim(']') { + out.UserIds = make([]string, 0, 4) + } else { + out.UserIds = []string{} + } + } else { + out.UserIds = (out.UserIds)[:0] + } + for !in.IsDelim(']') { + var v47 string + v47 = string(in.String()) + out.UserIds = append(out.UserIds, v47) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling18(out *jwriter.Writer, in BackendRoomDeleteRequest) { + out.RawByte('{') + first := true + _ = first + if len(in.UserIds) != 0 { + const prefix string = ",\"userids\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v48, v49 := range in.UserIds { + if v48 > 0 { + out.RawByte(',') + } + out.String(string(v49)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendRoomDeleteRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendRoomDeleteRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendRoomDeleteRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendRoomDeleteRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling18(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling19(in *jlexer.Lexer, out *BackendPingEntry) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userid": + out.UserId = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling19(out *jwriter.Writer, in BackendPingEntry) { + out.RawByte('{') + first := true + _ = first + if in.UserId != "" { + const prefix string = ",\"userid\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.UserId)) + } + { + const prefix string = ",\"sessionid\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.SessionId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendPingEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendPingEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendPingEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendPingEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling19(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling20(in *jlexer.Lexer, out *BackendInformationEtcd) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.Url = string(in.String()) + case "secret": + out.Secret = string(in.String()) + case "maxstreambitrate": + out.MaxStreamBitrate = int(in.Int()) + case "maxscreenbitrate": + out.MaxScreenBitrate = int(in.Int()) + case "sessionlimit": + out.SessionLimit = uint64(in.Uint64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling20(out *jwriter.Writer, in BackendInformationEtcd) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"url\":" + out.RawString(prefix[1:]) + out.String(string(in.Url)) + } + { + const prefix string = ",\"secret\":" + out.RawString(prefix) + out.String(string(in.Secret)) + } + if in.MaxStreamBitrate != 0 { + const prefix string = ",\"maxstreambitrate\":" + out.RawString(prefix) + out.Int(int(in.MaxStreamBitrate)) + } + if in.MaxScreenBitrate != 0 { + const prefix string = ",\"maxscreenbitrate\":" + out.RawString(prefix) + out.Int(int(in.MaxScreenBitrate)) + } + if in.SessionLimit != 0 { + const prefix string = ",\"sessionlimit\":" + out.RawString(prefix) + out.Uint64(uint64(in.SessionLimit)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendInformationEtcd) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendInformationEtcd) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendInformationEtcd) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendInformationEtcd) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling20(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling21(in *jlexer.Lexer, out *BackendClientSessionResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling21(out *jwriter.Writer, in BackendClientSessionResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientSessionResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientSessionResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientSessionResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientSessionResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling21(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling22(in *jlexer.Lexer, out *BackendClientSessionRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + case "action": + out.Action = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "userid": + out.UserId = string(in.String()) + case "user": + if data := in.Raw(); in.Ok() { + in.AddError((out.User).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling22(out *jwriter.Writer, in BackendClientSessionRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + { + const prefix string = ",\"action\":" + out.RawString(prefix) + out.String(string(in.Action)) + } + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + if in.UserId != "" { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + if len(in.User) != 0 { + const prefix string = ",\"user\":" + out.RawString(prefix) + out.Raw((in.User).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientSessionRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientSessionRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientSessionRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientSessionRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling22(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling23(in *jlexer.Lexer, out *BackendClientRoomResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + case "session": + if data := in.Raw(); in.Ok() { + in.AddError((out.Session).UnmarshalJSON(data)) + } + case "permissions": + if in.IsNull() { + in.Skip() + out.Permissions = nil + } else { + if out.Permissions == nil { + out.Permissions = new([]Permission) + } + if in.IsNull() { + in.Skip() + *out.Permissions = nil + } else { + in.Delim('[') + if *out.Permissions == nil { + if !in.IsDelim(']') { + *out.Permissions = make([]Permission, 0, 4) + } else { + *out.Permissions = []Permission{} + } + } else { + *out.Permissions = (*out.Permissions)[:0] + } + for !in.IsDelim(']') { + var v50 Permission + v50 = Permission(in.String()) + *out.Permissions = append(*out.Permissions, v50) + in.WantComma() + } + in.Delim(']') + } + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling23(out *jwriter.Writer, in BackendClientRoomResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + { + const prefix string = ",\"properties\":" + out.RawString(prefix) + out.Raw((in.Properties).MarshalJSON()) + } + if len(in.Session) != 0 { + const prefix string = ",\"session\":" + out.RawString(prefix) + out.Raw((in.Session).MarshalJSON()) + } + if in.Permissions != nil { + const prefix string = ",\"permissions\":" + out.RawString(prefix) + if *in.Permissions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v51, v52 := range *in.Permissions { + if v51 > 0 { + out.RawByte(',') + } + out.String(string(v52)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientRoomResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling23(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientRoomResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling23(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientRoomResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling23(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientRoomResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling23(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling24(in *jlexer.Lexer, out *BackendClientRoomRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + case "action": + out.Action = string(in.String()) + case "userid": + out.UserId = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "actorid": + out.ActorId = string(in.String()) + case "actortype": + out.ActorType = string(in.String()) + case "incall": + out.InCall = int(in.Int()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling24(out *jwriter.Writer, in BackendClientRoomRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + if in.Action != "" { + const prefix string = ",\"action\":" + out.RawString(prefix) + out.String(string(in.Action)) + } + { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + if in.ActorId != "" { + const prefix string = ",\"actorid\":" + out.RawString(prefix) + out.String(string(in.ActorId)) + } + if in.ActorType != "" { + const prefix string = ",\"actortype\":" + out.RawString(prefix) + out.String(string(in.ActorType)) + } + if in.InCall != 0 { + const prefix string = ",\"incall\":" + out.RawString(prefix) + out.Int(int(in.InCall)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientRoomRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling24(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientRoomRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling24(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientRoomRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling24(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientRoomRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling24(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling25(in *jlexer.Lexer, out *BackendClientRingResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling25(out *jwriter.Writer, in BackendClientRingResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientRingResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling25(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientRingResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling25(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientRingResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling25(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientRingResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling25(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling26(in *jlexer.Lexer, out *BackendClientResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "error": + if in.IsNull() { + in.Skip() + out.Error = nil + } else { + if out.Error == nil { + out.Error = new(Error) + } + (*out.Error).UnmarshalEasyJSON(in) + } + case "auth": + if in.IsNull() { + in.Skip() + out.Auth = nil + } else { + if out.Auth == nil { + out.Auth = new(BackendClientAuthResponse) + } + (*out.Auth).UnmarshalEasyJSON(in) + } + case "room": + if in.IsNull() { + in.Skip() + out.Room = nil + } else { + if out.Room == nil { + out.Room = new(BackendClientRoomResponse) + } + (*out.Room).UnmarshalEasyJSON(in) + } + case "ping": + if in.IsNull() { + in.Skip() + out.Ping = nil + } else { + if out.Ping == nil { + out.Ping = new(BackendClientRingResponse) + } + (*out.Ping).UnmarshalEasyJSON(in) + } + case "session": + if in.IsNull() { + in.Skip() + out.Session = nil + } else { + if out.Session == nil { + out.Session = new(BackendClientSessionResponse) + } + (*out.Session).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling26(out *jwriter.Writer, in BackendClientResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Error != nil { + const prefix string = ",\"error\":" + out.RawString(prefix) + (*in.Error).MarshalEasyJSON(out) + } + if in.Auth != nil { + const prefix string = ",\"auth\":" + out.RawString(prefix) + (*in.Auth).MarshalEasyJSON(out) + } + if in.Room != nil { + const prefix string = ",\"room\":" + out.RawString(prefix) + (*in.Room).MarshalEasyJSON(out) + } + if in.Ping != nil { + const prefix string = ",\"ping\":" + out.RawString(prefix) + (*in.Ping).MarshalEasyJSON(out) + } + if in.Session != nil { + const prefix string = ",\"session\":" + out.RawString(prefix) + (*in.Session).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling26(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling26(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling26(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling26(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling27(in *jlexer.Lexer, out *BackendClientRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "auth": + if in.IsNull() { + in.Skip() + out.Auth = nil + } else { + if out.Auth == nil { + out.Auth = new(BackendClientAuthRequest) + } + (*out.Auth).UnmarshalEasyJSON(in) + } + case "room": + if in.IsNull() { + in.Skip() + out.Room = nil + } else { + if out.Room == nil { + out.Room = new(BackendClientRoomRequest) + } + (*out.Room).UnmarshalEasyJSON(in) + } + case "ping": + if in.IsNull() { + in.Skip() + out.Ping = nil + } else { + if out.Ping == nil { + out.Ping = new(BackendClientPingRequest) + } + (*out.Ping).UnmarshalEasyJSON(in) + } + case "session": + if in.IsNull() { + in.Skip() + out.Session = nil + } else { + if out.Session == nil { + out.Session = new(BackendClientSessionRequest) + } + (*out.Session).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling27(out *jwriter.Writer, in BackendClientRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Auth != nil { + const prefix string = ",\"auth\":" + out.RawString(prefix) + (*in.Auth).MarshalEasyJSON(out) + } + if in.Room != nil { + const prefix string = ",\"room\":" + out.RawString(prefix) + (*in.Room).MarshalEasyJSON(out) + } + if in.Ping != nil { + const prefix string = ",\"ping\":" + out.RawString(prefix) + (*in.Ping).MarshalEasyJSON(out) + } + if in.Session != nil { + const prefix string = ",\"session\":" + out.RawString(prefix) + (*in.Session).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling27(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling28(in *jlexer.Lexer, out *BackendClientPingRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + case "entries": + if in.IsNull() { + in.Skip() + out.Entries = nil + } else { + in.Delim('[') + if out.Entries == nil { + if !in.IsDelim(']') { + out.Entries = make([]BackendPingEntry, 0, 2) + } else { + out.Entries = []BackendPingEntry{} + } + } else { + out.Entries = (out.Entries)[:0] + } + for !in.IsDelim(']') { + var v53 BackendPingEntry + (v53).UnmarshalEasyJSON(in) + out.Entries = append(out.Entries, v53) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling28(out *jwriter.Writer, in BackendClientPingRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + { + const prefix string = ",\"entries\":" + out.RawString(prefix) + if in.Entries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v54, v55 := range in.Entries { + if v54 > 0 { + out.RawByte(',') + } + (v55).MarshalEasyJSON(out) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientPingRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling28(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientPingRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling28(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientPingRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling28(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientPingRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling28(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling29(in *jlexer.Lexer, out *BackendClientAuthResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "userid": + out.UserId = string(in.String()) + case "user": + if data := in.Raw(); in.Ok() { + in.AddError((out.User).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling29(out *jwriter.Writer, in BackendClientAuthResponse) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + { + const prefix string = ",\"user\":" + out.RawString(prefix) + out.Raw((in.User).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientAuthResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling29(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientAuthResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling29(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientAuthResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling29(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientAuthResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling29(l, v) +} +func easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling30(in *jlexer.Lexer, out *BackendClientAuthRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "params": + if data := in.Raw(); in.Ok() { + in.AddError((out.Params).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling30(out *jwriter.Writer, in BackendClientAuthRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"params\":" + out.RawString(prefix) + out.Raw((in.Params).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BackendClientAuthRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling30(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BackendClientAuthRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson4354c623EncodeGithubComStrukturagNextcloudSpreedSignaling30(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BackendClientAuthRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling30(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BackendClientAuthRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson4354c623DecodeGithubComStrukturagNextcloudSpreedSignaling30(l, v) +} diff --git a/api_grpc_easyjson.go b/api_grpc_easyjson.go new file mode 100644 index 00000000..d1678a40 --- /dev/null +++ b/api_grpc_easyjson.go @@ -0,0 +1,85 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package signaling + +import ( + json "encoding/json" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjson5dc3c167DecodeGithubComStrukturagNextcloudSpreedSignaling(in *jlexer.Lexer, out *GrpcTargetInformationEtcd) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "address": + out.Address = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson5dc3c167EncodeGithubComStrukturagNextcloudSpreedSignaling(out *jwriter.Writer, in GrpcTargetInformationEtcd) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"address\":" + out.RawString(prefix[1:]) + out.String(string(in.Address)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GrpcTargetInformationEtcd) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson5dc3c167EncodeGithubComStrukturagNextcloudSpreedSignaling(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GrpcTargetInformationEtcd) MarshalEasyJSON(w *jwriter.Writer) { + easyjson5dc3c167EncodeGithubComStrukturagNextcloudSpreedSignaling(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GrpcTargetInformationEtcd) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson5dc3c167DecodeGithubComStrukturagNextcloudSpreedSignaling(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GrpcTargetInformationEtcd) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson5dc3c167DecodeGithubComStrukturagNextcloudSpreedSignaling(l, v) +} diff --git a/api_proxy_easyjson.go b/api_proxy_easyjson.go new file mode 100644 index 00000000..e8c9468f --- /dev/null +++ b/api_proxy_easyjson.go @@ -0,0 +1,1761 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package signaling + +import ( + json "encoding/json" + _v4 "github.com/golang-jwt/jwt/v4" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling(in *jlexer.Lexer, out *TokenClaims) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "iss": + out.Issuer = string(in.String()) + case "sub": + out.Subject = string(in.String()) + case "aud": + if data := in.Raw(); in.Ok() { + in.AddError((out.Audience).UnmarshalJSON(data)) + } + case "exp": + if in.IsNull() { + in.Skip() + out.ExpiresAt = nil + } else { + if out.ExpiresAt == nil { + out.ExpiresAt = new(_v4.NumericDate) + } + if data := in.Raw(); in.Ok() { + in.AddError((*out.ExpiresAt).UnmarshalJSON(data)) + } + } + case "nbf": + if in.IsNull() { + in.Skip() + out.NotBefore = nil + } else { + if out.NotBefore == nil { + out.NotBefore = new(_v4.NumericDate) + } + if data := in.Raw(); in.Ok() { + in.AddError((*out.NotBefore).UnmarshalJSON(data)) + } + } + case "iat": + if in.IsNull() { + in.Skip() + out.IssuedAt = nil + } else { + if out.IssuedAt == nil { + out.IssuedAt = new(_v4.NumericDate) + } + if data := in.Raw(); in.Ok() { + in.AddError((*out.IssuedAt).UnmarshalJSON(data)) + } + } + case "jti": + out.ID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling(out *jwriter.Writer, in TokenClaims) { + out.RawByte('{') + first := true + _ = first + if in.Issuer != "" { + const prefix string = ",\"iss\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Issuer)) + } + if in.Subject != "" { + const prefix string = ",\"sub\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Subject)) + } + if len(in.Audience) != 0 { + const prefix string = ",\"aud\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.Audience).MarshalJSON()) + } + if in.ExpiresAt != nil { + const prefix string = ",\"exp\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((*in.ExpiresAt).MarshalJSON()) + } + if in.NotBefore != nil { + const prefix string = ",\"nbf\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((*in.NotBefore).MarshalJSON()) + } + if in.IssuedAt != nil { + const prefix string = ",\"iat\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((*in.IssuedAt).MarshalJSON()) + } + if in.ID != "" { + const prefix string = ",\"jti\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.ID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v TokenClaims) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v TokenClaims) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *TokenClaims) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *TokenClaims) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling1(in *jlexer.Lexer, out *ProxyServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.Id = string(in.String()) + case "type": + out.Type = string(in.String()) + case "error": + if in.IsNull() { + in.Skip() + out.Error = nil + } else { + if out.Error == nil { + out.Error = new(Error) + } + (*out.Error).UnmarshalEasyJSON(in) + } + case "hello": + if in.IsNull() { + in.Skip() + out.Hello = nil + } else { + if out.Hello == nil { + out.Hello = new(HelloProxyServerMessage) + } + (*out.Hello).UnmarshalEasyJSON(in) + } + case "bye": + if in.IsNull() { + in.Skip() + out.Bye = nil + } else { + if out.Bye == nil { + out.Bye = new(ByeProxyServerMessage) + } + (*out.Bye).UnmarshalEasyJSON(in) + } + case "command": + if in.IsNull() { + in.Skip() + out.Command = nil + } else { + if out.Command == nil { + out.Command = new(CommandProxyServerMessage) + } + (*out.Command).UnmarshalEasyJSON(in) + } + case "payload": + if in.IsNull() { + in.Skip() + out.Payload = nil + } else { + if out.Payload == nil { + out.Payload = new(PayloadProxyServerMessage) + } + (*out.Payload).UnmarshalEasyJSON(in) + } + case "event": + if in.IsNull() { + in.Skip() + out.Event = nil + } else { + if out.Event == nil { + out.Event = new(EventProxyServerMessage) + } + (*out.Event).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling1(out *jwriter.Writer, in ProxyServerMessage) { + out.RawByte('{') + first := true + _ = first + if in.Id != "" { + const prefix string = ",\"id\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Id)) + } + { + const prefix string = ",\"type\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Type)) + } + if in.Error != nil { + const prefix string = ",\"error\":" + out.RawString(prefix) + (*in.Error).MarshalEasyJSON(out) + } + if in.Hello != nil { + const prefix string = ",\"hello\":" + out.RawString(prefix) + (*in.Hello).MarshalEasyJSON(out) + } + if in.Bye != nil { + const prefix string = ",\"bye\":" + out.RawString(prefix) + (*in.Bye).MarshalEasyJSON(out) + } + if in.Command != nil { + const prefix string = ",\"command\":" + out.RawString(prefix) + (*in.Command).MarshalEasyJSON(out) + } + if in.Payload != nil { + const prefix string = ",\"payload\":" + out.RawString(prefix) + (*in.Payload).MarshalEasyJSON(out) + } + if in.Event != nil { + const prefix string = ",\"event\":" + out.RawString(prefix) + (*in.Event).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ProxyServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ProxyServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling1(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling2(in *jlexer.Lexer, out *ProxyInformationEtcd) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "address": + out.Address = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling2(out *jwriter.Writer, in ProxyInformationEtcd) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"address\":" + out.RawString(prefix[1:]) + out.String(string(in.Address)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ProxyInformationEtcd) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ProxyInformationEtcd) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ProxyInformationEtcd) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ProxyInformationEtcd) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling2(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling3(in *jlexer.Lexer, out *ProxyClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.Id = string(in.String()) + case "type": + out.Type = string(in.String()) + case "hello": + if in.IsNull() { + in.Skip() + out.Hello = nil + } else { + if out.Hello == nil { + out.Hello = new(HelloProxyClientMessage) + } + (*out.Hello).UnmarshalEasyJSON(in) + } + case "bye": + if in.IsNull() { + in.Skip() + out.Bye = nil + } else { + if out.Bye == nil { + out.Bye = new(ByeProxyClientMessage) + } + (*out.Bye).UnmarshalEasyJSON(in) + } + case "command": + if in.IsNull() { + in.Skip() + out.Command = nil + } else { + if out.Command == nil { + out.Command = new(CommandProxyClientMessage) + } + (*out.Command).UnmarshalEasyJSON(in) + } + case "payload": + if in.IsNull() { + in.Skip() + out.Payload = nil + } else { + if out.Payload == nil { + out.Payload = new(PayloadProxyClientMessage) + } + (*out.Payload).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling3(out *jwriter.Writer, in ProxyClientMessage) { + out.RawByte('{') + first := true + _ = first + if in.Id != "" { + const prefix string = ",\"id\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Id)) + } + { + const prefix string = ",\"type\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Type)) + } + if in.Hello != nil { + const prefix string = ",\"hello\":" + out.RawString(prefix) + (*in.Hello).MarshalEasyJSON(out) + } + if in.Bye != nil { + const prefix string = ",\"bye\":" + out.RawString(prefix) + (*in.Bye).MarshalEasyJSON(out) + } + if in.Command != nil { + const prefix string = ",\"command\":" + out.RawString(prefix) + (*in.Command).MarshalEasyJSON(out) + } + if in.Payload != nil { + const prefix string = ",\"payload\":" + out.RawString(prefix) + (*in.Payload).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ProxyClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ProxyClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling3(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling4(in *jlexer.Lexer, out *PayloadProxyServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "clientId": + out.ClientId = string(in.String()) + case "payload": + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + out.Payload = make(map[string]interface{}) + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v1 interface{} + if m, ok := v1.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v1.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v1 = in.Interface() + } + (out.Payload)[key] = v1 + in.WantComma() + } + in.Delim('}') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling4(out *jwriter.Writer, in PayloadProxyServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + { + const prefix string = ",\"clientId\":" + out.RawString(prefix) + out.String(string(in.ClientId)) + } + { + const prefix string = ",\"payload\":" + out.RawString(prefix) + if in.Payload == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v2First := true + for v2Name, v2Value := range in.Payload { + if v2First { + v2First = false + } else { + out.RawByte(',') + } + out.String(string(v2Name)) + out.RawByte(':') + if m, ok := v2Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v2Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v2Value)) + } + } + out.RawByte('}') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PayloadProxyServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PayloadProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PayloadProxyServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PayloadProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling4(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling5(in *jlexer.Lexer, out *PayloadProxyClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "clientId": + out.ClientId = string(in.String()) + case "sid": + out.Sid = string(in.String()) + case "payload": + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + out.Payload = make(map[string]interface{}) + } else { + out.Payload = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v3 interface{} + if m, ok := v3.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v3.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v3 = in.Interface() + } + (out.Payload)[key] = v3 + in.WantComma() + } + in.Delim('}') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling5(out *jwriter.Writer, in PayloadProxyClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + { + const prefix string = ",\"clientId\":" + out.RawString(prefix) + out.String(string(in.ClientId)) + } + if in.Sid != "" { + const prefix string = ",\"sid\":" + out.RawString(prefix) + out.String(string(in.Sid)) + } + if len(in.Payload) != 0 { + const prefix string = ",\"payload\":" + out.RawString(prefix) + { + out.RawByte('{') + v4First := true + for v4Name, v4Value := range in.Payload { + if v4First { + v4First = false + } else { + out.RawByte(',') + } + out.String(string(v4Name)) + out.RawByte(':') + if m, ok := v4Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v4Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v4Value)) + } + } + out.RawByte('}') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PayloadProxyClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PayloadProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PayloadProxyClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PayloadProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling5(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling6(in *jlexer.Lexer, out *HelloProxyServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "server": + if in.IsNull() { + in.Skip() + out.Server = nil + } else { + if out.Server == nil { + out.Server = new(WelcomeServerMessage) + } + (*out.Server).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling6(out *jwriter.Writer, in HelloProxyServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + if in.Server != nil { + const prefix string = ",\"server\":" + out.RawString(prefix) + (*in.Server).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloProxyServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloProxyServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling6(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling7(in *jlexer.Lexer, out *HelloProxyClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "resumeid": + out.ResumeId = string(in.String()) + case "features": + if in.IsNull() { + in.Skip() + out.Features = nil + } else { + in.Delim('[') + if out.Features == nil { + if !in.IsDelim(']') { + out.Features = make([]string, 0, 4) + } else { + out.Features = []string{} + } + } else { + out.Features = (out.Features)[:0] + } + for !in.IsDelim(']') { + var v5 string + v5 = string(in.String()) + out.Features = append(out.Features, v5) + in.WantComma() + } + in.Delim(']') + } + case "token": + out.Token = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling7(out *jwriter.Writer, in HelloProxyClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"resumeid\":" + out.RawString(prefix) + out.String(string(in.ResumeId)) + } + if len(in.Features) != 0 { + const prefix string = ",\"features\":" + out.RawString(prefix) + { + out.RawByte('[') + for v6, v7 := range in.Features { + if v6 > 0 { + out.RawByte(',') + } + out.String(string(v7)) + } + out.RawByte(']') + } + } + { + const prefix string = ",\"token\":" + out.RawString(prefix) + out.String(string(in.Token)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloProxyClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloProxyClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling7(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling8(in *jlexer.Lexer, out *EventProxyServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "clientId": + out.ClientId = string(in.String()) + case "load": + out.Load = int64(in.Int64()) + case "sid": + out.Sid = string(in.String()) + case "bandwidth": + if in.IsNull() { + in.Skip() + out.Bandwidth = nil + } else { + if out.Bandwidth == nil { + out.Bandwidth = new(EventProxyServerBandwidth) + } + (*out.Bandwidth).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling8(out *jwriter.Writer, in EventProxyServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.ClientId != "" { + const prefix string = ",\"clientId\":" + out.RawString(prefix) + out.String(string(in.ClientId)) + } + if in.Load != 0 { + const prefix string = ",\"load\":" + out.RawString(prefix) + out.Int64(int64(in.Load)) + } + if in.Sid != "" { + const prefix string = ",\"sid\":" + out.RawString(prefix) + out.String(string(in.Sid)) + } + if in.Bandwidth != nil { + const prefix string = ",\"bandwidth\":" + out.RawString(prefix) + (*in.Bandwidth).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventProxyServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventProxyServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling8(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling9(in *jlexer.Lexer, out *EventProxyServerBandwidth) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "incoming": + if in.IsNull() { + in.Skip() + out.Incoming = nil + } else { + if out.Incoming == nil { + out.Incoming = new(float64) + } + *out.Incoming = float64(in.Float64()) + } + case "outgoing": + if in.IsNull() { + in.Skip() + out.Outgoing = nil + } else { + if out.Outgoing == nil { + out.Outgoing = new(float64) + } + *out.Outgoing = float64(in.Float64()) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling9(out *jwriter.Writer, in EventProxyServerBandwidth) { + out.RawByte('{') + first := true + _ = first + if in.Incoming != nil { + const prefix string = ",\"incoming\":" + first = false + out.RawString(prefix[1:]) + out.Float64(float64(*in.Incoming)) + } + if in.Outgoing != nil { + const prefix string = ",\"outgoing\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Float64(float64(*in.Outgoing)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventProxyServerBandwidth) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventProxyServerBandwidth) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventProxyServerBandwidth) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventProxyServerBandwidth) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling9(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling10(in *jlexer.Lexer, out *CommandProxyServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.Id = string(in.String()) + case "sid": + out.Sid = string(in.String()) + case "bitrate": + out.Bitrate = int(in.Int()) + case "streams": + if in.IsNull() { + in.Skip() + out.Streams = nil + } else { + in.Delim('[') + if out.Streams == nil { + if !in.IsDelim(']') { + out.Streams = make([]PublisherStream, 0, 0) + } else { + out.Streams = []PublisherStream{} + } + } else { + out.Streams = (out.Streams)[:0] + } + for !in.IsDelim(']') { + var v8 PublisherStream + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling11(in, &v8) + out.Streams = append(out.Streams, v8) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling10(out *jwriter.Writer, in CommandProxyServerMessage) { + out.RawByte('{') + first := true + _ = first + if in.Id != "" { + const prefix string = ",\"id\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Id)) + } + if in.Sid != "" { + const prefix string = ",\"sid\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Sid)) + } + if in.Bitrate != 0 { + const prefix string = ",\"bitrate\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Int(int(in.Bitrate)) + } + if len(in.Streams) != 0 { + const prefix string = ",\"streams\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v9, v10 := range in.Streams { + if v9 > 0 { + out.RawByte(',') + } + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling11(out, v10) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CommandProxyServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CommandProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CommandProxyServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CommandProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling10(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling11(in *jlexer.Lexer, out *PublisherStream) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "mid": + out.Mid = string(in.String()) + case "mindex": + out.Mindex = int(in.Int()) + case "type": + out.Type = string(in.String()) + case "description": + out.Description = string(in.String()) + case "disabled": + out.Disabled = bool(in.Bool()) + case "codec": + out.Codec = string(in.String()) + case "stereo": + out.Stereo = bool(in.Bool()) + case "fec": + out.Fec = bool(in.Bool()) + case "dtx": + out.Dtx = bool(in.Bool()) + case "simulcast": + out.Simulcast = bool(in.Bool()) + case "svc": + out.Svc = bool(in.Bool()) + case "h264_profile": + out.ProfileH264 = string(in.String()) + case "vp9_profile": + out.ProfileVP9 = string(in.String()) + case "videoorient_ext_id": + out.ExtIdVideoOrientation = int(in.Int()) + case "playoutdelay_ext_id": + out.ExtIdPlayoutDelay = int(in.Int()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling11(out *jwriter.Writer, in PublisherStream) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"mid\":" + out.RawString(prefix[1:]) + out.String(string(in.Mid)) + } + { + const prefix string = ",\"mindex\":" + out.RawString(prefix) + out.Int(int(in.Mindex)) + } + { + const prefix string = ",\"type\":" + out.RawString(prefix) + out.String(string(in.Type)) + } + if in.Description != "" { + const prefix string = ",\"description\":" + out.RawString(prefix) + out.String(string(in.Description)) + } + if in.Disabled { + const prefix string = ",\"disabled\":" + out.RawString(prefix) + out.Bool(bool(in.Disabled)) + } + if in.Codec != "" { + const prefix string = ",\"codec\":" + out.RawString(prefix) + out.String(string(in.Codec)) + } + if in.Stereo { + const prefix string = ",\"stereo\":" + out.RawString(prefix) + out.Bool(bool(in.Stereo)) + } + if in.Fec { + const prefix string = ",\"fec\":" + out.RawString(prefix) + out.Bool(bool(in.Fec)) + } + if in.Dtx { + const prefix string = ",\"dtx\":" + out.RawString(prefix) + out.Bool(bool(in.Dtx)) + } + if in.Simulcast { + const prefix string = ",\"simulcast\":" + out.RawString(prefix) + out.Bool(bool(in.Simulcast)) + } + if in.Svc { + const prefix string = ",\"svc\":" + out.RawString(prefix) + out.Bool(bool(in.Svc)) + } + if in.ProfileH264 != "" { + const prefix string = ",\"h264_profile\":" + out.RawString(prefix) + out.String(string(in.ProfileH264)) + } + if in.ProfileVP9 != "" { + const prefix string = ",\"vp9_profile\":" + out.RawString(prefix) + out.String(string(in.ProfileVP9)) + } + if in.ExtIdVideoOrientation != 0 { + const prefix string = ",\"videoorient_ext_id\":" + out.RawString(prefix) + out.Int(int(in.ExtIdVideoOrientation)) + } + if in.ExtIdPlayoutDelay != 0 { + const prefix string = ",\"playoutdelay_ext_id\":" + out.RawString(prefix) + out.Int(int(in.ExtIdPlayoutDelay)) + } + out.RawByte('}') +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling12(in *jlexer.Lexer, out *CommandProxyClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "sid": + out.Sid = string(in.String()) + case "streamType": + out.StreamType = StreamType(in.String()) + case "publisherId": + out.PublisherId = string(in.String()) + case "clientId": + out.ClientId = string(in.String()) + case "bitrate": + out.Bitrate = int(in.Int()) + case "mediatypes": + out.MediaTypes = MediaType(in.Int()) + case "remoteUrl": + out.RemoteUrl = string(in.String()) + case "remoteToken": + out.RemoteToken = string(in.String()) + case "hostname": + out.Hostname = string(in.String()) + case "port": + out.Port = int(in.Int()) + case "rtcpPort": + out.RtcpPort = int(in.Int()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling12(out *jwriter.Writer, in CommandProxyClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Sid != "" { + const prefix string = ",\"sid\":" + out.RawString(prefix) + out.String(string(in.Sid)) + } + if in.StreamType != "" { + const prefix string = ",\"streamType\":" + out.RawString(prefix) + out.String(string(in.StreamType)) + } + if in.PublisherId != "" { + const prefix string = ",\"publisherId\":" + out.RawString(prefix) + out.String(string(in.PublisherId)) + } + if in.ClientId != "" { + const prefix string = ",\"clientId\":" + out.RawString(prefix) + out.String(string(in.ClientId)) + } + if in.Bitrate != 0 { + const prefix string = ",\"bitrate\":" + out.RawString(prefix) + out.Int(int(in.Bitrate)) + } + if in.MediaTypes != 0 { + const prefix string = ",\"mediatypes\":" + out.RawString(prefix) + out.Int(int(in.MediaTypes)) + } + if in.RemoteUrl != "" { + const prefix string = ",\"remoteUrl\":" + out.RawString(prefix) + out.String(string(in.RemoteUrl)) + } + if in.RemoteToken != "" { + const prefix string = ",\"remoteToken\":" + out.RawString(prefix) + out.String(string(in.RemoteToken)) + } + if in.Hostname != "" { + const prefix string = ",\"hostname\":" + out.RawString(prefix) + out.String(string(in.Hostname)) + } + if in.Port != 0 { + const prefix string = ",\"port\":" + out.RawString(prefix) + out.Int(int(in.Port)) + } + if in.RtcpPort != 0 { + const prefix string = ",\"rtcpPort\":" + out.RawString(prefix) + out.Int(int(in.RtcpPort)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CommandProxyClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CommandProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CommandProxyClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CommandProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling12(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling13(in *jlexer.Lexer, out *ByeProxyServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "reason": + out.Reason = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling13(out *jwriter.Writer, in ByeProxyServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"reason\":" + out.RawString(prefix[1:]) + out.String(string(in.Reason)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ByeProxyServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ByeProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ByeProxyServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ByeProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling13(l, v) +} +func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling14(in *jlexer.Lexer, out *ByeProxyClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling14(out *jwriter.Writer, in ByeProxyClientMessage) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ByeProxyClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ByeProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ByeProxyClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ByeProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling14(l, v) +} diff --git a/api_signaling_easyjson.go b/api_signaling_easyjson.go new file mode 100644 index 00000000..5b43864c --- /dev/null +++ b/api_signaling_easyjson.go @@ -0,0 +1,5250 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package signaling + +import ( + json "encoding/json" + _v4 "github.com/golang-jwt/jwt/v4" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" + time "time" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling(in *jlexer.Lexer, out *WelcomeServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "features": + if in.IsNull() { + in.Skip() + out.Features = nil + } else { + in.Delim('[') + if out.Features == nil { + if !in.IsDelim(']') { + out.Features = make([]string, 0, 4) + } else { + out.Features = []string{} + } + } else { + out.Features = (out.Features)[:0] + } + for !in.IsDelim(']') { + var v1 string + v1 = string(in.String()) + out.Features = append(out.Features, v1) + in.WantComma() + } + in.Delim(']') + } + case "country": + out.Country = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling(out *jwriter.Writer, in WelcomeServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + if len(in.Features) != 0 { + const prefix string = ",\"features\":" + out.RawString(prefix) + { + out.RawByte('[') + for v2, v3 := range in.Features { + if v2 > 0 { + out.RawByte(',') + } + out.String(string(v3)) + } + out.RawByte(']') + } + } + if in.Country != "" { + const prefix string = ",\"country\":" + out.RawString(prefix) + out.String(string(in.Country)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v WelcomeServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v WelcomeServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *WelcomeServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *WelcomeServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling1(in *jlexer.Lexer, out *UpdateSessionInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "flags": + if in.IsNull() { + in.Skip() + out.Flags = nil + } else { + if out.Flags == nil { + out.Flags = new(uint32) + } + *out.Flags = uint32(in.Uint32()) + } + case "incall": + if in.IsNull() { + in.Skip() + out.InCall = nil + } else { + if out.InCall == nil { + out.InCall = new(int) + } + *out.InCall = int(in.Int()) + } + case "sessionid": + out.SessionId = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling1(out *jwriter.Writer, in UpdateSessionInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + if in.Flags != nil { + const prefix string = ",\"flags\":" + first = false + out.RawString(prefix[1:]) + out.Uint32(uint32(*in.Flags)) + } + if in.InCall != nil { + const prefix string = ",\"incall\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Int(int(*in.InCall)) + } + { + const prefix string = ",\"sessionid\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v UpdateSessionInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v UpdateSessionInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *UpdateSessionInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *UpdateSessionInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling1(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling2(in *jlexer.Lexer, out *TransientDataServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "key": + out.Key = string(in.String()) + case "oldvalue": + if m, ok := out.OldValue.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := out.OldValue.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + out.OldValue = in.Interface() + } + case "value": + if m, ok := out.Value.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := out.Value.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + out.Value = in.Interface() + } + case "data": + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + out.Data = make(map[string]interface{}) + } else { + out.Data = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v4 interface{} + if m, ok := v4.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v4.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v4 = in.Interface() + } + (out.Data)[key] = v4 + in.WantComma() + } + in.Delim('}') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling2(out *jwriter.Writer, in TransientDataServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Key != "" { + const prefix string = ",\"key\":" + out.RawString(prefix) + out.String(string(in.Key)) + } + if in.OldValue != nil { + const prefix string = ",\"oldvalue\":" + out.RawString(prefix) + if m, ok := in.OldValue.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := in.OldValue.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(in.OldValue)) + } + } + if in.Value != nil { + const prefix string = ",\"value\":" + out.RawString(prefix) + if m, ok := in.Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := in.Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(in.Value)) + } + } + if len(in.Data) != 0 { + const prefix string = ",\"data\":" + out.RawString(prefix) + { + out.RawByte('{') + v5First := true + for v5Name, v5Value := range in.Data { + if v5First { + v5First = false + } else { + out.RawByte(',') + } + out.String(string(v5Name)) + out.RawByte(':') + if m, ok := v5Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v5Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v5Value)) + } + } + out.RawByte('}') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v TransientDataServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v TransientDataServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *TransientDataServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *TransientDataServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling2(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling3(in *jlexer.Lexer, out *TransientDataClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "key": + out.Key = string(in.String()) + case "value": + if data := in.Raw(); in.Ok() { + in.AddError((out.Value).UnmarshalJSON(data)) + } + case "ttl": + out.TTL = time.Duration(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling3(out *jwriter.Writer, in TransientDataClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Key != "" { + const prefix string = ",\"key\":" + out.RawString(prefix) + out.String(string(in.Key)) + } + if len(in.Value) != 0 { + const prefix string = ",\"value\":" + out.RawString(prefix) + out.Raw((in.Value).MarshalJSON()) + } + if in.TTL != 0 { + const prefix string = ",\"ttl\":" + out.RawString(prefix) + out.Int64(int64(in.TTL)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v TransientDataClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v TransientDataClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *TransientDataClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *TransientDataClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling3(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling4(in *jlexer.Lexer, out *ServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.Id = string(in.String()) + case "type": + out.Type = string(in.String()) + case "error": + if in.IsNull() { + in.Skip() + out.Error = nil + } else { + if out.Error == nil { + out.Error = new(Error) + } + (*out.Error).UnmarshalEasyJSON(in) + } + case "welcome": + if in.IsNull() { + in.Skip() + out.Welcome = nil + } else { + if out.Welcome == nil { + out.Welcome = new(WelcomeServerMessage) + } + (*out.Welcome).UnmarshalEasyJSON(in) + } + case "hello": + if in.IsNull() { + in.Skip() + out.Hello = nil + } else { + if out.Hello == nil { + out.Hello = new(HelloServerMessage) + } + (*out.Hello).UnmarshalEasyJSON(in) + } + case "bye": + if in.IsNull() { + in.Skip() + out.Bye = nil + } else { + if out.Bye == nil { + out.Bye = new(ByeServerMessage) + } + (*out.Bye).UnmarshalEasyJSON(in) + } + case "room": + if in.IsNull() { + in.Skip() + out.Room = nil + } else { + if out.Room == nil { + out.Room = new(RoomServerMessage) + } + (*out.Room).UnmarshalEasyJSON(in) + } + case "message": + if in.IsNull() { + in.Skip() + out.Message = nil + } else { + if out.Message == nil { + out.Message = new(MessageServerMessage) + } + (*out.Message).UnmarshalEasyJSON(in) + } + case "control": + if in.IsNull() { + in.Skip() + out.Control = nil + } else { + if out.Control == nil { + out.Control = new(ControlServerMessage) + } + (*out.Control).UnmarshalEasyJSON(in) + } + case "event": + if in.IsNull() { + in.Skip() + out.Event = nil + } else { + if out.Event == nil { + out.Event = new(EventServerMessage) + } + (*out.Event).UnmarshalEasyJSON(in) + } + case "transient": + if in.IsNull() { + in.Skip() + out.TransientData = nil + } else { + if out.TransientData == nil { + out.TransientData = new(TransientDataServerMessage) + } + (*out.TransientData).UnmarshalEasyJSON(in) + } + case "internal": + if in.IsNull() { + in.Skip() + out.Internal = nil + } else { + if out.Internal == nil { + out.Internal = new(InternalServerMessage) + } + (*out.Internal).UnmarshalEasyJSON(in) + } + case "dialout": + if in.IsNull() { + in.Skip() + out.Dialout = nil + } else { + if out.Dialout == nil { + out.Dialout = new(DialoutInternalClientMessage) + } + (*out.Dialout).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling4(out *jwriter.Writer, in ServerMessage) { + out.RawByte('{') + first := true + _ = first + if in.Id != "" { + const prefix string = ",\"id\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Id)) + } + { + const prefix string = ",\"type\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Type)) + } + if in.Error != nil { + const prefix string = ",\"error\":" + out.RawString(prefix) + (*in.Error).MarshalEasyJSON(out) + } + if in.Welcome != nil { + const prefix string = ",\"welcome\":" + out.RawString(prefix) + (*in.Welcome).MarshalEasyJSON(out) + } + if in.Hello != nil { + const prefix string = ",\"hello\":" + out.RawString(prefix) + (*in.Hello).MarshalEasyJSON(out) + } + if in.Bye != nil { + const prefix string = ",\"bye\":" + out.RawString(prefix) + (*in.Bye).MarshalEasyJSON(out) + } + if in.Room != nil { + const prefix string = ",\"room\":" + out.RawString(prefix) + (*in.Room).MarshalEasyJSON(out) + } + if in.Message != nil { + const prefix string = ",\"message\":" + out.RawString(prefix) + (*in.Message).MarshalEasyJSON(out) + } + if in.Control != nil { + const prefix string = ",\"control\":" + out.RawString(prefix) + (*in.Control).MarshalEasyJSON(out) + } + if in.Event != nil { + const prefix string = ",\"event\":" + out.RawString(prefix) + (*in.Event).MarshalEasyJSON(out) + } + if in.TransientData != nil { + const prefix string = ",\"transient\":" + out.RawString(prefix) + (*in.TransientData).MarshalEasyJSON(out) + } + if in.Internal != nil { + const prefix string = ",\"internal\":" + out.RawString(prefix) + (*in.Internal).MarshalEasyJSON(out) + } + if in.Dialout != nil { + const prefix string = ",\"dialout\":" + out.RawString(prefix) + (*in.Dialout).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling4(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling5(in *jlexer.Lexer, out *RoomServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling5(out *jwriter.Writer, in RoomServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + out.RawString(prefix) + out.Raw((in.Properties).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling5(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling6(in *jlexer.Lexer, out *RoomFlagsServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "flags": + out.Flags = uint32(in.Uint32()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling6(out *jwriter.Writer, in RoomFlagsServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"flags\":" + out.RawString(prefix) + out.Uint32(uint32(in.Flags)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomFlagsServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomFlagsServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomFlagsServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomFlagsServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling6(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling7(in *jlexer.Lexer, out *RoomEventServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + case "incall": + if data := in.Raw(); in.Ok() { + in.AddError((out.InCall).UnmarshalJSON(data)) + } + case "changed": + if in.IsNull() { + in.Skip() + out.Changed = nil + } else { + in.Delim('[') + if out.Changed == nil { + if !in.IsDelim(']') { + out.Changed = make([]map[string]interface{}, 0, 8) + } else { + out.Changed = []map[string]interface{}{} + } + } else { + out.Changed = (out.Changed)[:0] + } + for !in.IsDelim(']') { + var v6 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v6 = make(map[string]interface{}) + } else { + v6 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v7 interface{} + if m, ok := v7.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v7.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v7 = in.Interface() + } + (v6)[key] = v7 + in.WantComma() + } + in.Delim('}') + } + out.Changed = append(out.Changed, v6) + in.WantComma() + } + in.Delim(']') + } + case "users": + if in.IsNull() { + in.Skip() + out.Users = nil + } else { + in.Delim('[') + if out.Users == nil { + if !in.IsDelim(']') { + out.Users = make([]map[string]interface{}, 0, 8) + } else { + out.Users = []map[string]interface{}{} + } + } else { + out.Users = (out.Users)[:0] + } + for !in.IsDelim(']') { + var v8 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v8 = make(map[string]interface{}) + } else { + v8 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v9 interface{} + if m, ok := v9.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v9.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v9 = in.Interface() + } + (v8)[key] = v9 + in.WantComma() + } + in.Delim('}') + } + out.Users = append(out.Users, v8) + in.WantComma() + } + in.Delim(']') + } + case "all": + out.All = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling7(out *jwriter.Writer, in RoomEventServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + out.RawString(prefix) + out.Raw((in.Properties).MarshalJSON()) + } + if len(in.InCall) != 0 { + const prefix string = ",\"incall\":" + out.RawString(prefix) + out.Raw((in.InCall).MarshalJSON()) + } + if len(in.Changed) != 0 { + const prefix string = ",\"changed\":" + out.RawString(prefix) + { + out.RawByte('[') + for v10, v11 := range in.Changed { + if v10 > 0 { + out.RawByte(',') + } + if v11 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v12First := true + for v12Name, v12Value := range v11 { + if v12First { + v12First = false + } else { + out.RawByte(',') + } + out.String(string(v12Name)) + out.RawByte(':') + if m, ok := v12Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v12Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v12Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + if len(in.Users) != 0 { + const prefix string = ",\"users\":" + out.RawString(prefix) + { + out.RawByte('[') + for v13, v14 := range in.Users { + if v13 > 0 { + out.RawByte(',') + } + if v14 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v15First := true + for v15Name, v15Value := range v14 { + if v15First { + v15First = false + } else { + out.RawByte(',') + } + out.String(string(v15Name)) + out.RawByte(':') + if m, ok := v15Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v15Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v15Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + if in.All { + const prefix string = ",\"all\":" + out.RawString(prefix) + out.Bool(bool(in.All)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomEventServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomEventServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomEventServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomEventServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling7(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling8(in *jlexer.Lexer, out *RoomEventMessageDataChat) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "comment": + if in.IsNull() { + in.Skip() + out.Comment = nil + } else { + if out.Comment == nil { + out.Comment = new(ChatComment) + } + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + *out.Comment = make(ChatComment) + } else { + *out.Comment = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v16 interface{} + if m, ok := v16.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v16.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v16 = in.Interface() + } + (*out.Comment)[key] = v16 + in.WantComma() + } + in.Delim('}') + } + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling8(out *jwriter.Writer, in RoomEventMessageDataChat) { + out.RawByte('{') + first := true + _ = first + if in.Comment != nil { + const prefix string = ",\"comment\":" + first = false + out.RawString(prefix[1:]) + if *in.Comment == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v17First := true + for v17Name, v17Value := range *in.Comment { + if v17First { + v17First = false + } else { + out.RawByte(',') + } + out.String(string(v17Name)) + out.RawByte(':') + if m, ok := v17Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v17Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v17Value)) + } + } + out.RawByte('}') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomEventMessageDataChat) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomEventMessageDataChat) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomEventMessageDataChat) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomEventMessageDataChat) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling8(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling9(in *jlexer.Lexer, out *RoomEventMessageData) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "chat": + if in.IsNull() { + in.Skip() + out.Chat = nil + } else { + if out.Chat == nil { + out.Chat = new(RoomEventMessageDataChat) + } + (*out.Chat).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling9(out *jwriter.Writer, in RoomEventMessageData) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Chat != nil { + const prefix string = ",\"chat\":" + out.RawString(prefix) + (*in.Chat).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomEventMessageData) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomEventMessageData) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomEventMessageData) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomEventMessageData) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling9(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling10(in *jlexer.Lexer, out *RoomEventMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling10(out *jwriter.Writer, in RoomEventMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + if len(in.Data) != 0 { + const prefix string = ",\"data\":" + out.RawString(prefix) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomEventMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomEventMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomEventMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomEventMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling10(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling11(in *jlexer.Lexer, out *RoomErrorDetails) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "room": + if in.IsNull() { + in.Skip() + out.Room = nil + } else { + if out.Room == nil { + out.Room = new(RoomServerMessage) + } + (*out.Room).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling11(out *jwriter.Writer, in RoomErrorDetails) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"room\":" + out.RawString(prefix[1:]) + if in.Room == nil { + out.RawString("null") + } else { + (*in.Room).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomErrorDetails) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomErrorDetails) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomErrorDetails) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomErrorDetails) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling11(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling12(in *jlexer.Lexer, out *RoomDisinviteEventServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "reason": + out.Reason = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + case "properties": + if data := in.Raw(); in.Ok() { + in.AddError((out.Properties).UnmarshalJSON(data)) + } + case "incall": + if data := in.Raw(); in.Ok() { + in.AddError((out.InCall).UnmarshalJSON(data)) + } + case "changed": + if in.IsNull() { + in.Skip() + out.Changed = nil + } else { + in.Delim('[') + if out.Changed == nil { + if !in.IsDelim(']') { + out.Changed = make([]map[string]interface{}, 0, 8) + } else { + out.Changed = []map[string]interface{}{} + } + } else { + out.Changed = (out.Changed)[:0] + } + for !in.IsDelim(']') { + var v18 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v18 = make(map[string]interface{}) + } else { + v18 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v19 interface{} + if m, ok := v19.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v19.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v19 = in.Interface() + } + (v18)[key] = v19 + in.WantComma() + } + in.Delim('}') + } + out.Changed = append(out.Changed, v18) + in.WantComma() + } + in.Delim(']') + } + case "users": + if in.IsNull() { + in.Skip() + out.Users = nil + } else { + in.Delim('[') + if out.Users == nil { + if !in.IsDelim(']') { + out.Users = make([]map[string]interface{}, 0, 8) + } else { + out.Users = []map[string]interface{}{} + } + } else { + out.Users = (out.Users)[:0] + } + for !in.IsDelim(']') { + var v20 map[string]interface{} + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + if !in.IsDelim('}') { + v20 = make(map[string]interface{}) + } else { + v20 = nil + } + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v21 interface{} + if m, ok := v21.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v21.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v21 = in.Interface() + } + (v20)[key] = v21 + in.WantComma() + } + in.Delim('}') + } + out.Users = append(out.Users, v20) + in.WantComma() + } + in.Delim(']') + } + case "all": + out.All = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling12(out *jwriter.Writer, in RoomDisinviteEventServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"reason\":" + out.RawString(prefix[1:]) + out.String(string(in.Reason)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + out.RawString(prefix) + out.Raw((in.Properties).MarshalJSON()) + } + if len(in.InCall) != 0 { + const prefix string = ",\"incall\":" + out.RawString(prefix) + out.Raw((in.InCall).MarshalJSON()) + } + if len(in.Changed) != 0 { + const prefix string = ",\"changed\":" + out.RawString(prefix) + { + out.RawByte('[') + for v22, v23 := range in.Changed { + if v22 > 0 { + out.RawByte(',') + } + if v23 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v24First := true + for v24Name, v24Value := range v23 { + if v24First { + v24First = false + } else { + out.RawByte(',') + } + out.String(string(v24Name)) + out.RawByte(':') + if m, ok := v24Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v24Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v24Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + if len(in.Users) != 0 { + const prefix string = ",\"users\":" + out.RawString(prefix) + { + out.RawByte('[') + for v25, v26 := range in.Users { + if v25 > 0 { + out.RawByte(',') + } + if v26 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v27First := true + for v27Name, v27Value := range v26 { + if v27First { + v27First = false + } else { + out.RawByte(',') + } + out.String(string(v27Name)) + out.RawByte(':') + if m, ok := v27Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v27Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v27Value)) + } + } + out.RawByte('}') + } + } + out.RawByte(']') + } + } + if in.All { + const prefix string = ",\"all\":" + out.RawString(prefix) + out.Bool(bool(in.All)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomDisinviteEventServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomDisinviteEventServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomDisinviteEventServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomDisinviteEventServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling12(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling13(in *jlexer.Lexer, out *RoomClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling13(out *jwriter.Writer, in RoomClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + if in.SessionId != "" { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RoomClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RoomClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RoomClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RoomClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling13(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling14(in *jlexer.Lexer, out *RemoveSessionInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userid": + out.UserId = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling14(out *jwriter.Writer, in RemoveSessionInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + if in.UserId != "" { + const prefix string = ",\"userid\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.UserId)) + } + { + const prefix string = ",\"sessionid\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveSessionInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveSessionInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveSessionInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveSessionInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling14(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling15(in *jlexer.Lexer, out *MessageServerMessageSender) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "userid": + out.UserId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling15(out *jwriter.Writer, in MessageServerMessageSender) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.SessionId != "" { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + if in.UserId != "" { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageServerMessageSender) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageServerMessageSender) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageServerMessageSender) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageServerMessageSender) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling15(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling16(in *jlexer.Lexer, out *MessageServerMessageDataChat) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "refresh": + out.Refresh = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling16(out *jwriter.Writer, in MessageServerMessageDataChat) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"refresh\":" + out.RawString(prefix[1:]) + out.Bool(bool(in.Refresh)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageServerMessageDataChat) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageServerMessageDataChat) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageServerMessageDataChat) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageServerMessageDataChat) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling16(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling17(in *jlexer.Lexer, out *MessageServerMessageData) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "chat": + if in.IsNull() { + in.Skip() + out.Chat = nil + } else { + if out.Chat == nil { + out.Chat = new(MessageServerMessageDataChat) + } + (*out.Chat).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling17(out *jwriter.Writer, in MessageServerMessageData) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Chat != nil { + const prefix string = ",\"chat\":" + out.RawString(prefix) + (*in.Chat).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageServerMessageData) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageServerMessageData) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageServerMessageData) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageServerMessageData) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling17(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling18(in *jlexer.Lexer, out *MessageServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "sender": + if in.IsNull() { + in.Skip() + out.Sender = nil + } else { + if out.Sender == nil { + out.Sender = new(MessageServerMessageSender) + } + (*out.Sender).UnmarshalEasyJSON(in) + } + case "recipient": + if in.IsNull() { + in.Skip() + out.Recipient = nil + } else { + if out.Recipient == nil { + out.Recipient = new(MessageClientMessageRecipient) + } + (*out.Recipient).UnmarshalEasyJSON(in) + } + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling18(out *jwriter.Writer, in MessageServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"sender\":" + out.RawString(prefix[1:]) + if in.Sender == nil { + out.RawString("null") + } else { + (*in.Sender).MarshalEasyJSON(out) + } + } + if in.Recipient != nil { + const prefix string = ",\"recipient\":" + out.RawString(prefix) + (*in.Recipient).MarshalEasyJSON(out) + } + { + const prefix string = ",\"data\":" + out.RawString(prefix) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling18(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling19(in *jlexer.Lexer, out *MessageClientMessageRecipient) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "userid": + out.UserId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling19(out *jwriter.Writer, in MessageClientMessageRecipient) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.SessionId != "" { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + if in.UserId != "" { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageClientMessageRecipient) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageClientMessageRecipient) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageClientMessageRecipient) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageClientMessageRecipient) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling19(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling20(in *jlexer.Lexer, out *MessageClientMessageData) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "sid": + out.Sid = string(in.String()) + case "roomType": + out.RoomType = string(in.String()) + case "bitrate": + out.Bitrate = int(in.Int()) + case "payload": + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + out.Payload = make(map[string]interface{}) + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v28 interface{} + if m, ok := v28.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v28.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v28 = in.Interface() + } + (out.Payload)[key] = v28 + in.WantComma() + } + in.Delim('}') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling20(out *jwriter.Writer, in MessageClientMessageData) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + { + const prefix string = ",\"sid\":" + out.RawString(prefix) + out.String(string(in.Sid)) + } + { + const prefix string = ",\"roomType\":" + out.RawString(prefix) + out.String(string(in.RoomType)) + } + if in.Bitrate != 0 { + const prefix string = ",\"bitrate\":" + out.RawString(prefix) + out.Int(int(in.Bitrate)) + } + { + const prefix string = ",\"payload\":" + out.RawString(prefix) + if in.Payload == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v29First := true + for v29Name, v29Value := range in.Payload { + if v29First { + v29First = false + } else { + out.RawByte(',') + } + out.String(string(v29Name)) + out.RawByte(':') + if m, ok := v29Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v29Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v29Value)) + } + } + out.RawByte('}') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageClientMessageData) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageClientMessageData) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageClientMessageData) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageClientMessageData) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling20(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling21(in *jlexer.Lexer, out *MessageClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "recipient": + (out.Recipient).UnmarshalEasyJSON(in) + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling21(out *jwriter.Writer, in MessageClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"recipient\":" + out.RawString(prefix[1:]) + (in.Recipient).MarshalEasyJSON(out) + } + { + const prefix string = ",\"data\":" + out.RawString(prefix) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MessageClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MessageClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MessageClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling21(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling22(in *jlexer.Lexer, out *InternalServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "dialout": + if in.IsNull() { + in.Skip() + out.Dialout = nil + } else { + if out.Dialout == nil { + out.Dialout = new(InternalServerDialoutRequest) + } + (*out.Dialout).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling22(out *jwriter.Writer, in InternalServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.Dialout != nil { + const prefix string = ",\"dialout\":" + out.RawString(prefix) + (*in.Dialout).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InternalServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InternalServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InternalServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InternalServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling22(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling23(in *jlexer.Lexer, out *InternalServerDialoutRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "backend": + out.Backend = string(in.String()) + case "request": + if in.IsNull() { + in.Skip() + out.Request = nil + } else { + if out.Request == nil { + out.Request = new(BackendRoomDialoutRequest) + } + (*out.Request).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling23(out *jwriter.Writer, in InternalServerDialoutRequest) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + { + const prefix string = ",\"backend\":" + out.RawString(prefix) + out.String(string(in.Backend)) + } + { + const prefix string = ",\"request\":" + out.RawString(prefix) + if in.Request == nil { + out.RawString("null") + } else { + (*in.Request).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InternalServerDialoutRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling23(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InternalServerDialoutRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling23(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InternalServerDialoutRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling23(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InternalServerDialoutRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling23(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling24(in *jlexer.Lexer, out *InternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "addsession": + if in.IsNull() { + in.Skip() + out.AddSession = nil + } else { + if out.AddSession == nil { + out.AddSession = new(AddSessionInternalClientMessage) + } + (*out.AddSession).UnmarshalEasyJSON(in) + } + case "updatesession": + if in.IsNull() { + in.Skip() + out.UpdateSession = nil + } else { + if out.UpdateSession == nil { + out.UpdateSession = new(UpdateSessionInternalClientMessage) + } + (*out.UpdateSession).UnmarshalEasyJSON(in) + } + case "removesession": + if in.IsNull() { + in.Skip() + out.RemoveSession = nil + } else { + if out.RemoveSession == nil { + out.RemoveSession = new(RemoveSessionInternalClientMessage) + } + (*out.RemoveSession).UnmarshalEasyJSON(in) + } + case "incall": + if in.IsNull() { + in.Skip() + out.InCall = nil + } else { + if out.InCall == nil { + out.InCall = new(InCallInternalClientMessage) + } + (*out.InCall).UnmarshalEasyJSON(in) + } + case "dialout": + if in.IsNull() { + in.Skip() + out.Dialout = nil + } else { + if out.Dialout == nil { + out.Dialout = new(DialoutInternalClientMessage) + } + (*out.Dialout).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling24(out *jwriter.Writer, in InternalClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.AddSession != nil { + const prefix string = ",\"addsession\":" + out.RawString(prefix) + (*in.AddSession).MarshalEasyJSON(out) + } + if in.UpdateSession != nil { + const prefix string = ",\"updatesession\":" + out.RawString(prefix) + (*in.UpdateSession).MarshalEasyJSON(out) + } + if in.RemoveSession != nil { + const prefix string = ",\"removesession\":" + out.RawString(prefix) + (*in.RemoveSession).MarshalEasyJSON(out) + } + if in.InCall != nil { + const prefix string = ",\"incall\":" + out.RawString(prefix) + (*in.InCall).MarshalEasyJSON(out) + } + if in.Dialout != nil { + const prefix string = ",\"dialout\":" + out.RawString(prefix) + (*in.Dialout).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling24(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling24(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling24(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling24(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling25(in *jlexer.Lexer, out *InCallInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "incall": + out.InCall = int(in.Int()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling25(out *jwriter.Writer, in InCallInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"incall\":" + out.RawString(prefix[1:]) + out.Int(int(in.InCall)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InCallInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling25(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InCallInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling25(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InCallInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling25(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InCallInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling25(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling26(in *jlexer.Lexer, out *HelloV2TokenClaims) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userdata": + if data := in.Raw(); in.Ok() { + in.AddError((out.UserData).UnmarshalJSON(data)) + } + case "iss": + out.Issuer = string(in.String()) + case "sub": + out.Subject = string(in.String()) + case "aud": + if data := in.Raw(); in.Ok() { + in.AddError((out.Audience).UnmarshalJSON(data)) + } + case "exp": + if in.IsNull() { + in.Skip() + out.ExpiresAt = nil + } else { + if out.ExpiresAt == nil { + out.ExpiresAt = new(_v4.NumericDate) + } + if data := in.Raw(); in.Ok() { + in.AddError((*out.ExpiresAt).UnmarshalJSON(data)) + } + } + case "nbf": + if in.IsNull() { + in.Skip() + out.NotBefore = nil + } else { + if out.NotBefore == nil { + out.NotBefore = new(_v4.NumericDate) + } + if data := in.Raw(); in.Ok() { + in.AddError((*out.NotBefore).UnmarshalJSON(data)) + } + } + case "iat": + if in.IsNull() { + in.Skip() + out.IssuedAt = nil + } else { + if out.IssuedAt == nil { + out.IssuedAt = new(_v4.NumericDate) + } + if data := in.Raw(); in.Ok() { + in.AddError((*out.IssuedAt).UnmarshalJSON(data)) + } + } + case "jti": + out.ID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling26(out *jwriter.Writer, in HelloV2TokenClaims) { + out.RawByte('{') + first := true + _ = first + if len(in.UserData) != 0 { + const prefix string = ",\"userdata\":" + first = false + out.RawString(prefix[1:]) + out.Raw((in.UserData).MarshalJSON()) + } + if in.Issuer != "" { + const prefix string = ",\"iss\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Issuer)) + } + if in.Subject != "" { + const prefix string = ",\"sub\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Subject)) + } + if len(in.Audience) != 0 { + const prefix string = ",\"aud\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.Audience).MarshalJSON()) + } + if in.ExpiresAt != nil { + const prefix string = ",\"exp\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((*in.ExpiresAt).MarshalJSON()) + } + if in.NotBefore != nil { + const prefix string = ",\"nbf\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((*in.NotBefore).MarshalJSON()) + } + if in.IssuedAt != nil { + const prefix string = ",\"iat\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((*in.IssuedAt).MarshalJSON()) + } + if in.ID != "" { + const prefix string = ",\"jti\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.ID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloV2TokenClaims) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling26(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloV2TokenClaims) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling26(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloV2TokenClaims) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling26(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloV2TokenClaims) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling26(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling27(in *jlexer.Lexer, out *HelloV2AuthParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "token": + out.Token = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling27(out *jwriter.Writer, in HelloV2AuthParams) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"token\":" + out.RawString(prefix[1:]) + out.String(string(in.Token)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloV2AuthParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloV2AuthParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloV2AuthParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloV2AuthParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling27(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling28(in *jlexer.Lexer, out *HelloServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "sessionid": + out.SessionId = string(in.String()) + case "resumeid": + out.ResumeId = string(in.String()) + case "userid": + out.UserId = string(in.String()) + case "server": + if in.IsNull() { + in.Skip() + out.Server = nil + } else { + if out.Server == nil { + out.Server = new(WelcomeServerMessage) + } + (*out.Server).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling28(out *jwriter.Writer, in HelloServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix) + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"resumeid\":" + out.RawString(prefix) + out.String(string(in.ResumeId)) + } + { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + if in.Server != nil { + const prefix string = ",\"server\":" + out.RawString(prefix) + (*in.Server).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling28(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling28(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling28(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling28(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling29(in *jlexer.Lexer, out *HelloClientMessageAuth) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "params": + if data := in.Raw(); in.Ok() { + in.AddError((out.Params).UnmarshalJSON(data)) + } + case "url": + out.Url = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling29(out *jwriter.Writer, in HelloClientMessageAuth) { + out.RawByte('{') + first := true + _ = first + if in.Type != "" { + const prefix string = ",\"type\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + { + const prefix string = ",\"params\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.Params).MarshalJSON()) + } + { + const prefix string = ",\"url\":" + out.RawString(prefix) + out.String(string(in.Url)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloClientMessageAuth) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling29(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloClientMessageAuth) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling29(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloClientMessageAuth) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling29(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloClientMessageAuth) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling29(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling30(in *jlexer.Lexer, out *HelloClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "version": + out.Version = string(in.String()) + case "resumeid": + out.ResumeId = string(in.String()) + case "features": + if in.IsNull() { + in.Skip() + out.Features = nil + } else { + in.Delim('[') + if out.Features == nil { + if !in.IsDelim(']') { + out.Features = make([]string, 0, 4) + } else { + out.Features = []string{} + } + } else { + out.Features = (out.Features)[:0] + } + for !in.IsDelim(']') { + var v30 string + v30 = string(in.String()) + out.Features = append(out.Features, v30) + in.WantComma() + } + in.Delim(']') + } + case "auth": + if in.IsNull() { + in.Skip() + out.Auth = nil + } else { + if out.Auth == nil { + out.Auth = new(HelloClientMessageAuth) + } + (*out.Auth).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling30(out *jwriter.Writer, in HelloClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"version\":" + out.RawString(prefix[1:]) + out.String(string(in.Version)) + } + { + const prefix string = ",\"resumeid\":" + out.RawString(prefix) + out.String(string(in.ResumeId)) + } + if len(in.Features) != 0 { + const prefix string = ",\"features\":" + out.RawString(prefix) + { + out.RawByte('[') + for v31, v32 := range in.Features { + if v31 > 0 { + out.RawByte(',') + } + out.String(string(v32)) + } + out.RawByte(']') + } + } + if in.Auth != nil { + const prefix string = ",\"auth\":" + out.RawString(prefix) + (*in.Auth).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HelloClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling30(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HelloClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling30(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HelloClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling30(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HelloClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling30(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling31(in *jlexer.Lexer, out *EventServerMessageSwitchTo) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "roomid": + out.RoomId = string(in.String()) + case "details": + if data := in.Raw(); in.Ok() { + in.AddError((out.Details).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling31(out *jwriter.Writer, in EventServerMessageSwitchTo) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"roomid\":" + out.RawString(prefix[1:]) + out.String(string(in.RoomId)) + } + if len(in.Details) != 0 { + const prefix string = ",\"details\":" + out.RawString(prefix) + out.Raw((in.Details).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventServerMessageSwitchTo) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling31(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventServerMessageSwitchTo) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling31(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventServerMessageSwitchTo) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling31(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventServerMessageSwitchTo) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling31(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling32(in *jlexer.Lexer, out *EventServerMessageSessionEntry) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "sessionid": + out.SessionId = string(in.String()) + case "userid": + out.UserId = string(in.String()) + case "user": + if data := in.Raw(); in.Ok() { + in.AddError((out.User).UnmarshalJSON(data)) + } + case "roomsessionid": + out.RoomSessionId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling32(out *jwriter.Writer, in EventServerMessageSessionEntry) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix[1:]) + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"userid\":" + out.RawString(prefix) + out.String(string(in.UserId)) + } + if len(in.User) != 0 { + const prefix string = ",\"user\":" + out.RawString(prefix) + out.Raw((in.User).MarshalJSON()) + } + if in.RoomSessionId != "" { + const prefix string = ",\"roomsessionid\":" + out.RawString(prefix) + out.String(string(in.RoomSessionId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventServerMessageSessionEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling32(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventServerMessageSessionEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling32(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventServerMessageSessionEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling32(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventServerMessageSessionEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling32(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling33(in *jlexer.Lexer, out *EventServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "target": + out.Target = string(in.String()) + case "type": + out.Type = string(in.String()) + case "join": + if in.IsNull() { + in.Skip() + out.Join = nil + } else { + in.Delim('[') + if out.Join == nil { + if !in.IsDelim(']') { + out.Join = make([]*EventServerMessageSessionEntry, 0, 8) + } else { + out.Join = []*EventServerMessageSessionEntry{} + } + } else { + out.Join = (out.Join)[:0] + } + for !in.IsDelim(']') { + var v33 *EventServerMessageSessionEntry + if in.IsNull() { + in.Skip() + v33 = nil + } else { + if v33 == nil { + v33 = new(EventServerMessageSessionEntry) + } + (*v33).UnmarshalEasyJSON(in) + } + out.Join = append(out.Join, v33) + in.WantComma() + } + in.Delim(']') + } + case "leave": + if in.IsNull() { + in.Skip() + out.Leave = nil + } else { + in.Delim('[') + if out.Leave == nil { + if !in.IsDelim(']') { + out.Leave = make([]string, 0, 4) + } else { + out.Leave = []string{} + } + } else { + out.Leave = (out.Leave)[:0] + } + for !in.IsDelim(']') { + var v34 string + v34 = string(in.String()) + out.Leave = append(out.Leave, v34) + in.WantComma() + } + in.Delim(']') + } + case "change": + if in.IsNull() { + in.Skip() + out.Change = nil + } else { + in.Delim('[') + if out.Change == nil { + if !in.IsDelim(']') { + out.Change = make([]*EventServerMessageSessionEntry, 0, 8) + } else { + out.Change = []*EventServerMessageSessionEntry{} + } + } else { + out.Change = (out.Change)[:0] + } + for !in.IsDelim(']') { + var v35 *EventServerMessageSessionEntry + if in.IsNull() { + in.Skip() + v35 = nil + } else { + if v35 == nil { + v35 = new(EventServerMessageSessionEntry) + } + (*v35).UnmarshalEasyJSON(in) + } + out.Change = append(out.Change, v35) + in.WantComma() + } + in.Delim(']') + } + case "switchto": + if in.IsNull() { + in.Skip() + out.SwitchTo = nil + } else { + if out.SwitchTo == nil { + out.SwitchTo = new(EventServerMessageSwitchTo) + } + (*out.SwitchTo).UnmarshalEasyJSON(in) + } + case "invite": + if in.IsNull() { + in.Skip() + out.Invite = nil + } else { + if out.Invite == nil { + out.Invite = new(RoomEventServerMessage) + } + (*out.Invite).UnmarshalEasyJSON(in) + } + case "disinvite": + if in.IsNull() { + in.Skip() + out.Disinvite = nil + } else { + if out.Disinvite == nil { + out.Disinvite = new(RoomDisinviteEventServerMessage) + } + (*out.Disinvite).UnmarshalEasyJSON(in) + } + case "update": + if in.IsNull() { + in.Skip() + out.Update = nil + } else { + if out.Update == nil { + out.Update = new(RoomEventServerMessage) + } + (*out.Update).UnmarshalEasyJSON(in) + } + case "flags": + if in.IsNull() { + in.Skip() + out.Flags = nil + } else { + if out.Flags == nil { + out.Flags = new(RoomFlagsServerMessage) + } + (*out.Flags).UnmarshalEasyJSON(in) + } + case "message": + if in.IsNull() { + in.Skip() + out.Message = nil + } else { + if out.Message == nil { + out.Message = new(RoomEventMessage) + } + (*out.Message).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling33(out *jwriter.Writer, in EventServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"target\":" + out.RawString(prefix[1:]) + out.String(string(in.Target)) + } + { + const prefix string = ",\"type\":" + out.RawString(prefix) + out.String(string(in.Type)) + } + if len(in.Join) != 0 { + const prefix string = ",\"join\":" + out.RawString(prefix) + { + out.RawByte('[') + for v36, v37 := range in.Join { + if v36 > 0 { + out.RawByte(',') + } + if v37 == nil { + out.RawString("null") + } else { + (*v37).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.Leave) != 0 { + const prefix string = ",\"leave\":" + out.RawString(prefix) + { + out.RawByte('[') + for v38, v39 := range in.Leave { + if v38 > 0 { + out.RawByte(',') + } + out.String(string(v39)) + } + out.RawByte(']') + } + } + if len(in.Change) != 0 { + const prefix string = ",\"change\":" + out.RawString(prefix) + { + out.RawByte('[') + for v40, v41 := range in.Change { + if v40 > 0 { + out.RawByte(',') + } + if v41 == nil { + out.RawString("null") + } else { + (*v41).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.SwitchTo != nil { + const prefix string = ",\"switchto\":" + out.RawString(prefix) + (*in.SwitchTo).MarshalEasyJSON(out) + } + if in.Invite != nil { + const prefix string = ",\"invite\":" + out.RawString(prefix) + (*in.Invite).MarshalEasyJSON(out) + } + if in.Disinvite != nil { + const prefix string = ",\"disinvite\":" + out.RawString(prefix) + (*in.Disinvite).MarshalEasyJSON(out) + } + if in.Update != nil { + const prefix string = ",\"update\":" + out.RawString(prefix) + (*in.Update).MarshalEasyJSON(out) + } + if in.Flags != nil { + const prefix string = ",\"flags\":" + out.RawString(prefix) + (*in.Flags).MarshalEasyJSON(out) + } + if in.Message != nil { + const prefix string = ",\"message\":" + out.RawString(prefix) + (*in.Message).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling33(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling33(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling33(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling33(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling34(in *jlexer.Lexer, out *Error) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "code": + out.Code = string(in.String()) + case "message": + out.Message = string(in.String()) + case "details": + if data := in.Raw(); in.Ok() { + in.AddError((out.Details).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling34(out *jwriter.Writer, in Error) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"code\":" + out.RawString(prefix[1:]) + out.String(string(in.Code)) + } + { + const prefix string = ",\"message\":" + out.RawString(prefix) + out.String(string(in.Message)) + } + if len(in.Details) != 0 { + const prefix string = ",\"details\":" + out.RawString(prefix) + out.Raw((in.Details).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Error) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling34(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Error) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling34(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Error) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling34(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling34(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling35(in *jlexer.Lexer, out *DialoutStatusInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "callid": + out.CallId = string(in.String()) + case "status": + out.Status = DialoutStatus(in.String()) + case "cause": + out.Cause = string(in.String()) + case "code": + out.Code = int(in.Int()) + case "message": + out.Message = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling35(out *jwriter.Writer, in DialoutStatusInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"callid\":" + out.RawString(prefix[1:]) + out.String(string(in.CallId)) + } + { + const prefix string = ",\"status\":" + out.RawString(prefix) + out.String(string(in.Status)) + } + if in.Cause != "" { + const prefix string = ",\"cause\":" + out.RawString(prefix) + out.String(string(in.Cause)) + } + if in.Code != 0 { + const prefix string = ",\"code\":" + out.RawString(prefix) + out.Int(int(in.Code)) + } + if in.Message != "" { + const prefix string = ",\"message\":" + out.RawString(prefix) + out.String(string(in.Message)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DialoutStatusInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DialoutStatusInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DialoutStatusInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DialoutStatusInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling35(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling36(in *jlexer.Lexer, out *DialoutInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + out.Type = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + case "error": + if in.IsNull() { + in.Skip() + out.Error = nil + } else { + if out.Error == nil { + out.Error = new(Error) + } + (*out.Error).UnmarshalEasyJSON(in) + } + case "status": + if in.IsNull() { + in.Skip() + out.Status = nil + } else { + if out.Status == nil { + out.Status = new(DialoutStatusInternalClientMessage) + } + (*out.Status).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling36(out *jwriter.Writer, in DialoutInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.String(string(in.Type)) + } + if in.RoomId != "" { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + if in.Error != nil { + const prefix string = ",\"error\":" + out.RawString(prefix) + (*in.Error).MarshalEasyJSON(out) + } + if in.Status != nil { + const prefix string = ",\"status\":" + out.RawString(prefix) + (*in.Status).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DialoutInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DialoutInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DialoutInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DialoutInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling36(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling37(in *jlexer.Lexer, out *ControlServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "sender": + if in.IsNull() { + in.Skip() + out.Sender = nil + } else { + if out.Sender == nil { + out.Sender = new(MessageServerMessageSender) + } + (*out.Sender).UnmarshalEasyJSON(in) + } + case "recipient": + if in.IsNull() { + in.Skip() + out.Recipient = nil + } else { + if out.Recipient == nil { + out.Recipient = new(MessageClientMessageRecipient) + } + (*out.Recipient).UnmarshalEasyJSON(in) + } + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling37(out *jwriter.Writer, in ControlServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"sender\":" + out.RawString(prefix[1:]) + if in.Sender == nil { + out.RawString("null") + } else { + (*in.Sender).MarshalEasyJSON(out) + } + } + if in.Recipient != nil { + const prefix string = ",\"recipient\":" + out.RawString(prefix) + (*in.Recipient).MarshalEasyJSON(out) + } + { + const prefix string = ",\"data\":" + out.RawString(prefix) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ControlServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling37(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ControlServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling37(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ControlServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling37(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ControlServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling37(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling38(in *jlexer.Lexer, out *ControlClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "recipient": + (out.Recipient).UnmarshalEasyJSON(in) + case "data": + if data := in.Raw(); in.Ok() { + in.AddError((out.Data).UnmarshalJSON(data)) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling38(out *jwriter.Writer, in ControlClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"recipient\":" + out.RawString(prefix[1:]) + (in.Recipient).MarshalEasyJSON(out) + } + { + const prefix string = ",\"data\":" + out.RawString(prefix) + out.Raw((in.Data).MarshalJSON()) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ControlClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ControlClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ControlClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling38(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ControlClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling38(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling39(in *jlexer.Lexer, out *CommonSessionInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "sessionid": + out.SessionId = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling39(out *jwriter.Writer, in CommonSessionInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"sessionid\":" + out.RawString(prefix[1:]) + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CommonSessionInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling39(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CommonSessionInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling39(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CommonSessionInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling39(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CommonSessionInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling39(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling40(in *jlexer.Lexer, out *ClientTypeInternalAuthParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "random": + out.Random = string(in.String()) + case "token": + out.Token = string(in.String()) + case "backend": + out.Backend = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling40(out *jwriter.Writer, in ClientTypeInternalAuthParams) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"random\":" + out.RawString(prefix[1:]) + out.String(string(in.Random)) + } + { + const prefix string = ",\"token\":" + out.RawString(prefix) + out.String(string(in.Token)) + } + { + const prefix string = ",\"backend\":" + out.RawString(prefix) + out.String(string(in.Backend)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ClientTypeInternalAuthParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling40(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClientTypeInternalAuthParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling40(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClientTypeInternalAuthParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling40(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClientTypeInternalAuthParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling40(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling41(in *jlexer.Lexer, out *ClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.Id = string(in.String()) + case "type": + out.Type = string(in.String()) + case "hello": + if in.IsNull() { + in.Skip() + out.Hello = nil + } else { + if out.Hello == nil { + out.Hello = new(HelloClientMessage) + } + (*out.Hello).UnmarshalEasyJSON(in) + } + case "bye": + if in.IsNull() { + in.Skip() + out.Bye = nil + } else { + if out.Bye == nil { + out.Bye = new(ByeClientMessage) + } + (*out.Bye).UnmarshalEasyJSON(in) + } + case "room": + if in.IsNull() { + in.Skip() + out.Room = nil + } else { + if out.Room == nil { + out.Room = new(RoomClientMessage) + } + (*out.Room).UnmarshalEasyJSON(in) + } + case "message": + if in.IsNull() { + in.Skip() + out.Message = nil + } else { + if out.Message == nil { + out.Message = new(MessageClientMessage) + } + (*out.Message).UnmarshalEasyJSON(in) + } + case "control": + if in.IsNull() { + in.Skip() + out.Control = nil + } else { + if out.Control == nil { + out.Control = new(ControlClientMessage) + } + (*out.Control).UnmarshalEasyJSON(in) + } + case "internal": + if in.IsNull() { + in.Skip() + out.Internal = nil + } else { + if out.Internal == nil { + out.Internal = new(InternalClientMessage) + } + (*out.Internal).UnmarshalEasyJSON(in) + } + case "transient": + if in.IsNull() { + in.Skip() + out.TransientData = nil + } else { + if out.TransientData == nil { + out.TransientData = new(TransientDataClientMessage) + } + (*out.TransientData).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling41(out *jwriter.Writer, in ClientMessage) { + out.RawByte('{') + first := true + _ = first + if in.Id != "" { + const prefix string = ",\"id\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.Id)) + } + { + const prefix string = ",\"type\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Type)) + } + if in.Hello != nil { + const prefix string = ",\"hello\":" + out.RawString(prefix) + (*in.Hello).MarshalEasyJSON(out) + } + if in.Bye != nil { + const prefix string = ",\"bye\":" + out.RawString(prefix) + (*in.Bye).MarshalEasyJSON(out) + } + if in.Room != nil { + const prefix string = ",\"room\":" + out.RawString(prefix) + (*in.Room).MarshalEasyJSON(out) + } + if in.Message != nil { + const prefix string = ",\"message\":" + out.RawString(prefix) + (*in.Message).MarshalEasyJSON(out) + } + if in.Control != nil { + const prefix string = ",\"control\":" + out.RawString(prefix) + (*in.Control).MarshalEasyJSON(out) + } + if in.Internal != nil { + const prefix string = ",\"internal\":" + out.RawString(prefix) + (*in.Internal).MarshalEasyJSON(out) + } + if in.TransientData != nil { + const prefix string = ",\"transient\":" + out.RawString(prefix) + (*in.TransientData).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling41(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling41(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling41(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling41(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling42(in *jlexer.Lexer, out *ByeServerMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "reason": + out.Reason = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling42(out *jwriter.Writer, in ByeServerMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"reason\":" + out.RawString(prefix[1:]) + out.String(string(in.Reason)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ByeServerMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling42(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ByeServerMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling42(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ByeServerMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling42(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ByeServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling42(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling43(in *jlexer.Lexer, out *ByeClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling43(out *jwriter.Writer, in ByeClientMessage) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ByeClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling43(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ByeClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling43(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ByeClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling43(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ByeClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling43(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling44(in *jlexer.Lexer, out *AnswerOfferMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "to": + out.To = string(in.String()) + case "from": + out.From = string(in.String()) + case "type": + out.Type = string(in.String()) + case "roomType": + out.RoomType = string(in.String()) + case "payload": + if in.IsNull() { + in.Skip() + } else { + in.Delim('{') + out.Payload = make(map[string]interface{}) + for !in.IsDelim('}') { + key := string(in.String()) + in.WantColon() + var v42 interface{} + if m, ok := v42.(easyjson.Unmarshaler); ok { + m.UnmarshalEasyJSON(in) + } else if m, ok := v42.(json.Unmarshaler); ok { + _ = m.UnmarshalJSON(in.Raw()) + } else { + v42 = in.Interface() + } + (out.Payload)[key] = v42 + in.WantComma() + } + in.Delim('}') + } + case "sid": + out.Sid = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling44(out *jwriter.Writer, in AnswerOfferMessage) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"to\":" + out.RawString(prefix[1:]) + out.String(string(in.To)) + } + { + const prefix string = ",\"from\":" + out.RawString(prefix) + out.String(string(in.From)) + } + { + const prefix string = ",\"type\":" + out.RawString(prefix) + out.String(string(in.Type)) + } + { + const prefix string = ",\"roomType\":" + out.RawString(prefix) + out.String(string(in.RoomType)) + } + { + const prefix string = ",\"payload\":" + out.RawString(prefix) + if in.Payload == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + out.RawString(`null`) + } else { + out.RawByte('{') + v43First := true + for v43Name, v43Value := range in.Payload { + if v43First { + v43First = false + } else { + out.RawByte(',') + } + out.String(string(v43Name)) + out.RawByte(':') + if m, ok := v43Value.(easyjson.Marshaler); ok { + m.MarshalEasyJSON(out) + } else if m, ok := v43Value.(json.Marshaler); ok { + out.Raw(m.MarshalJSON()) + } else { + out.Raw(json.Marshal(v43Value)) + } + } + out.RawByte('}') + } + } + if in.Sid != "" { + const prefix string = ",\"sid\":" + out.RawString(prefix) + out.String(string(in.Sid)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AnswerOfferMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling44(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AnswerOfferMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling44(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AnswerOfferMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling44(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AnswerOfferMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling44(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling45(in *jlexer.Lexer, out *AddSessionOptions) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "actorId": + out.ActorId = string(in.String()) + case "actorType": + out.ActorType = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling45(out *jwriter.Writer, in AddSessionOptions) { + out.RawByte('{') + first := true + _ = first + if in.ActorId != "" { + const prefix string = ",\"actorId\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.ActorId)) + } + if in.ActorType != "" { + const prefix string = ",\"actorType\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.ActorType)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddSessionOptions) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling45(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddSessionOptions) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling45(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddSessionOptions) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling45(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddSessionOptions) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling45(l, v) +} +func easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling46(in *jlexer.Lexer, out *AddSessionInternalClientMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userid": + out.UserId = string(in.String()) + case "user": + if data := in.Raw(); in.Ok() { + in.AddError((out.User).UnmarshalJSON(data)) + } + case "flags": + out.Flags = uint32(in.Uint32()) + case "incall": + if in.IsNull() { + in.Skip() + out.InCall = nil + } else { + if out.InCall == nil { + out.InCall = new(int) + } + *out.InCall = int(in.Int()) + } + case "options": + if in.IsNull() { + in.Skip() + out.Options = nil + } else { + if out.Options == nil { + out.Options = new(AddSessionOptions) + } + (*out.Options).UnmarshalEasyJSON(in) + } + case "sessionid": + out.SessionId = string(in.String()) + case "roomid": + out.RoomId = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling46(out *jwriter.Writer, in AddSessionInternalClientMessage) { + out.RawByte('{') + first := true + _ = first + if in.UserId != "" { + const prefix string = ",\"userid\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.UserId)) + } + if len(in.User) != 0 { + const prefix string = ",\"user\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Raw((in.User).MarshalJSON()) + } + if in.Flags != 0 { + const prefix string = ",\"flags\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Uint32(uint32(in.Flags)) + } + if in.InCall != nil { + const prefix string = ",\"incall\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Int(int(*in.InCall)) + } + if in.Options != nil { + const prefix string = ",\"options\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + (*in.Options).MarshalEasyJSON(out) + } + { + const prefix string = ",\"sessionid\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.SessionId)) + } + { + const prefix string = ",\"roomid\":" + out.RawString(prefix) + out.String(string(in.RoomId)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddSessionInternalClientMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling46(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddSessionInternalClientMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjson29f189fbEncodeGithubComStrukturagNextcloudSpreedSignaling46(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddSessionInternalClientMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling46(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddSessionInternalClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson29f189fbDecodeGithubComStrukturagNextcloudSpreedSignaling46(l, v) +} diff --git a/docker/proxy/Dockerfile b/docker/proxy/Dockerfile index c658671d..ee4e4816 100644 --- a/docker/proxy/Dockerfile +++ b/docker/proxy/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /workdir COPY . . RUN touch /.dockerenv && \ - apk add --no-cache bash git build-base protobuf && \ + apk add --no-cache bash git make && \ GOOS=${TARGETOS} GOARCH=${TARGETARCH} make proxy FROM alpine:3 diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 24a2b66f..815e4e53 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /workdir COPY . . RUN touch /.dockerenv && \ - apk add --no-cache bash git build-base protobuf && \ + apk add --no-cache bash git make && \ GOOS=${TARGETOS} GOARCH=${TARGETARCH} make server FROM alpine:3 diff --git a/grpc_backend.pb.go b/grpc_backend.pb.go new file mode 100644 index 00000000..2c4035b1 --- /dev/null +++ b/grpc_backend.pb.go @@ -0,0 +1,238 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v3.6.1 +// source: grpc_backend.proto + +package signaling + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetSessionCountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *GetSessionCountRequest) Reset() { + *x = GetSessionCountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_backend_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSessionCountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionCountRequest) ProtoMessage() {} + +func (x *GetSessionCountRequest) ProtoReflect() protoreflect.Message { + mi := &file_grpc_backend_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 GetSessionCountRequest.ProtoReflect.Descriptor instead. +func (*GetSessionCountRequest) Descriptor() ([]byte, []int) { + return file_grpc_backend_proto_rawDescGZIP(), []int{0} +} + +func (x *GetSessionCountRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type GetSessionCountReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *GetSessionCountReply) Reset() { + *x = GetSessionCountReply{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_backend_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSessionCountReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionCountReply) ProtoMessage() {} + +func (x *GetSessionCountReply) ProtoReflect() protoreflect.Message { + mi := &file_grpc_backend_proto_msgTypes[1] + 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 GetSessionCountReply.ProtoReflect.Descriptor instead. +func (*GetSessionCountReply) Descriptor() ([]byte, []int) { + return file_grpc_backend_proto_rawDescGZIP(), []int{1} +} + +func (x *GetSessionCountReply) GetCount() uint32 { + if x != nil { + return x.Count + } + return 0 +} + +var File_grpc_backend_proto protoreflect.FileDescriptor + +var file_grpc_backend_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x22, + 0x2a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2c, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x65, 0x0a, 0x0a, 0x52, 0x70, 0x63, + 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x57, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, + 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x6b, 0x74, 0x75, 0x72, 0x61, 0x67, 0x2f, 0x6e, 0x65, 0x78, 0x74, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x73, 0x70, 0x72, 0x65, 0x65, 0x64, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_grpc_backend_proto_rawDescOnce sync.Once + file_grpc_backend_proto_rawDescData = file_grpc_backend_proto_rawDesc +) + +func file_grpc_backend_proto_rawDescGZIP() []byte { + file_grpc_backend_proto_rawDescOnce.Do(func() { + file_grpc_backend_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_backend_proto_rawDescData) + }) + return file_grpc_backend_proto_rawDescData +} + +var file_grpc_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_grpc_backend_proto_goTypes = []any{ + (*GetSessionCountRequest)(nil), // 0: signaling.GetSessionCountRequest + (*GetSessionCountReply)(nil), // 1: signaling.GetSessionCountReply +} +var file_grpc_backend_proto_depIdxs = []int32{ + 0, // 0: signaling.RpcBackend.GetSessionCount:input_type -> signaling.GetSessionCountRequest + 1, // 1: signaling.RpcBackend.GetSessionCount:output_type -> signaling.GetSessionCountReply + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_grpc_backend_proto_init() } +func file_grpc_backend_proto_init() { + if File_grpc_backend_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_grpc_backend_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetSessionCountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_backend_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetSessionCountReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_grpc_backend_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_grpc_backend_proto_goTypes, + DependencyIndexes: file_grpc_backend_proto_depIdxs, + MessageInfos: file_grpc_backend_proto_msgTypes, + }.Build() + File_grpc_backend_proto = out.File + file_grpc_backend_proto_rawDesc = nil + file_grpc_backend_proto_goTypes = nil + file_grpc_backend_proto_depIdxs = nil +} diff --git a/grpc_backend_grpc.pb.go b/grpc_backend_grpc.pb.go new file mode 100644 index 00000000..bf04e6ce --- /dev/null +++ b/grpc_backend_grpc.pb.go @@ -0,0 +1,131 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc v3.6.1 +// source: grpc_backend.proto + +package signaling + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + RpcBackend_GetSessionCount_FullMethodName = "/signaling.RpcBackend/GetSessionCount" +) + +// RpcBackendClient is the client API for RpcBackend service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RpcBackendClient interface { + GetSessionCount(ctx context.Context, in *GetSessionCountRequest, opts ...grpc.CallOption) (*GetSessionCountReply, error) +} + +type rpcBackendClient struct { + cc grpc.ClientConnInterface +} + +func NewRpcBackendClient(cc grpc.ClientConnInterface) RpcBackendClient { + return &rpcBackendClient{cc} +} + +func (c *rpcBackendClient) GetSessionCount(ctx context.Context, in *GetSessionCountRequest, opts ...grpc.CallOption) (*GetSessionCountReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSessionCountReply) + err := c.cc.Invoke(ctx, RpcBackend_GetSessionCount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RpcBackendServer is the server API for RpcBackend service. +// All implementations must embed UnimplementedRpcBackendServer +// for forward compatibility +type RpcBackendServer interface { + GetSessionCount(context.Context, *GetSessionCountRequest) (*GetSessionCountReply, error) + mustEmbedUnimplementedRpcBackendServer() +} + +// UnimplementedRpcBackendServer must be embedded to have forward compatible implementations. +type UnimplementedRpcBackendServer struct { +} + +func (UnimplementedRpcBackendServer) GetSessionCount(context.Context, *GetSessionCountRequest) (*GetSessionCountReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSessionCount not implemented") +} +func (UnimplementedRpcBackendServer) mustEmbedUnimplementedRpcBackendServer() {} + +// UnsafeRpcBackendServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RpcBackendServer will +// result in compilation errors. +type UnsafeRpcBackendServer interface { + mustEmbedUnimplementedRpcBackendServer() +} + +func RegisterRpcBackendServer(s grpc.ServiceRegistrar, srv RpcBackendServer) { + s.RegisterService(&RpcBackend_ServiceDesc, srv) +} + +func _RpcBackend_GetSessionCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSessionCountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RpcBackendServer).GetSessionCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RpcBackend_GetSessionCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RpcBackendServer).GetSessionCount(ctx, req.(*GetSessionCountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RpcBackend_ServiceDesc is the grpc.ServiceDesc for RpcBackend service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RpcBackend_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "signaling.RpcBackend", + HandlerType: (*RpcBackendServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSessionCount", + Handler: _RpcBackend_GetSessionCount_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "grpc_backend.proto", +} diff --git a/grpc_internal.pb.go b/grpc_internal.pb.go new file mode 100644 index 00000000..875fb59f --- /dev/null +++ b/grpc_internal.pb.go @@ -0,0 +1,227 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v3.6.1 +// source: grpc_internal.proto + +package signaling + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetServerIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetServerIdRequest) Reset() { + *x = GetServerIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_internal_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServerIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServerIdRequest) ProtoMessage() {} + +func (x *GetServerIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_grpc_internal_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 GetServerIdRequest.ProtoReflect.Descriptor instead. +func (*GetServerIdRequest) Descriptor() ([]byte, []int) { + return file_grpc_internal_proto_rawDescGZIP(), []int{0} +} + +type GetServerIdReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"` +} + +func (x *GetServerIdReply) Reset() { + *x = GetServerIdReply{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_internal_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServerIdReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServerIdReply) ProtoMessage() {} + +func (x *GetServerIdReply) ProtoReflect() protoreflect.Message { + mi := &file_grpc_internal_proto_msgTypes[1] + 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 GetServerIdReply.ProtoReflect.Descriptor instead. +func (*GetServerIdReply) Descriptor() ([]byte, []int) { + return file_grpc_internal_proto_rawDescGZIP(), []int{1} +} + +func (x *GetServerIdReply) GetServerId() string { + if x != nil { + return x.ServerId + } + return "" +} + +var File_grpc_internal_proto protoreflect.FileDescriptor + +var file_grpc_internal_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x32, 0x5a, 0x0a, 0x0b, 0x52, 0x70, 0x63, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x74, 0x72, 0x75, 0x6b, 0x74, 0x75, 0x72, 0x61, 0x67, 0x2f, 0x6e, 0x65, 0x78, 0x74, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x73, 0x70, 0x72, 0x65, 0x65, 0x64, 0x2d, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_grpc_internal_proto_rawDescOnce sync.Once + file_grpc_internal_proto_rawDescData = file_grpc_internal_proto_rawDesc +) + +func file_grpc_internal_proto_rawDescGZIP() []byte { + file_grpc_internal_proto_rawDescOnce.Do(func() { + file_grpc_internal_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_internal_proto_rawDescData) + }) + return file_grpc_internal_proto_rawDescData +} + +var file_grpc_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_grpc_internal_proto_goTypes = []any{ + (*GetServerIdRequest)(nil), // 0: signaling.GetServerIdRequest + (*GetServerIdReply)(nil), // 1: signaling.GetServerIdReply +} +var file_grpc_internal_proto_depIdxs = []int32{ + 0, // 0: signaling.RpcInternal.GetServerId:input_type -> signaling.GetServerIdRequest + 1, // 1: signaling.RpcInternal.GetServerId:output_type -> signaling.GetServerIdReply + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_grpc_internal_proto_init() } +func file_grpc_internal_proto_init() { + if File_grpc_internal_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_grpc_internal_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetServerIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_internal_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetServerIdReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_grpc_internal_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_grpc_internal_proto_goTypes, + DependencyIndexes: file_grpc_internal_proto_depIdxs, + MessageInfos: file_grpc_internal_proto_msgTypes, + }.Build() + File_grpc_internal_proto = out.File + file_grpc_internal_proto_rawDesc = nil + file_grpc_internal_proto_goTypes = nil + file_grpc_internal_proto_depIdxs = nil +} diff --git a/grpc_internal_grpc.pb.go b/grpc_internal_grpc.pb.go new file mode 100644 index 00000000..3c38982c --- /dev/null +++ b/grpc_internal_grpc.pb.go @@ -0,0 +1,131 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc v3.6.1 +// source: grpc_internal.proto + +package signaling + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + RpcInternal_GetServerId_FullMethodName = "/signaling.RpcInternal/GetServerId" +) + +// RpcInternalClient is the client API for RpcInternal service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RpcInternalClient interface { + GetServerId(ctx context.Context, in *GetServerIdRequest, opts ...grpc.CallOption) (*GetServerIdReply, error) +} + +type rpcInternalClient struct { + cc grpc.ClientConnInterface +} + +func NewRpcInternalClient(cc grpc.ClientConnInterface) RpcInternalClient { + return &rpcInternalClient{cc} +} + +func (c *rpcInternalClient) GetServerId(ctx context.Context, in *GetServerIdRequest, opts ...grpc.CallOption) (*GetServerIdReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetServerIdReply) + err := c.cc.Invoke(ctx, RpcInternal_GetServerId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RpcInternalServer is the server API for RpcInternal service. +// All implementations must embed UnimplementedRpcInternalServer +// for forward compatibility +type RpcInternalServer interface { + GetServerId(context.Context, *GetServerIdRequest) (*GetServerIdReply, error) + mustEmbedUnimplementedRpcInternalServer() +} + +// UnimplementedRpcInternalServer must be embedded to have forward compatible implementations. +type UnimplementedRpcInternalServer struct { +} + +func (UnimplementedRpcInternalServer) GetServerId(context.Context, *GetServerIdRequest) (*GetServerIdReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServerId not implemented") +} +func (UnimplementedRpcInternalServer) mustEmbedUnimplementedRpcInternalServer() {} + +// UnsafeRpcInternalServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RpcInternalServer will +// result in compilation errors. +type UnsafeRpcInternalServer interface { + mustEmbedUnimplementedRpcInternalServer() +} + +func RegisterRpcInternalServer(s grpc.ServiceRegistrar, srv RpcInternalServer) { + s.RegisterService(&RpcInternal_ServiceDesc, srv) +} + +func _RpcInternal_GetServerId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServerIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RpcInternalServer).GetServerId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RpcInternal_GetServerId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RpcInternalServer).GetServerId(ctx, req.(*GetServerIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RpcInternal_ServiceDesc is the grpc.ServiceDesc for RpcInternal service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RpcInternal_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "signaling.RpcInternal", + HandlerType: (*RpcInternalServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetServerId", + Handler: _RpcInternal_GetServerId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "grpc_internal.proto", +} diff --git a/grpc_mcu.pb.go b/grpc_mcu.pb.go new file mode 100644 index 00000000..a1c95fae --- /dev/null +++ b/grpc_mcu.pb.go @@ -0,0 +1,267 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v3.6.1 +// source: grpc_mcu.proto + +package signaling + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPublisherIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"` + StreamType string `protobuf:"bytes,2,opt,name=streamType,proto3" json:"streamType,omitempty"` +} + +func (x *GetPublisherIdRequest) Reset() { + *x = GetPublisherIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_mcu_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPublisherIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublisherIdRequest) ProtoMessage() {} + +func (x *GetPublisherIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_grpc_mcu_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 GetPublisherIdRequest.ProtoReflect.Descriptor instead. +func (*GetPublisherIdRequest) Descriptor() ([]byte, []int) { + return file_grpc_mcu_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPublisherIdRequest) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *GetPublisherIdRequest) GetStreamType() string { + if x != nil { + return x.StreamType + } + return "" +} + +type GetPublisherIdReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublisherId string `protobuf:"bytes,1,opt,name=publisherId,proto3" json:"publisherId,omitempty"` + ProxyUrl string `protobuf:"bytes,2,opt,name=proxyUrl,proto3" json:"proxyUrl,omitempty"` + Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` +} + +func (x *GetPublisherIdReply) Reset() { + *x = GetPublisherIdReply{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_mcu_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPublisherIdReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublisherIdReply) ProtoMessage() {} + +func (x *GetPublisherIdReply) ProtoReflect() protoreflect.Message { + mi := &file_grpc_mcu_proto_msgTypes[1] + 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 GetPublisherIdReply.ProtoReflect.Descriptor instead. +func (*GetPublisherIdReply) Descriptor() ([]byte, []int) { + return file_grpc_mcu_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPublisherIdReply) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *GetPublisherIdReply) GetProxyUrl() string { + if x != nil { + return x.ProxyUrl + } + return "" +} + +func (x *GetPublisherIdReply) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +var File_grpc_mcu_proto protoreflect.FileDescriptor + +var file_grpc_mcu_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x63, 0x75, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x55, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x32, 0x5e, 0x0a, 0x06, 0x52, 0x70, 0x63, 0x4d, 0x63, + 0x75, 0x12, 0x54, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x6b, 0x74, 0x75, 0x72, 0x61, 0x67, + 0x2f, 0x6e, 0x65, 0x78, 0x74, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x73, 0x70, 0x72, 0x65, 0x65, + 0x64, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_grpc_mcu_proto_rawDescOnce sync.Once + file_grpc_mcu_proto_rawDescData = file_grpc_mcu_proto_rawDesc +) + +func file_grpc_mcu_proto_rawDescGZIP() []byte { + file_grpc_mcu_proto_rawDescOnce.Do(func() { + file_grpc_mcu_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_mcu_proto_rawDescData) + }) + return file_grpc_mcu_proto_rawDescData +} + +var file_grpc_mcu_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_grpc_mcu_proto_goTypes = []any{ + (*GetPublisherIdRequest)(nil), // 0: signaling.GetPublisherIdRequest + (*GetPublisherIdReply)(nil), // 1: signaling.GetPublisherIdReply +} +var file_grpc_mcu_proto_depIdxs = []int32{ + 0, // 0: signaling.RpcMcu.GetPublisherId:input_type -> signaling.GetPublisherIdRequest + 1, // 1: signaling.RpcMcu.GetPublisherId:output_type -> signaling.GetPublisherIdReply + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_grpc_mcu_proto_init() } +func file_grpc_mcu_proto_init() { + if File_grpc_mcu_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_grpc_mcu_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetPublisherIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_mcu_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetPublisherIdReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_grpc_mcu_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_grpc_mcu_proto_goTypes, + DependencyIndexes: file_grpc_mcu_proto_depIdxs, + MessageInfos: file_grpc_mcu_proto_msgTypes, + }.Build() + File_grpc_mcu_proto = out.File + file_grpc_mcu_proto_rawDesc = nil + file_grpc_mcu_proto_goTypes = nil + file_grpc_mcu_proto_depIdxs = nil +} diff --git a/grpc_mcu_grpc.pb.go b/grpc_mcu_grpc.pb.go new file mode 100644 index 00000000..1c98afaf --- /dev/null +++ b/grpc_mcu_grpc.pb.go @@ -0,0 +1,131 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc v3.6.1 +// source: grpc_mcu.proto + +package signaling + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + RpcMcu_GetPublisherId_FullMethodName = "/signaling.RpcMcu/GetPublisherId" +) + +// RpcMcuClient is the client API for RpcMcu service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RpcMcuClient interface { + GetPublisherId(ctx context.Context, in *GetPublisherIdRequest, opts ...grpc.CallOption) (*GetPublisherIdReply, error) +} + +type rpcMcuClient struct { + cc grpc.ClientConnInterface +} + +func NewRpcMcuClient(cc grpc.ClientConnInterface) RpcMcuClient { + return &rpcMcuClient{cc} +} + +func (c *rpcMcuClient) GetPublisherId(ctx context.Context, in *GetPublisherIdRequest, opts ...grpc.CallOption) (*GetPublisherIdReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPublisherIdReply) + err := c.cc.Invoke(ctx, RpcMcu_GetPublisherId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RpcMcuServer is the server API for RpcMcu service. +// All implementations must embed UnimplementedRpcMcuServer +// for forward compatibility +type RpcMcuServer interface { + GetPublisherId(context.Context, *GetPublisherIdRequest) (*GetPublisherIdReply, error) + mustEmbedUnimplementedRpcMcuServer() +} + +// UnimplementedRpcMcuServer must be embedded to have forward compatible implementations. +type UnimplementedRpcMcuServer struct { +} + +func (UnimplementedRpcMcuServer) GetPublisherId(context.Context, *GetPublisherIdRequest) (*GetPublisherIdReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPublisherId not implemented") +} +func (UnimplementedRpcMcuServer) mustEmbedUnimplementedRpcMcuServer() {} + +// UnsafeRpcMcuServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RpcMcuServer will +// result in compilation errors. +type UnsafeRpcMcuServer interface { + mustEmbedUnimplementedRpcMcuServer() +} + +func RegisterRpcMcuServer(s grpc.ServiceRegistrar, srv RpcMcuServer) { + s.RegisterService(&RpcMcu_ServiceDesc, srv) +} + +func _RpcMcu_GetPublisherId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublisherIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RpcMcuServer).GetPublisherId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RpcMcu_GetPublisherId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RpcMcuServer).GetPublisherId(ctx, req.(*GetPublisherIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RpcMcu_ServiceDesc is the grpc.ServiceDesc for RpcMcu service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RpcMcu_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "signaling.RpcMcu", + HandlerType: (*RpcMcuServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPublisherId", + Handler: _RpcMcu_GetPublisherId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "grpc_mcu.proto", +} diff --git a/grpc_sessions.pb.go b/grpc_sessions.pb.go new file mode 100644 index 00000000..357843de --- /dev/null +++ b/grpc_sessions.pb.go @@ -0,0 +1,673 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v3.6.1 +// source: grpc_sessions.proto + +package signaling + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LookupResumeIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResumeId string `protobuf:"bytes,1,opt,name=resumeId,proto3" json:"resumeId,omitempty"` +} + +func (x *LookupResumeIdRequest) Reset() { + *x = LookupResumeIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupResumeIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupResumeIdRequest) ProtoMessage() {} + +func (x *LookupResumeIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_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 LookupResumeIdRequest.ProtoReflect.Descriptor instead. +func (*LookupResumeIdRequest) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{0} +} + +func (x *LookupResumeIdRequest) GetResumeId() string { + if x != nil { + return x.ResumeId + } + return "" +} + +type LookupResumeIdReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"` +} + +func (x *LookupResumeIdReply) Reset() { + *x = LookupResumeIdReply{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupResumeIdReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupResumeIdReply) ProtoMessage() {} + +func (x *LookupResumeIdReply) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_proto_msgTypes[1] + 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 LookupResumeIdReply.ProtoReflect.Descriptor instead. +func (*LookupResumeIdReply) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{1} +} + +func (x *LookupResumeIdReply) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type LookupSessionIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoomSessionId string `protobuf:"bytes,1,opt,name=roomSessionId,proto3" json:"roomSessionId,omitempty"` + // Optional: set if the session should be disconnected with a given reason. + DisconnectReason string `protobuf:"bytes,2,opt,name=disconnectReason,proto3" json:"disconnectReason,omitempty"` +} + +func (x *LookupSessionIdRequest) Reset() { + *x = LookupSessionIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupSessionIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupSessionIdRequest) ProtoMessage() {} + +func (x *LookupSessionIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_proto_msgTypes[2] + 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 LookupSessionIdRequest.ProtoReflect.Descriptor instead. +func (*LookupSessionIdRequest) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{2} +} + +func (x *LookupSessionIdRequest) GetRoomSessionId() string { + if x != nil { + return x.RoomSessionId + } + return "" +} + +func (x *LookupSessionIdRequest) GetDisconnectReason() string { + if x != nil { + return x.DisconnectReason + } + return "" +} + +type LookupSessionIdReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"` +} + +func (x *LookupSessionIdReply) Reset() { + *x = LookupSessionIdReply{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupSessionIdReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupSessionIdReply) ProtoMessage() {} + +func (x *LookupSessionIdReply) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_proto_msgTypes[3] + 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 LookupSessionIdReply.ProtoReflect.Descriptor instead. +func (*LookupSessionIdReply) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{3} +} + +func (x *LookupSessionIdReply) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type IsSessionInCallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"` + RoomId string `protobuf:"bytes,2,opt,name=roomId,proto3" json:"roomId,omitempty"` + BackendUrl string `protobuf:"bytes,3,opt,name=backendUrl,proto3" json:"backendUrl,omitempty"` +} + +func (x *IsSessionInCallRequest) Reset() { + *x = IsSessionInCallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSessionInCallRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSessionInCallRequest) ProtoMessage() {} + +func (x *IsSessionInCallRequest) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_proto_msgTypes[4] + 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 IsSessionInCallRequest.ProtoReflect.Descriptor instead. +func (*IsSessionInCallRequest) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{4} +} + +func (x *IsSessionInCallRequest) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *IsSessionInCallRequest) GetRoomId() string { + if x != nil { + return x.RoomId + } + return "" +} + +func (x *IsSessionInCallRequest) GetBackendUrl() string { + if x != nil { + return x.BackendUrl + } + return "" +} + +type IsSessionInCallReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InCall bool `protobuf:"varint,1,opt,name=inCall,proto3" json:"inCall,omitempty"` +} + +func (x *IsSessionInCallReply) Reset() { + *x = IsSessionInCallReply{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSessionInCallReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSessionInCallReply) ProtoMessage() {} + +func (x *IsSessionInCallReply) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_proto_msgTypes[5] + 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 IsSessionInCallReply.ProtoReflect.Descriptor instead. +func (*IsSessionInCallReply) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{5} +} + +func (x *IsSessionInCallReply) GetInCall() bool { + if x != nil { + return x.InCall + } + return false +} + +type ClientSessionMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ClientSessionMessage) Reset() { + *x = ClientSessionMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientSessionMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientSessionMessage) ProtoMessage() {} + +func (x *ClientSessionMessage) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_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 ClientSessionMessage.ProtoReflect.Descriptor instead. +func (*ClientSessionMessage) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{6} +} + +func (x *ClientSessionMessage) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +type ServerSessionMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ServerSessionMessage) Reset() { + *x = ServerSessionMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_sessions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerSessionMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerSessionMessage) ProtoMessage() {} + +func (x *ServerSessionMessage) ProtoReflect() protoreflect.Message { + mi := &file_grpc_sessions_proto_msgTypes[7] + 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 ServerSessionMessage.ProtoReflect.Descriptor instead. +func (*ServerSessionMessage) Descriptor() ([]byte, []int) { + return file_grpc_sessions_proto_rawDescGZIP(), []int{7} +} + +func (x *ServerSessionMessage) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +var File_grpc_sessions_proto protoreflect.FileDescriptor + +var file_grpc_sessions_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x22, 0x33, 0x0a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6a, 0x0a, 0x16, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x6f, 0x6f, 0x6d, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x6f, 0x6f, + 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x14, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6e, 0x0a, 0x16, + 0x49, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x72, 0x6c, 0x22, 0x2e, 0x0a, 0x14, + 0x49, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x22, 0x30, 0x0a, 0x14, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x30, + 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x32, 0xed, 0x02, 0x0a, 0x0b, 0x52, 0x70, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x54, 0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x49, 0x64, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x2e, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x0f, 0x49, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x43, 0x61, + 0x6c, 0x6c, 0x12, 0x21, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x49, + 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x49, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1f, 0x2e, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, + 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x6b, 0x74, 0x75, 0x72, 0x61, 0x67, 0x2f, 0x6e, 0x65, 0x78, 0x74, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x73, 0x70, 0x72, 0x65, 0x65, 0x64, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_grpc_sessions_proto_rawDescOnce sync.Once + file_grpc_sessions_proto_rawDescData = file_grpc_sessions_proto_rawDesc +) + +func file_grpc_sessions_proto_rawDescGZIP() []byte { + file_grpc_sessions_proto_rawDescOnce.Do(func() { + file_grpc_sessions_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_sessions_proto_rawDescData) + }) + return file_grpc_sessions_proto_rawDescData +} + +var file_grpc_sessions_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_grpc_sessions_proto_goTypes = []any{ + (*LookupResumeIdRequest)(nil), // 0: signaling.LookupResumeIdRequest + (*LookupResumeIdReply)(nil), // 1: signaling.LookupResumeIdReply + (*LookupSessionIdRequest)(nil), // 2: signaling.LookupSessionIdRequest + (*LookupSessionIdReply)(nil), // 3: signaling.LookupSessionIdReply + (*IsSessionInCallRequest)(nil), // 4: signaling.IsSessionInCallRequest + (*IsSessionInCallReply)(nil), // 5: signaling.IsSessionInCallReply + (*ClientSessionMessage)(nil), // 6: signaling.ClientSessionMessage + (*ServerSessionMessage)(nil), // 7: signaling.ServerSessionMessage +} +var file_grpc_sessions_proto_depIdxs = []int32{ + 0, // 0: signaling.RpcSessions.LookupResumeId:input_type -> signaling.LookupResumeIdRequest + 2, // 1: signaling.RpcSessions.LookupSessionId:input_type -> signaling.LookupSessionIdRequest + 4, // 2: signaling.RpcSessions.IsSessionInCall:input_type -> signaling.IsSessionInCallRequest + 6, // 3: signaling.RpcSessions.ProxySession:input_type -> signaling.ClientSessionMessage + 1, // 4: signaling.RpcSessions.LookupResumeId:output_type -> signaling.LookupResumeIdReply + 3, // 5: signaling.RpcSessions.LookupSessionId:output_type -> signaling.LookupSessionIdReply + 5, // 6: signaling.RpcSessions.IsSessionInCall:output_type -> signaling.IsSessionInCallReply + 7, // 7: signaling.RpcSessions.ProxySession:output_type -> signaling.ServerSessionMessage + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_grpc_sessions_proto_init() } +func file_grpc_sessions_proto_init() { + if File_grpc_sessions_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_grpc_sessions_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*LookupResumeIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*LookupResumeIdReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*LookupSessionIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*LookupSessionIdReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*IsSessionInCallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*IsSessionInCallReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ClientSessionMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_sessions_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ServerSessionMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_grpc_sessions_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_grpc_sessions_proto_goTypes, + DependencyIndexes: file_grpc_sessions_proto_depIdxs, + MessageInfos: file_grpc_sessions_proto_msgTypes, + }.Build() + File_grpc_sessions_proto = out.File + file_grpc_sessions_proto_rawDesc = nil + file_grpc_sessions_proto_goTypes = nil + file_grpc_sessions_proto_depIdxs = nil +} diff --git a/grpc_sessions_grpc.pb.go b/grpc_sessions_grpc.pb.go new file mode 100644 index 00000000..a95804e9 --- /dev/null +++ b/grpc_sessions_grpc.pb.go @@ -0,0 +1,278 @@ +//* +// Standalone signaling server for the Nextcloud Spreed app. +// Copyright (C) 2022 struktur AG +// +// @author Joachim Bauch +// +// @license GNU AGPL version 3 or any later version +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc v3.6.1 +// source: grpc_sessions.proto + +package signaling + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + RpcSessions_LookupResumeId_FullMethodName = "/signaling.RpcSessions/LookupResumeId" + RpcSessions_LookupSessionId_FullMethodName = "/signaling.RpcSessions/LookupSessionId" + RpcSessions_IsSessionInCall_FullMethodName = "/signaling.RpcSessions/IsSessionInCall" + RpcSessions_ProxySession_FullMethodName = "/signaling.RpcSessions/ProxySession" +) + +// RpcSessionsClient is the client API for RpcSessions service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RpcSessionsClient interface { + LookupResumeId(ctx context.Context, in *LookupResumeIdRequest, opts ...grpc.CallOption) (*LookupResumeIdReply, error) + LookupSessionId(ctx context.Context, in *LookupSessionIdRequest, opts ...grpc.CallOption) (*LookupSessionIdReply, error) + IsSessionInCall(ctx context.Context, in *IsSessionInCallRequest, opts ...grpc.CallOption) (*IsSessionInCallReply, error) + ProxySession(ctx context.Context, opts ...grpc.CallOption) (RpcSessions_ProxySessionClient, error) +} + +type rpcSessionsClient struct { + cc grpc.ClientConnInterface +} + +func NewRpcSessionsClient(cc grpc.ClientConnInterface) RpcSessionsClient { + return &rpcSessionsClient{cc} +} + +func (c *rpcSessionsClient) LookupResumeId(ctx context.Context, in *LookupResumeIdRequest, opts ...grpc.CallOption) (*LookupResumeIdReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LookupResumeIdReply) + err := c.cc.Invoke(ctx, RpcSessions_LookupResumeId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rpcSessionsClient) LookupSessionId(ctx context.Context, in *LookupSessionIdRequest, opts ...grpc.CallOption) (*LookupSessionIdReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LookupSessionIdReply) + err := c.cc.Invoke(ctx, RpcSessions_LookupSessionId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rpcSessionsClient) IsSessionInCall(ctx context.Context, in *IsSessionInCallRequest, opts ...grpc.CallOption) (*IsSessionInCallReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsSessionInCallReply) + err := c.cc.Invoke(ctx, RpcSessions_IsSessionInCall_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rpcSessionsClient) ProxySession(ctx context.Context, opts ...grpc.CallOption) (RpcSessions_ProxySessionClient, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &RpcSessions_ServiceDesc.Streams[0], RpcSessions_ProxySession_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &rpcSessionsProxySessionClient{ClientStream: stream} + return x, nil +} + +type RpcSessions_ProxySessionClient interface { + Send(*ClientSessionMessage) error + Recv() (*ServerSessionMessage, error) + grpc.ClientStream +} + +type rpcSessionsProxySessionClient struct { + grpc.ClientStream +} + +func (x *rpcSessionsProxySessionClient) Send(m *ClientSessionMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *rpcSessionsProxySessionClient) Recv() (*ServerSessionMessage, error) { + m := new(ServerSessionMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RpcSessionsServer is the server API for RpcSessions service. +// All implementations must embed UnimplementedRpcSessionsServer +// for forward compatibility +type RpcSessionsServer interface { + LookupResumeId(context.Context, *LookupResumeIdRequest) (*LookupResumeIdReply, error) + LookupSessionId(context.Context, *LookupSessionIdRequest) (*LookupSessionIdReply, error) + IsSessionInCall(context.Context, *IsSessionInCallRequest) (*IsSessionInCallReply, error) + ProxySession(RpcSessions_ProxySessionServer) error + mustEmbedUnimplementedRpcSessionsServer() +} + +// UnimplementedRpcSessionsServer must be embedded to have forward compatible implementations. +type UnimplementedRpcSessionsServer struct { +} + +func (UnimplementedRpcSessionsServer) LookupResumeId(context.Context, *LookupResumeIdRequest) (*LookupResumeIdReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupResumeId not implemented") +} +func (UnimplementedRpcSessionsServer) LookupSessionId(context.Context, *LookupSessionIdRequest) (*LookupSessionIdReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupSessionId not implemented") +} +func (UnimplementedRpcSessionsServer) IsSessionInCall(context.Context, *IsSessionInCallRequest) (*IsSessionInCallReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsSessionInCall not implemented") +} +func (UnimplementedRpcSessionsServer) ProxySession(RpcSessions_ProxySessionServer) error { + return status.Errorf(codes.Unimplemented, "method ProxySession not implemented") +} +func (UnimplementedRpcSessionsServer) mustEmbedUnimplementedRpcSessionsServer() {} + +// UnsafeRpcSessionsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RpcSessionsServer will +// result in compilation errors. +type UnsafeRpcSessionsServer interface { + mustEmbedUnimplementedRpcSessionsServer() +} + +func RegisterRpcSessionsServer(s grpc.ServiceRegistrar, srv RpcSessionsServer) { + s.RegisterService(&RpcSessions_ServiceDesc, srv) +} + +func _RpcSessions_LookupResumeId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupResumeIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RpcSessionsServer).LookupResumeId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RpcSessions_LookupResumeId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RpcSessionsServer).LookupResumeId(ctx, req.(*LookupResumeIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RpcSessions_LookupSessionId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupSessionIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RpcSessionsServer).LookupSessionId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RpcSessions_LookupSessionId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RpcSessionsServer).LookupSessionId(ctx, req.(*LookupSessionIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RpcSessions_IsSessionInCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsSessionInCallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RpcSessionsServer).IsSessionInCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RpcSessions_IsSessionInCall_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RpcSessionsServer).IsSessionInCall(ctx, req.(*IsSessionInCallRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RpcSessions_ProxySession_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RpcSessionsServer).ProxySession(&rpcSessionsProxySessionServer{ServerStream: stream}) +} + +type RpcSessions_ProxySessionServer interface { + Send(*ServerSessionMessage) error + Recv() (*ClientSessionMessage, error) + grpc.ServerStream +} + +type rpcSessionsProxySessionServer struct { + grpc.ServerStream +} + +func (x *rpcSessionsProxySessionServer) Send(m *ServerSessionMessage) error { + return x.ServerStream.SendMsg(m) +} + +func (x *rpcSessionsProxySessionServer) Recv() (*ClientSessionMessage, error) { + m := new(ClientSessionMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RpcSessions_ServiceDesc is the grpc.ServiceDesc for RpcSessions service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RpcSessions_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "signaling.RpcSessions", + HandlerType: (*RpcSessionsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "LookupResumeId", + Handler: _RpcSessions_LookupResumeId_Handler, + }, + { + MethodName: "LookupSessionId", + Handler: _RpcSessions_LookupSessionId_Handler, + }, + { + MethodName: "IsSessionInCall", + Handler: _RpcSessions_IsSessionInCall_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "ProxySession", + Handler: _RpcSessions_ProxySession_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "grpc_sessions.proto", +} From 05d50451c8b995ee0f2820fbe0059fa35302566a Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 24 Jul 2024 14:42:14 +0200 Subject: [PATCH 2/2] Omit version numbers from .proto generated files to help with diff. --- Makefile | 2 ++ grpc_backend.pb.go | 3 --- grpc_backend_grpc.pb.go | 3 --- grpc_internal.pb.go | 3 --- grpc_internal_grpc.pb.go | 3 --- grpc_mcu.pb.go | 3 --- grpc_mcu_grpc.pb.go | 3 --- grpc_sessions.pb.go | 3 --- grpc_sessions_grpc.pb.go | 3 --- 9 files changed, 2 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 17f3072b..2d881b96 100644 --- a/Makefile +++ b/Makefile @@ -123,11 +123,13 @@ coverhtml: vet PATH="$(GODIR)":"$(GOPATHBIN)":$(PATH) protoc \ --go_out=. --go_opt=paths=source_relative \ $*.proto + sed -i -e '1h;2,$$H;$$!d;g' -re 's|// versions.+// source:|// source:|' $*.pb.go %_grpc.pb.go: %.proto $(GOPATHBIN)/protoc-gen-go $(GOPATHBIN)/protoc-gen-go-grpc PATH="$(GODIR)":"$(GOPATHBIN)":$(PATH) protoc \ --go-grpc_out=. --go-grpc_opt=paths=source_relative \ $*.proto + sed -i -e '1h;2,$$H;$$!d;g' -re 's|// versions.+// source:|// source:|' $*_grpc.pb.go common: $(EASYJSON_GO_FILES) $(PROTO_GO_FILES) diff --git a/grpc_backend.pb.go b/grpc_backend.pb.go index 2c4035b1..9633cc0f 100644 --- a/grpc_backend.pb.go +++ b/grpc_backend.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.6.1 // source: grpc_backend.proto package signaling diff --git a/grpc_backend_grpc.pb.go b/grpc_backend_grpc.pb.go index bf04e6ce..e0801d86 100644 --- a/grpc_backend_grpc.pb.go +++ b/grpc_backend_grpc.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.6.1 // source: grpc_backend.proto package signaling diff --git a/grpc_internal.pb.go b/grpc_internal.pb.go index 875fb59f..a7b075f0 100644 --- a/grpc_internal.pb.go +++ b/grpc_internal.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.6.1 // source: grpc_internal.proto package signaling diff --git a/grpc_internal_grpc.pb.go b/grpc_internal_grpc.pb.go index 3c38982c..02b4c659 100644 --- a/grpc_internal_grpc.pb.go +++ b/grpc_internal_grpc.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.6.1 // source: grpc_internal.proto package signaling diff --git a/grpc_mcu.pb.go b/grpc_mcu.pb.go index a1c95fae..15f48339 100644 --- a/grpc_mcu.pb.go +++ b/grpc_mcu.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.6.1 // source: grpc_mcu.proto package signaling diff --git a/grpc_mcu_grpc.pb.go b/grpc_mcu_grpc.pb.go index 1c98afaf..8f8732fa 100644 --- a/grpc_mcu_grpc.pb.go +++ b/grpc_mcu_grpc.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.6.1 // source: grpc_mcu.proto package signaling diff --git a/grpc_sessions.pb.go b/grpc_sessions.pb.go index 357843de..1b26908d 100644 --- a/grpc_sessions.pb.go +++ b/grpc_sessions.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.6.1 // source: grpc_sessions.proto package signaling diff --git a/grpc_sessions_grpc.pb.go b/grpc_sessions_grpc.pb.go index a95804e9..2e4d47fe 100644 --- a/grpc_sessions_grpc.pb.go +++ b/grpc_sessions_grpc.pb.go @@ -20,9 +20,6 @@ // along with this program. If not, see . // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.6.1 // source: grpc_sessions.proto package signaling