package ads

// Code generated by cdproto-gen. DO NOT EDIT.

import (
	"github.com/chromedp/cdproto/cdp"
)

// AdFrameData ad frame data.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Ads#type-AdFrameData
type AdFrameData struct {
	FrameID       cdp.FrameID `json:"frameId"`                          // The DevTools frame token.
	InitialOrigin string      `json:"initialOrigin,omitempty,omitzero"` // The initial origin of the frame. To minimize the payload size, this is only sent once per frame.
	NetworkBytes  float64     `json:"networkBytes"`                     // The network bytes of the frame.
	CPUTime       float64     `json:"cpuTime"`                          // The CPU time of the frame, in milliseconds.
}

// AdMetrics ad metrics for a page.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Ads#type-AdMetrics
type AdMetrics struct {
	ViewportAdDensityByArea        int64          `json:"viewportAdDensityByArea"`        // The viewport ad density by area, represented as a percentage (an integer between 0 and 100).
	AverageViewportAdDensityByArea float64        `json:"averageViewportAdDensityByArea"` // The time-weighted average of the viewport ad density by area, measured across the duration of the page.
	ViewportAdCount                int64          `json:"viewportAdCount"`                // The number of ads currently visible within the viewport.
	AverageViewportAdCount         float64        `json:"averageViewportAdCount"`         // The time-weighted average of the viewport ad count, measured across the duration of the page.
	TotalAdCPUTime                 float64        `json:"totalAdCpuTime"`                 // The total ad CPU usage, in milliseconds.
	TotalAdNetworkBytes            float64        `json:"totalAdNetworkBytes"`            // The total ad network bytes.
	UpdateAdFrames                 []*AdFrameData `json:"updateAdFrames"`                 // The list of ad frames that have been updated since the last event.
	RemoveAdFrames                 []cdp.FrameID  `json:"removeAdFrames"`                 // The list of ad frame IDs that have been removed since the last event.
}
