4071 lines
		
	
	
		
			86 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			4071 lines
		
	
	
		
			86 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
 | |
| 
 | |
| package events
 | |
| 
 | |
| 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 easyjson692db02bDecodeGithubComMailgunMailgunGoEvents(in *jlexer.Lexer, out *Unsubscribed) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v1 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v1).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v1)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "mailing-list":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.MailingList).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "recipient-domain":
 | |
| 			out.RecipientDomain = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v2 string
 | |
| 					v2 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v2)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "ip":
 | |
| 			out.IP = string(in.String())
 | |
| 		case "client-info":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.ClientInfo).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "geolocation":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.GeoLocation).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = 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.UserVariables)[key] = v3
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents(out *jwriter.Writer, in Unsubscribed) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v4, v5 := range in.Campaigns {
 | |
| 				if v4 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v5).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"mailing-list\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.MailingList).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient-domain\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.RecipientDomain))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v6, v7 := range in.Tags {
 | |
| 				if v6 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v7))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"ip\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.IP))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"client-info\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.ClientInfo).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"geolocation\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.GeoLocation).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v8First := true
 | |
| 			for v8Name, v8Value := range in.UserVariables {
 | |
| 				if v8First {
 | |
| 					v8First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v8Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v8Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v8Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v8Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Unsubscribed) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Unsubscribed) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Unsubscribed) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Unsubscribed) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents1(in *jlexer.Lexer, out *Stored) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "storage":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Storage).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "flags":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Flags).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v9 string
 | |
| 					v9 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v9)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v10 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v10).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v10)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v11 interface{}
 | |
| 					if m, ok := v11.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v11.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v11 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v11
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents1(out *jwriter.Writer, in Stored) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"storage\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Storage).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"flags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Flags).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v12, v13 := range in.Tags {
 | |
| 				if v12 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v13))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v14, v15 := range in.Campaigns {
 | |
| 				if v14 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v15).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v16First := true
 | |
| 			for v16Name, v16Value := range in.UserVariables {
 | |
| 				if v16First {
 | |
| 					v16First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v16Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v16Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v16Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v16Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Stored) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents1(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Stored) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents1(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Stored) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents1(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Stored) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents1(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents2(in *jlexer.Lexer, out *Response) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "items":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Items = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Items == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Items = make([]RawJSON, 0, 2)
 | |
| 					} else {
 | |
| 						out.Items = []RawJSON{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Items = (out.Items)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v17 RawJSON
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v17).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Items = append(out.Items, v17)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "paging":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Paging).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents2(out *jwriter.Writer, in Response) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"items\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Items == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v18, v19 := range in.Items {
 | |
| 				if v18 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Base64Bytes(v19)
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"paging\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Paging).MarshalJSON())
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Response) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents2(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Response) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents2(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Response) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents2(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents2(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents3(in *jlexer.Lexer, out *Rejected) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "reject":
 | |
| 			easyjson692db02bDecode(in, &out.Reject)
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "storage":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Storage).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "flags":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Flags).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v22 string
 | |
| 					v22 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v22)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v23 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v23).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v23)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v24 interface{}
 | |
| 					if m, ok := v24.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v24.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v24 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v24
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents3(out *jwriter.Writer, in Rejected) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"reject\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		easyjson692db02bEncode(out, in.Reject)
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"storage\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Storage).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"flags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Flags).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v25, v26 := range in.Tags {
 | |
| 				if v25 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v26))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v27, v28 := range in.Campaigns {
 | |
| 				if v27 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v28).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v29First := true
 | |
| 			for v29Name, v29Value := range in.UserVariables {
 | |
| 				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('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Rejected) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents3(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Rejected) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents3(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Rejected) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents3(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Rejected) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents3(l, v)
 | |
| }
 | |
| func easyjson692db02bDecode(in *jlexer.Lexer, out *struct {
 | |
| 	Reason      string `json:"reason"`
 | |
| 	Description string `json:"description"`
 | |
| }) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "reason":
 | |
| 			out.Reason = string(in.String())
 | |
| 		case "description":
 | |
| 			out.Description = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncode(out *jwriter.Writer, in struct {
 | |
| 	Reason      string `json:"reason"`
 | |
| 	Description string `json:"description"`
 | |
| }) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"reason\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Reason))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"description\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Description))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents4(in *jlexer.Lexer, out *Paging) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "first":
 | |
