// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. package signaling import ( json "encoding/json" _v5 "github.com/golang-jwt/jwt/v5" easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" api "github.com/strukturag/nextcloud-spreed-signaling/api" ) // 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() switch key { case "iss": if in.IsNull() { in.Skip() } else { out.Issuer = string(in.String()) } case "sub": if in.IsNull() { in.Skip() } else { out.Subject = string(in.String()) } case "aud": if in.IsNull() { in.Skip() } else { 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(_v5.NumericDate) } if in.IsNull() { in.Skip() } else { 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(_v5.NumericDate) } if in.IsNull() { in.Skip() } else { 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(_v5.NumericDate) } if in.IsNull() { in.Skip() } else { if data := in.Raw(); in.Ok() { in.AddError((*out.IssuedAt).UnmarshalJSON(data)) } } } case "jti": if in.IsNull() { in.Skip() } else { 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() switch key { case "id": if in.IsNull() { in.Skip() } else { out.Id = string(in.String()) } case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "error": if in.IsNull() { in.Skip() out.Error = nil } else { if out.Error == nil { out.Error = new(api.Error) } if in.IsNull() { in.Skip() } else { (*out.Error).UnmarshalEasyJSON(in) } } case "hello": if in.IsNull() { in.Skip() out.Hello = nil } else { if out.Hello == nil { out.Hello = new(HelloProxyServerMessage) } if in.IsNull() { in.Skip() } else { (*out.Hello).UnmarshalEasyJSON(in) } } case "bye": if in.IsNull() { in.Skip() out.Bye = nil } else { if out.Bye == nil { out.Bye = new(ByeProxyServerMessage) } if in.IsNull() { in.Skip() } else { (*out.Bye).UnmarshalEasyJSON(in) } } case "command": if in.IsNull() { in.Skip() out.Command = nil } else { if out.Command == nil { out.Command = new(CommandProxyServerMessage) } if in.IsNull() { in.Skip() } else { (*out.Command).UnmarshalEasyJSON(in) } } case "payload": if in.IsNull() { in.Skip() out.Payload = nil } else { if out.Payload == nil { out.Payload = new(PayloadProxyServerMessage) } if in.IsNull() { in.Skip() } else { (*out.Payload).UnmarshalEasyJSON(in) } } case "event": if in.IsNull() { in.Skip() out.Event = nil } else { if out.Event == nil { out.Event = new(EventProxyServerMessage) } if in.IsNull() { in.Skip() } else { (*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() switch key { case "address": if in.IsNull() { in.Skip() } else { 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() switch key { case "id": if in.IsNull() { in.Skip() } else { out.Id = string(in.String()) } case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "hello": if in.IsNull() { in.Skip() out.Hello = nil } else { if out.Hello == nil { out.Hello = new(HelloProxyClientMessage) } if in.IsNull() { in.Skip() } else { (*out.Hello).UnmarshalEasyJSON(in) } } case "bye": if in.IsNull() { in.Skip() out.Bye = nil } else { if out.Bye == nil { out.Bye = new(ByeProxyClientMessage) } if in.IsNull() { in.Skip() } else { (*out.Bye).UnmarshalEasyJSON(in) } } case "command": if in.IsNull() { in.Skip() out.Command = nil } else { if out.Command == nil { out.Command = new(CommandProxyClientMessage) } if in.IsNull() { in.Skip() } else { (*out.Command).UnmarshalEasyJSON(in) } } case "payload": if in.IsNull() { in.Skip() out.Payload = nil } else { if out.Payload == nil { out.Payload = new(PayloadProxyClientMessage) } if in.IsNull() { in.Skip() } else { (*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() switch key { case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "clientId": if in.IsNull() { in.Skip() } else { out.ClientId = string(in.String()) } case "payload": if in.IsNull() { in.Skip() } else { in.Delim('{') out.Payload = make(api.StringMap) 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() switch key { case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "clientId": if in.IsNull() { in.Skip() } else { out.ClientId = string(in.String()) } case "sid": if in.IsNull() { in.Skip() } else { out.Sid = string(in.String()) } case "payload": if in.IsNull() { in.Skip() } else { in.Delim('{') if !in.IsDelim('}') { out.Payload = make(api.StringMap) } 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 *NewPublisherSettings) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() switch key { case "bitrate": if in.IsNull() { in.Skip() } else { out.Bitrate = api.Bandwidth(in.Uint64()) } case "mediatypes": if in.IsNull() { in.Skip() } else { out.MediaTypes = MediaType(in.Int()) } case "audiocodec": if in.IsNull() { in.Skip() } else { out.AudioCodec = string(in.String()) } case "videocodec": if in.IsNull() { in.Skip() } else { out.VideoCodec = string(in.String()) } case "vp9_profile": if in.IsNull() { in.Skip() } else { out.VP9Profile = string(in.String()) } case "h264_profile": if in.IsNull() { in.Skip() } else { out.H264Profile = string(in.String()) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling6(out *jwriter.Writer, in NewPublisherSettings) { out.RawByte('{') first := true _ = first if in.Bitrate != 0 { const prefix string = ",\"bitrate\":" first = false out.RawString(prefix[1:]) out.Uint64(uint64(in.Bitrate)) } if in.MediaTypes != 0 { const prefix string = ",\"mediatypes\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.Int(int(in.MediaTypes)) } if in.AudioCodec != "" { const prefix string = ",\"audiocodec\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.String(string(in.AudioCodec)) } if in.VideoCodec != "" { const prefix string = ",\"videocodec\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.String(string(in.VideoCodec)) } if in.VP9Profile != "" { const prefix string = ",\"vp9_profile\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.String(string(in.VP9Profile)) } if in.H264Profile != "" { const prefix string = ",\"h264_profile\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.String(string(in.H264Profile)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v NewPublisherSettings) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v NewPublisherSettings) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *NewPublisherSettings) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *NewPublisherSettings) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling6(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling7(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() switch key { case "version": if in.IsNull() { in.Skip() } else { out.Version = string(in.String()) } case "sessionid": if in.IsNull() { in.Skip() } else { out.SessionId = api.PublicSessionId(in.String()) } case "server": if in.IsNull() { in.Skip() out.Server = nil } else { if out.Server == nil { out.Server = new(api.WelcomeServerMessage) } if in.IsNull() { in.Skip() } else { (*out.Server).UnmarshalEasyJSON(in) } } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling7(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{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v HelloProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *HelloProxyServerMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *HelloProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling7(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling8(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() switch key { case "version": if in.IsNull() { in.Skip() } else { out.Version = string(in.String()) } case "resumeid": if in.IsNull() { in.Skip() } else { out.ResumeId = api.PublicSessionId(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 if in.IsNull() { in.Skip() } else { v5 = string(in.String()) } out.Features = append(out.Features, v5) in.WantComma() } in.Delim(']') } case "token": if in.IsNull() { in.Skip() } else { out.Token = string(in.String()) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling8(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{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v HelloProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *HelloProxyClientMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *HelloProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling8(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling9(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() switch key { case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "clientId": if in.IsNull() { in.Skip() } else { out.ClientId = string(in.String()) } case "load": if in.IsNull() { in.Skip() } else { out.Load = uint64(in.Uint64()) } case "sid": if in.IsNull() { in.Skip() } else { out.Sid = string(in.String()) } case "bandwidth": if in.IsNull() { in.Skip() out.Bandwidth = nil } else { if out.Bandwidth == nil { out.Bandwidth = new(EventProxyServerBandwidth) } if in.IsNull() { in.Skip() } else { (*out.Bandwidth).UnmarshalEasyJSON(in) } } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling9(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.Uint64(uint64(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{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventProxyServerMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling9(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling10(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() switch key { case "incoming": if in.IsNull() { in.Skip() out.Incoming = nil } else { if out.Incoming == nil { out.Incoming = new(float64) } if in.IsNull() { in.Skip() } else { *out.Incoming = float64(in.Float64()) } } case "outgoing": if in.IsNull() { in.Skip() out.Outgoing = nil } else { if out.Outgoing == nil { out.Outgoing = new(float64) } if in.IsNull() { in.Skip() } else { *out.Outgoing = float64(in.Float64()) } } case "received": if in.IsNull() { in.Skip() } else { out.Received = api.Bandwidth(in.Uint64()) } case "sent": if in.IsNull() { in.Skip() } else { out.Sent = api.Bandwidth(in.Uint64()) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling10(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)) } if in.Received != 0 { const prefix string = ",\"received\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.Uint64(uint64(in.Received)) } if in.Sent != 0 { const prefix string = ",\"sent\":" if first { first = false out.RawString(prefix[1:]) } else { out.RawString(prefix) } out.Uint64(uint64(in.Sent)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v EventProxyServerBandwidth) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventProxyServerBandwidth) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventProxyServerBandwidth) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventProxyServerBandwidth) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling10(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling11(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() switch key { case "id": if in.IsNull() { in.Skip() } else { out.Id = string(in.String()) } case "sid": if in.IsNull() { in.Skip() } else { out.Sid = string(in.String()) } case "bitrate": if in.IsNull() { in.Skip() } else { out.Bitrate = api.Bandwidth(in.Uint64()) } 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 easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling12(in, &v8) out.Streams = append(out.Streams, v8) in.WantComma() } in.Delim(']') } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling11(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.Uint64(uint64(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(',') } easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling12(out, v10) } out.RawByte(']') } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v CommandProxyServerMessage) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CommandProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CommandProxyServerMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CommandProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling11(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling12(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() switch key { case "mid": if in.IsNull() { in.Skip() } else { out.Mid = string(in.String()) } case "mindex": if in.IsNull() { in.Skip() } else { out.Mindex = int(in.Int()) } case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "description": if in.IsNull() { in.Skip() } else { out.Description = string(in.String()) } case "disabled": if in.IsNull() { in.Skip() } else { out.Disabled = bool(in.Bool()) } case "codec": if in.IsNull() { in.Skip() } else { out.Codec = string(in.String()) } case "stereo": if in.IsNull() { in.Skip() } else { out.Stereo = bool(in.Bool()) } case "fec": if in.IsNull() { in.Skip() } else { out.Fec = bool(in.Bool()) } case "dtx": if in.IsNull() { in.Skip() } else { out.Dtx = bool(in.Bool()) } case "simulcast": if in.IsNull() { in.Skip() } else { out.Simulcast = bool(in.Bool()) } case "svc": if in.IsNull() { in.Skip() } else { out.Svc = bool(in.Bool()) } case "h264_profile": if in.IsNull() { in.Skip() } else { out.ProfileH264 = string(in.String()) } case "vp9_profile": if in.IsNull() { in.Skip() } else { out.ProfileVP9 = string(in.String()) } case "videoorient_ext_id": if in.IsNull() { in.Skip() } else { out.ExtIdVideoOrientation = int(in.Int()) } case "playoutdelay_ext_id": if in.IsNull() { in.Skip() } else { out.ExtIdPlayoutDelay = int(in.Int()) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling12(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 easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling13(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() switch key { case "type": if in.IsNull() { in.Skip() } else { out.Type = string(in.String()) } case "sid": if in.IsNull() { in.Skip() } else { out.Sid = string(in.String()) } case "streamType": if in.IsNull() { in.Skip() } else { out.StreamType = StreamType(in.String()) } case "publisherId": if in.IsNull() { in.Skip() } else { out.PublisherId = api.PublicSessionId(in.String()) } case "clientId": if in.IsNull() { in.Skip() } else { out.ClientId = string(in.String()) } case "bitrate": if in.IsNull() { in.Skip() } else { out.Bitrate = api.Bandwidth(in.Uint64()) } case "mediatypes": if in.IsNull() { in.Skip() } else { out.MediaTypes = MediaType(in.Int()) } case "publisherSettings": if in.IsNull() { in.Skip() out.PublisherSettings = nil } else { if out.PublisherSettings == nil { out.PublisherSettings = new(NewPublisherSettings) } if in.IsNull() { in.Skip() } else { (*out.PublisherSettings).UnmarshalEasyJSON(in) } } case "remoteUrl": if in.IsNull() { in.Skip() } else { out.RemoteUrl = string(in.String()) } case "remoteToken": if in.IsNull() { in.Skip() } else { out.RemoteToken = string(in.String()) } case "hostname": if in.IsNull() { in.Skip() } else { out.Hostname = string(in.String()) } case "port": if in.IsNull() { in.Skip() } else { out.Port = int(in.Int()) } case "rtcpPort": if in.IsNull() { in.Skip() } else { out.RtcpPort = int(in.Int()) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling13(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.Uint64(uint64(in.Bitrate)) } if in.MediaTypes != 0 { const prefix string = ",\"mediatypes\":" out.RawString(prefix) out.Int(int(in.MediaTypes)) } if in.PublisherSettings != nil { const prefix string = ",\"publisherSettings\":" out.RawString(prefix) (*in.PublisherSettings).MarshalEasyJSON(out) } 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{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling13(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CommandProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling13(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CommandProxyClientMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling13(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CommandProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling13(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling14(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() switch key { case "reason": if in.IsNull() { in.Skip() } else { out.Reason = string(in.String()) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling14(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{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ByeProxyServerMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ByeProxyServerMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ByeProxyServerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling14(l, v) } func easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling15(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() switch key { default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling15(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{} easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ByeProxyClientMessage) MarshalEasyJSON(w *jwriter.Writer) { easyjson1c8542dbEncodeGithubComStrukturagNextcloudSpreedSignaling15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ByeProxyClientMessage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling15(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ByeProxyClientMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson1c8542dbDecodeGithubComStrukturagNextcloudSpreedSignaling15(l, v) }