From bfe71bcbd1c082279c836fc4f023265b0e4e1a5f Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Fri, 1 Sep 2023 17:47:47 +0700 Subject: [PATCH] Updating to 118.0.5983.1_11.8.144 definitions --- storage/easyjson.go | 132 ++++++++++++++++++++++++++++++++++++++++++-- storage/types.go | 13 ++++- 2 files changed, 137 insertions(+), 8 deletions(-) diff --git a/storage/easyjson.go b/storage/easyjson.go index 97a219a..0f04554 100644 --- a/storage/easyjson.go +++ b/storage/easyjson.go @@ -5146,6 +5146,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage61(in *jlexer.Lexer, o out.Expiry = int64(in.Int64()) case "eventReportWindow": out.EventReportWindow = int64(in.Int64()) + case "eventReportWindows": + if in.IsNull() { + in.Skip() + out.EventReportWindows = nil + } else { + if out.EventReportWindows == nil { + out.EventReportWindows = new(AttributionReportingEventReportWindows) + } + (*out.EventReportWindows).UnmarshalEasyJSON(in) + } case "aggregatableReportWindow": out.AggregatableReportWindow = int64(in.Int64()) case "type": @@ -5278,6 +5288,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage61(out *jwriter.Writer out.RawString(prefix) out.Int64(int64(in.EventReportWindow)) } + if in.EventReportWindows != nil { + const prefix string = ",\"eventReportWindows\":" + out.RawString(prefix) + (*in.EventReportWindows).MarshalEasyJSON(out) + } if in.AggregatableReportWindow != 0 { const prefix string = ",\"aggregatableReportWindow\":" out.RawString(prefix) @@ -5500,7 +5515,112 @@ func (v *AttributionReportingFilterDataEntry) UnmarshalJSON(data []byte) error { func (v *AttributionReportingFilterDataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage62(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(in *jlexer.Lexer, out *AttributionReportingAggregationKeysEntry) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(in *jlexer.Lexer, out *AttributionReportingEventReportWindows) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "start": + out.Start = int64(in.Int64()) + case "ends": + if in.IsNull() { + in.Skip() + out.Ends = nil + } else { + in.Delim('[') + if out.Ends == nil { + if !in.IsDelim(']') { + out.Ends = make([]int64, 0, 8) + } else { + out.Ends = []int64{} + } + } else { + out.Ends = (out.Ends)[:0] + } + for !in.IsDelim(']') { + var v46 int64 + v46 = int64(in.Int64()) + out.Ends = append(out.Ends, v46) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(out *jwriter.Writer, in AttributionReportingEventReportWindows) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"start\":" + out.RawString(prefix[1:]) + out.Int64(int64(in.Start)) + } + { + const prefix string = ",\"ends\":" + out.RawString(prefix) + if in.Ends == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v47, v48 := range in.Ends { + if v47 > 0 { + out.RawByte(',') + } + out.Int64(int64(v48)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AttributionReportingEventReportWindows) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AttributionReportingEventReportWindows) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AttributionReportingEventReportWindows) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AttributionReportingEventReportWindows) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage64(in *jlexer.Lexer, out *AttributionReportingAggregationKeysEntry) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5533,7 +5653,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(out *jwriter.Writer, in AttributionReportingAggregationKeysEntry) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage64(out *jwriter.Writer, in AttributionReportingAggregationKeysEntry) { out.RawByte('{') first := true _ = first @@ -5553,23 +5673,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v AttributionReportingAggregationKeysEntry) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage64(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AttributionReportingAggregationKeysEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage63(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage64(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AttributionReportingAggregationKeysEntry) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage64(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AttributionReportingAggregationKeysEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage63(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage64(l, v) } diff --git a/storage/types.go b/storage/types.go index 126b63f..37d7cae 100644 --- a/storage/types.go +++ b/storage/types.go @@ -495,13 +495,22 @@ type AttributionReportingAggregationKeysEntry struct { Value UnsignedInt128asBase16 `json:"value"` } +// AttributionReportingEventReportWindows [no description]. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-AttributionReportingEventReportWindows +type AttributionReportingEventReportWindows struct { + Start int64 `json:"start"` // duration in seconds + Ends []int64 `json:"ends"` // duration in seconds +} + // AttributionReportingSourceRegistration [no description]. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-AttributionReportingSourceRegistration type AttributionReportingSourceRegistration struct { Time *cdp.TimeSinceEpoch `json:"time"` - Expiry int64 `json:"expiry,omitempty"` // duration in seconds - EventReportWindow int64 `json:"eventReportWindow,omitempty"` // duration in seconds + Expiry int64 `json:"expiry,omitempty"` // duration in seconds + EventReportWindow int64 `json:"eventReportWindow,omitempty"` // eventReportWindow and eventReportWindows are mutually exclusive duration in seconds + EventReportWindows *AttributionReportingEventReportWindows `json:"eventReportWindows,omitempty"` AggregatableReportWindow int64 `json:"aggregatableReportWindow,omitempty"` // duration in seconds Type AttributionReportingSourceType `json:"type"` SourceOrigin string `json:"sourceOrigin"`