| 			out.First = string(in.String())
 | |
| 		case "next":
 | |
| 			out.Next = string(in.String())
 | |
| 		case "previous":
 | |
| 			out.Previous = string(in.String())
 | |
| 		case "last":
 | |
| 			out.Last = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents4(out *jwriter.Writer, in Paging) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	if in.First != "" {
 | |
| 		const prefix string = ",\"first\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.First))
 | |
| 	}
 | |
| 	if in.Next != "" {
 | |
| 		const prefix string = ",\"next\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Next))
 | |
| 	}
 | |
| 	if in.Previous != "" {
 | |
| 		const prefix string = ",\"previous\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Previous))
 | |
| 	}
 | |
| 	if in.Last != "" {
 | |
| 		const prefix string = ",\"last\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Last))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Paging) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents4(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Paging) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents4(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Paging) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents4(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Paging) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents4(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents5(in *jlexer.Lexer, out *Opened) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v30 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v30).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v30)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "mailing-list":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.MailingList).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "recipient-domain":
 | |
| 			out.RecipientDomain = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v31 string
 | |
| 					v31 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v31)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "ip":
 | |
| 			out.IP = string(in.String())
 | |
| 		case "client-info":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.ClientInfo).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "geolocation":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.GeoLocation).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v32 interface{}
 | |
| 					if m, ok := v32.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v32.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v32 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v32
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents5(out *jwriter.Writer, in Opened) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v33, v34 := range in.Campaigns {
 | |
| 				if v33 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v34).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"mailing-list\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.MailingList).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient-domain\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.RecipientDomain))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v35, v36 := range in.Tags {
 | |
| 				if v35 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v36))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"ip\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.IP))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"client-info\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.ClientInfo).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"geolocation\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.GeoLocation).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v37First := true
 | |
| 			for v37Name, v37Value := range in.UserVariables {
 | |
| 				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('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Opened) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents5(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Opened) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents5(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Opened) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents5(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Opened) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents5(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents6(in *jlexer.Lexer, out *MailingListMember) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "Subscribed":
 | |
| 			out.Subscribed = bool(in.Bool())
 | |
| 		case "Address":
 | |
| 			out.Address = string(in.String())
 | |
| 		case "Name":
 | |
| 			out.Name = string(in.String())
 | |
| 		case "Vars":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Vars = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Vars == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Vars = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Vars = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Vars = (out.Vars)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v38 string
 | |
| 					v38 = string(in.String())
 | |
| 					out.Vars = append(out.Vars, v38)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents6(out *jwriter.Writer, in MailingListMember) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"Subscribed\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Bool(bool(in.Subscribed))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"Address\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Address))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"Name\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"Vars\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Vars == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v39, v40 := range in.Vars {
 | |
| 				if v39 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v40))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v MailingListMember) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents6(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v MailingListMember) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents6(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *MailingListMember) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents6(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *MailingListMember) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents6(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents7(in *jlexer.Lexer, out *MailingListError) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "Message":
 | |
| 			out.Message = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents7(out *jwriter.Writer, in MailingListError) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"Message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Message))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v MailingListError) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents7(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v MailingListError) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents7(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *MailingListError) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents7(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *MailingListError) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents7(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents8(in *jlexer.Lexer, out *ListUploaded) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "mailing-list":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.MailingList).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "is-upsert":
 | |
| 			out.IsUpsert = bool(in.Bool())
 | |
| 		case "format":
 | |
| 			out.Format = string(in.String())
 | |
| 		case "upserted-count":
 | |
| 			out.UpsertedCount = int(in.Int())
 | |
| 		case "failed-count":
 | |
| 			out.FailedCount = int(in.Int())
 | |
| 		case "member":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Member).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "subscribed":
 | |
| 			out.Subscribed = bool(in.Bool())
 | |
| 		case "task-id":
 | |
| 			out.TaskID = string(in.String())
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents8(out *jwriter.Writer, in ListUploaded) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"mailing-list\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.MailingList).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"is-upsert\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Bool(bool(in.IsUpsert))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"format\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Format))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"upserted-count\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Int(int(in.UpsertedCount))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"failed-count\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Int(int(in.FailedCount))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"member\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Member).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"subscribed\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Bool(bool(in.Subscribed))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"task-id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.TaskID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v ListUploaded) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents8(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v ListUploaded) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents8(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *ListUploaded) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents8(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *ListUploaded) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents8(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents9(in *jlexer.Lexer, out *ListMemberUploaded) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "mailing-list":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.MailingList).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "member":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Member).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "task-id":
 | |
| 			out.TaskID = string(in.String())
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents9(out *jwriter.Writer, in ListMemberUploaded) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"mailing-list\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.MailingList).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"member\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Member).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"task-id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.TaskID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v ListMemberUploaded) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents9(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v ListMemberUploaded) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents9(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *ListMemberUploaded) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents9(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *ListMemberUploaded) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents9(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents10(in *jlexer.Lexer, out *ListMemberUploadError) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "mailing-list":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.MailingList).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "task-id":
 | |
| 			out.TaskID = string(in.String())
 | |
| 		case "format":
 | |
| 			out.Format = string(in.String())
 | |
| 		case "member-description":
 | |
| 			out.MemberDescription = string(in.String())
 | |
| 		case "error":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Error).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents10(out *jwriter.Writer, in ListMemberUploadError) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"mailing-list\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.MailingList).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"task-id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.TaskID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"format\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Format))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"member-description\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.MemberDescription))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"error\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Error).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v ListMemberUploadError) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents10(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v ListMemberUploadError) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents10(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *ListMemberUploadError) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents10(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *ListMemberUploadError) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents10(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents11(in *jlexer.Lexer, out *Generic) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents11(out *jwriter.Writer, in Generic) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Generic) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents11(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Generic) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents11(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Generic) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents11(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Generic) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents11(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents12(in *jlexer.Lexer, out *Failed) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "envelope":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Envelope).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "flags":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Flags).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "recipient-domain":
 | |
| 			out.RecipientDomain = string(in.String())
 | |
| 		case "method":
 | |
| 			out.Method = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v41 string
 | |
| 					v41 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v41)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v42 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v42).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v42)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "delivery-status":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.DeliveryStatus).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "severity":
 | |
| 			out.Severity = string(in.String())
 | |
| 		case "reason":
 | |
| 			out.Reason = string(in.String())
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v43 interface{}
 | |
| 					if m, ok := v43.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v43.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v43 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v43
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents12(out *jwriter.Writer, in Failed) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"envelope\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Envelope).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"flags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Flags).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient-domain\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.RecipientDomain))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"method\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Method))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v44, v45 := range in.Tags {
 | |
| 				if v44 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v45))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v46, v47 := range in.Campaigns {
 | |
| 				if v46 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v47).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"delivery-status\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.DeliveryStatus).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"severity\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Severity))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"reason\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Reason))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v48First := true
 | |
| 			for v48Name, v48Value := range in.UserVariables {
 | |
| 				if v48First {
 | |
| 					v48First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v48Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v48Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v48Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v48Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Failed) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents12(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Failed) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents12(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Failed) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents12(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Failed) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents12(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents13(in *jlexer.Lexer, out *EventName) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents13(out *jwriter.Writer, in EventName) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v EventName) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents13(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v EventName) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents13(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *EventName) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents13(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *EventName) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents13(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents14(in *jlexer.Lexer, out *Delivered) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "envelope":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Envelope).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "flags":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Flags).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "recipient-domain":
 | |
| 			out.RecipientDomain = string(in.String())
 | |
| 		case "method":
 | |
| 			out.Method = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v49 string
 | |
| 					v49 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v49)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v50 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v50).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v50)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "delivery-status":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.DeliveryStatus).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v51 interface{}
 | |
| 					if m, ok := v51.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v51.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v51 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v51
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents14(out *jwriter.Writer, in Delivered) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"envelope\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Envelope).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"flags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Flags).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient-domain\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.RecipientDomain))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"method\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Method))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v52, v53 := range in.Tags {
 | |
| 				if v52 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v53))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v54, v55 := range in.Campaigns {
 | |
| 				if v54 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v55).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"delivery-status\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.DeliveryStatus).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v56First := true
 | |
| 			for v56Name, v56Value := range in.UserVariables {
 | |
| 				if v56First {
 | |
| 					v56First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v56Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v56Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v56Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v56Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Delivered) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents14(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Delivered) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents14(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Delivered) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents14(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Delivered) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents14(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents15(in *jlexer.Lexer, out *Complained) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v57 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v57).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v57)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v58 string
 | |
| 					v58 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v58)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v59 interface{}
 | |
| 					if m, ok := v59.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v59.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v59 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v59
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents15(out *jwriter.Writer, in Complained) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v60, v61 := range in.Campaigns {
 | |
| 				if v60 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v61).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v62, v63 := range in.Tags {
 | |
| 				if v62 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v63))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v64First := true
 | |
| 			for v64Name, v64Value := range in.UserVariables {
 | |
| 				if v64First {
 | |
| 					v64First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v64Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v64Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v64Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v64Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Complained) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents15(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Complained) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents15(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Complained) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents15(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Complained) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents15(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents16(in *jlexer.Lexer, out *Clicked) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "url":
 | |
| 			out.Url = string(in.String())
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v65 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v65).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v65)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "mailing-list":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.MailingList).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "recipient-domain":
 | |
| 			out.RecipientDomain = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v66 string
 | |
| 					v66 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v66)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "ip":
 | |
| 			out.IP = string(in.String())
 | |
| 		case "client-info":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.ClientInfo).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "geolocation":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.GeoLocation).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v67 interface{}
 | |
| 					if m, ok := v67.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v67.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v67 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v67
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents16(out *jwriter.Writer, in Clicked) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"url\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Url))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v68, v69 := range in.Campaigns {
 | |
| 				if v68 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v69).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"mailing-list\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.MailingList).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient-domain\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.RecipientDomain))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v70, v71 := range in.Tags {
 | |
| 				if v70 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v71))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"ip\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.IP))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"client-info\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.ClientInfo).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"geolocation\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.GeoLocation).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v72First := true
 | |
| 			for v72Name, v72Value := range in.UserVariables {
 | |
| 				if v72First {
 | |
| 					v72First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v72Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v72Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v72Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v72Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Clicked) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents16(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Clicked) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents16(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Clicked) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents16(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Clicked) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents16(l, v)
 | |
| }
 | |
| func easyjson692db02bDecodeGithubComMailgunMailgunGoEvents17(in *jlexer.Lexer, out *Accepted) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "envelope":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Envelope).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "message":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Message).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "flags":
 | |
| 			if data := in.Raw(); in.Ok() {
 | |
| 				in.AddError((out.Flags).UnmarshalJSON(data))
 | |
| 			}
 | |
| 		case "recipient":
 | |
| 			out.Recipient = string(in.String())
 | |
| 		case "recipient-domain":
 | |
| 			out.RecipientDomain = string(in.String())
 | |
| 		case "method":
 | |
| 			out.Method = string(in.String())
 | |
| 		case "originating-ip":
 | |
| 			out.OriginatingIP = string(in.String())
 | |
| 		case "tags":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Tags = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Tags == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Tags = make([]string, 0, 4)
 | |
| 					} else {
 | |
| 						out.Tags = []string{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Tags = (out.Tags)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v73 string
 | |
| 					v73 = string(in.String())
 | |
| 					out.Tags = append(out.Tags, v73)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "campaigns":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 				out.Campaigns = nil
 | |
| 			} else {
 | |
| 				in.Delim('[')
 | |
| 				if out.Campaigns == nil {
 | |
| 					if !in.IsDelim(']') {
 | |
| 						out.Campaigns = make([]Campaign, 0, 2)
 | |
| 					} else {
 | |
| 						out.Campaigns = []Campaign{}
 | |
| 					}
 | |
| 				} else {
 | |
| 					out.Campaigns = (out.Campaigns)[:0]
 | |
| 				}
 | |
| 				for !in.IsDelim(']') {
 | |
| 					var v74 Campaign
 | |
| 					if data := in.Raw(); in.Ok() {
 | |
| 						in.AddError((v74).UnmarshalJSON(data))
 | |
| 					}
 | |
| 					out.Campaigns = append(out.Campaigns, v74)
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim(']')
 | |
| 			}
 | |
| 		case "user-variables":
 | |
| 			if in.IsNull() {
 | |
| 				in.Skip()
 | |
| 			} else {
 | |
| 				in.Delim('{')
 | |
| 				if !in.IsDelim('}') {
 | |
| 					out.UserVariables = make(map[string]interface{})
 | |
| 				} else {
 | |
| 					out.UserVariables = nil
 | |
| 				}
 | |
| 				for !in.IsDelim('}') {
 | |
| 					key := string(in.String())
 | |
| 					in.WantColon()
 | |
| 					var v75 interface{}
 | |
| 					if m, ok := v75.(easyjson.Unmarshaler); ok {
 | |
| 						m.UnmarshalEasyJSON(in)
 | |
| 					} else if m, ok := v75.(json.Unmarshaler); ok {
 | |
| 						_ = m.UnmarshalJSON(in.Raw())
 | |
| 					} else {
 | |
| 						v75 = in.Interface()
 | |
| 					}
 | |
| 					(out.UserVariables)[key] = v75
 | |
| 					in.WantComma()
 | |
| 				}
 | |
| 				in.Delim('}')
 | |
| 			}
 | |
| 		case "timestamp":
 | |
| 			out.Timestamp = float64(in.Float64())
 | |
| 		case "id":
 | |
| 			out.ID = string(in.String())
 | |
| 		case "event":
 | |
| 			out.Name = string(in.String())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjson692db02bEncodeGithubComMailgunMailgunGoEvents17(out *jwriter.Writer, in Accepted) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	{
 | |
| 		const prefix string = ",\"envelope\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Envelope).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"message\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Message).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"flags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Raw((in.Flags).MarshalJSON())
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Recipient))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"recipient-domain\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.RecipientDomain))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"method\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Method))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"originating-ip\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.OriginatingIP))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"tags\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Tags == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v76, v77 := range in.Tags {
 | |
| 				if v76 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v77))
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"campaigns\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.Campaigns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
 | |
| 			out.RawString("null")
 | |
| 		} else {
 | |
| 			out.RawByte('[')
 | |
| 			for v78, v79 := range in.Campaigns {
 | |
| 				if v78 > 0 {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.Raw((v79).MarshalJSON())
 | |
| 			}
 | |
| 			out.RawByte(']')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"user-variables\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		if in.UserVariables == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
 | |
| 			out.RawString(`null`)
 | |
| 		} else {
 | |
| 			out.RawByte('{')
 | |
| 			v80First := true
 | |
| 			for v80Name, v80Value := range in.UserVariables {
 | |
| 				if v80First {
 | |
| 					v80First = false
 | |
| 				} else {
 | |
| 					out.RawByte(',')
 | |
| 				}
 | |
| 				out.String(string(v80Name))
 | |
| 				out.RawByte(':')
 | |
| 				if m, ok := v80Value.(easyjson.Marshaler); ok {
 | |
| 					m.MarshalEasyJSON(out)
 | |
| 				} else if m, ok := v80Value.(json.Marshaler); ok {
 | |
| 					out.Raw(m.MarshalJSON())
 | |
| 				} else {
 | |
| 					out.Raw(json.Marshal(v80Value))
 | |
| 				}
 | |
| 			}
 | |
| 			out.RawByte('}')
 | |
| 		}
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"timestamp\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.Float64(float64(in.Timestamp))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"id\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.ID))
 | |
| 	}
 | |
| 	{
 | |
| 		const prefix string = ",\"event\":"
 | |
| 		if first {
 | |
| 			first = false
 | |
| 			out.RawString(prefix[1:])
 | |
| 		} else {
 | |
| 			out.RawString(prefix)
 | |
| 		}
 | |
| 		out.String(string(in.Name))
 | |
| 	}
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v Accepted) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents17(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v Accepted) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents17(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *Accepted) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents17(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *Accepted) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents17(l, v)
 | |
| }
 |