package browser

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

import (
	

	
	
	
)

// WindowID [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-WindowID
type WindowID int64

// Int64 returns the WindowID as int64 value.
func ( WindowID) () int64 {
	return int64()
}

// WindowState the state of the browser window.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-WindowState
type WindowState string

// String returns the WindowState as string value.
func ( WindowState) () string {
	return string()
}

// WindowState values.
const (
	WindowStateNormal     WindowState = "normal"
	WindowStateMinimized  WindowState = "minimized"
	WindowStateMaximized  WindowState = "maximized"
	WindowStateFullscreen WindowState = "fullscreen"
)

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( WindowState) ( *jwriter.Writer) {
	.String(string())
}

// MarshalJSON satisfies json.Marshaler.
func ( WindowState) () ([]byte, error) {
	return easyjson.Marshal()
}

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *WindowState) ( *jlexer.Lexer) {
	 := .String()
	switch WindowState() {
	case WindowStateNormal:
		* = WindowStateNormal
	case WindowStateMinimized:
		* = WindowStateMinimized
	case WindowStateMaximized:
		* = WindowStateMaximized
	case WindowStateFullscreen:
		* = WindowStateFullscreen

	default:
		.AddError(fmt.Errorf("unknown WindowState value: %v", ))
	}
}

// UnmarshalJSON satisfies json.Unmarshaler.
func ( *WindowState) ( []byte) error {
	return easyjson.Unmarshal(, )
}

// Bounds browser window bounds information.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Bounds
type Bounds struct {
	Left        int64       `json:"left,omitempty"`        // The offset from the left edge of the screen to the window in pixels.
	Top         int64       `json:"top,omitempty"`         // The offset from the top edge of the screen to the window in pixels.
	Width       int64       `json:"width,omitempty"`       // The window width in pixels.
	Height      int64       `json:"height,omitempty"`      // The window height in pixels.
	WindowState WindowState `json:"windowState,omitempty"` // The window state. Default to normal.
}

// PermissionType [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionType
type PermissionType string

// String returns the PermissionType as string value.
func ( PermissionType) () string {
	return string()
}

// PermissionType values.
const (
	PermissionTypeAccessibilityEvents      PermissionType = "accessibilityEvents"
	PermissionTypeAudioCapture             PermissionType = "audioCapture"
	PermissionTypeBackgroundSync           PermissionType = "backgroundSync"
	PermissionTypeBackgroundFetch          PermissionType = "backgroundFetch"
	PermissionTypeClipboardReadWrite       PermissionType = "clipboardReadWrite"
	PermissionTypeClipboardSanitizedWrite  PermissionType = "clipboardSanitizedWrite"
	PermissionTypeDisplayCapture           PermissionType = "displayCapture"
	PermissionTypeDurableStorage           PermissionType = "durableStorage"
	PermissionTypeFlash                    PermissionType = "flash"
	PermissionTypeGeolocation              PermissionType = "geolocation"
	PermissionTypeIdleDetection            PermissionType = "idleDetection"
	PermissionTypeLocalFonts               PermissionType = "localFonts"
	PermissionTypeMidi                     PermissionType = "midi"
	PermissionTypeMidiSysex                PermissionType = "midiSysex"
	PermissionTypeNfc                      PermissionType = "nfc"
	PermissionTypeNotifications            PermissionType = "notifications"
	PermissionTypePaymentHandler           PermissionType = "paymentHandler"
	PermissionTypePeriodicBackgroundSync   PermissionType = "periodicBackgroundSync"
	PermissionTypeProtectedMediaIdentifier PermissionType = "protectedMediaIdentifier"
	PermissionTypeSensors                  PermissionType = "sensors"
	PermissionTypeStorageAccess            PermissionType = "storageAccess"
	PermissionTypeTopLevelStorageAccess    PermissionType = "topLevelStorageAccess"
	PermissionTypeVideoCapture             PermissionType = "videoCapture"
	PermissionTypeVideoCapturePanTiltZoom  PermissionType = "videoCapturePanTiltZoom"
	PermissionTypeWakeLockScreen           PermissionType = "wakeLockScreen"
	PermissionTypeWakeLockSystem           PermissionType = "wakeLockSystem"
	PermissionTypeWindowManagement         PermissionType = "windowManagement"
)

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( PermissionType) ( *jwriter.Writer) {
	.String(string())
}

// MarshalJSON satisfies json.Marshaler.
func ( PermissionType) () ([]byte, error) {
	return easyjson.Marshal()
}

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *PermissionType) ( *jlexer.Lexer) {
	 := .String()
	switch PermissionType() {
	case PermissionTypeAccessibilityEvents:
		* = PermissionTypeAccessibilityEvents
	case PermissionTypeAudioCapture:
		* = PermissionTypeAudioCapture
	case PermissionTypeBackgroundSync:
		* = PermissionTypeBackgroundSync
	case PermissionTypeBackgroundFetch:
		* = PermissionTypeBackgroundFetch
	case PermissionTypeClipboardReadWrite:
		* = PermissionTypeClipboardReadWrite
	case PermissionTypeClipboardSanitizedWrite:
		* = PermissionTypeClipboardSanitizedWrite
	case PermissionTypeDisplayCapture:
		* = PermissionTypeDisplayCapture
	case PermissionTypeDurableStorage:
		* = PermissionTypeDurableStorage
	case PermissionTypeFlash:
		* = PermissionTypeFlash
	case PermissionTypeGeolocation:
		* = PermissionTypeGeolocation
	case PermissionTypeIdleDetection:
		* = PermissionTypeIdleDetection
	case PermissionTypeLocalFonts:
		* = PermissionTypeLocalFonts
	case PermissionTypeMidi:
		* = PermissionTypeMidi
	case PermissionTypeMidiSysex:
		* = PermissionTypeMidiSysex
	case PermissionTypeNfc:
		* = PermissionTypeNfc
	case PermissionTypeNotifications:
		* = PermissionTypeNotifications
	case PermissionTypePaymentHandler:
		* = PermissionTypePaymentHandler
	case PermissionTypePeriodicBackgroundSync:
		* = PermissionTypePeriodicBackgroundSync
	case PermissionTypeProtectedMediaIdentifier:
		* = PermissionTypeProtectedMediaIdentifier
	case PermissionTypeSensors:
		* = PermissionTypeSensors
	case PermissionTypeStorageAccess:
		* = PermissionTypeStorageAccess
	case PermissionTypeTopLevelStorageAccess:
		* = PermissionTypeTopLevelStorageAccess
	case PermissionTypeVideoCapture:
		* = PermissionTypeVideoCapture
	case PermissionTypeVideoCapturePanTiltZoom:
		* = PermissionTypeVideoCapturePanTiltZoom
	case PermissionTypeWakeLockScreen:
		* = PermissionTypeWakeLockScreen
	case PermissionTypeWakeLockSystem:
		* = PermissionTypeWakeLockSystem
	case PermissionTypeWindowManagement:
		* = PermissionTypeWindowManagement

	default:
		.AddError(fmt.Errorf("unknown PermissionType value: %v", ))
	}
}

// UnmarshalJSON satisfies json.Unmarshaler.
func ( *PermissionType) ( []byte) error {
	return easyjson.Unmarshal(, )
}

// PermissionSetting [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionSetting
type PermissionSetting string

// String returns the PermissionSetting as string value.
func ( PermissionSetting) () string {
	return string()
}

// PermissionSetting values.
const (
	PermissionSettingGranted PermissionSetting = "granted"
	PermissionSettingDenied  PermissionSetting = "denied"
	PermissionSettingPrompt  PermissionSetting = "prompt"
)

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( PermissionSetting) ( *jwriter.Writer) {
	.String(string())
}

// MarshalJSON satisfies json.Marshaler.
func ( PermissionSetting) () ([]byte, error) {
	return easyjson.Marshal()
}

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *PermissionSetting) ( *jlexer.Lexer) {
	 := .String()
	switch PermissionSetting() {
	case PermissionSettingGranted:
		* = PermissionSettingGranted
	case PermissionSettingDenied:
		* = PermissionSettingDenied
	case PermissionSettingPrompt:
		* = PermissionSettingPrompt

	default:
		.AddError(fmt.Errorf("unknown PermissionSetting value: %v", ))
	}
}

// UnmarshalJSON satisfies json.Unmarshaler.
func ( *PermissionSetting) ( []byte) error {
	return easyjson.Unmarshal(, )
}

// PermissionDescriptor definition of PermissionDescriptor defined in the
// Permissions API:
// https://w3c.github.io/permissions/#dictdef-permissiondescriptor.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionDescriptor
type PermissionDescriptor struct {
	Name                     string `json:"name"`                               // Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
	Sysex                    bool   `json:"sysex,omitempty"`                    // For "midi" permission, may also specify sysex control.
	UserVisibleOnly          bool   `json:"userVisibleOnly,omitempty"`          // For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
	AllowWithoutSanitization bool   `json:"allowWithoutSanitization,omitempty"` // For "clipboard" permission, may specify allowWithoutSanitization.
	PanTiltZoom              bool   `json:"panTiltZoom,omitempty"`              // For "camera" permission, may specify panTiltZoom.
}

// CommandID browser command ids used by executeBrowserCommand.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-BrowserCommandId
type CommandID string

// String returns the CommandID as string value.
func ( CommandID) () string {
	return string()
}

// CommandID values.
const (
	CommandIDOpenTabSearch  CommandID = "openTabSearch"
	CommandIDCloseTabSearch CommandID = "closeTabSearch"
)

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( CommandID) ( *jwriter.Writer) {
	.String(string())
}

// MarshalJSON satisfies json.Marshaler.
func ( CommandID) () ([]byte, error) {
	return easyjson.Marshal()
}

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *CommandID) ( *jlexer.Lexer) {
	 := .String()
	switch CommandID() {
	case CommandIDOpenTabSearch:
		* = CommandIDOpenTabSearch
	case CommandIDCloseTabSearch:
		* = CommandIDCloseTabSearch

	default:
		.AddError(fmt.Errorf("unknown CommandID value: %v", ))
	}
}

// UnmarshalJSON satisfies json.Unmarshaler.
func ( *CommandID) ( []byte) error {
	return easyjson.Unmarshal(, )
}

// Bucket chrome histogram bucket.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Bucket
type Bucket struct {
	Low   int64 `json:"low"`   // Minimum value (inclusive).
	High  int64 `json:"high"`  // Maximum value (exclusive).
	Count int64 `json:"count"` // Number of samples.
}

// Histogram chrome histogram.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Histogram
type Histogram struct {
	Name    string    `json:"name"`    // Name.
	Sum     int64     `json:"sum"`     // Sum of sample values.
	Count   int64     `json:"count"`   // Total number of samples.
	Buckets []*Bucket `json:"buckets"` // Buckets.
}

// DownloadProgressState download status.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
type DownloadProgressState string

// String returns the DownloadProgressState as string value.
func ( DownloadProgressState) () string {
	return string()
}

// DownloadProgressState values.
const (
	DownloadProgressStateInProgress DownloadProgressState = "inProgress"
	DownloadProgressStateCompleted  DownloadProgressState = "completed"
	DownloadProgressStateCanceled   DownloadProgressState = "canceled"
)

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( DownloadProgressState) ( *jwriter.Writer) {
	.String(string())
}

// MarshalJSON satisfies json.Marshaler.
func ( DownloadProgressState) () ([]byte, error) {
	return easyjson.Marshal()
}

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *DownloadProgressState) ( *jlexer.Lexer) {
	 := .String()
	switch DownloadProgressState() {
	case DownloadProgressStateInProgress:
		* = DownloadProgressStateInProgress
	case DownloadProgressStateCompleted:
		* = DownloadProgressStateCompleted
	case DownloadProgressStateCanceled:
		* = DownloadProgressStateCanceled

	default:
		.AddError(fmt.Errorf("unknown DownloadProgressState value: %v", ))
	}
}

// UnmarshalJSON satisfies json.Unmarshaler.
func ( *DownloadProgressState) ( []byte) error {
	return easyjson.Unmarshal(, )
}

// SetDownloadBehaviorBehavior whether to allow all or deny all download
// requests, or use default Chrome behavior if available (otherwise deny).
// |allowAndName| allows download and names files according to their dowmload
// guids.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior
type SetDownloadBehaviorBehavior string

// String returns the SetDownloadBehaviorBehavior as string value.
func ( SetDownloadBehaviorBehavior) () string {
	return string()
}

// SetDownloadBehaviorBehavior values.
const (
	SetDownloadBehaviorBehaviorDeny         SetDownloadBehaviorBehavior = "deny"
	SetDownloadBehaviorBehaviorAllow        SetDownloadBehaviorBehavior = "allow"
	SetDownloadBehaviorBehaviorAllowAndName SetDownloadBehaviorBehavior = "allowAndName"
	SetDownloadBehaviorBehaviorDefault      SetDownloadBehaviorBehavior = "default"
)

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( SetDownloadBehaviorBehavior) ( *jwriter.Writer) {
	.String(string())
}

// MarshalJSON satisfies json.Marshaler.
func ( SetDownloadBehaviorBehavior) () ([]byte, error) {
	return easyjson.Marshal()
}

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *SetDownloadBehaviorBehavior) ( *jlexer.Lexer) {
	 := .String()
	switch SetDownloadBehaviorBehavior() {
	case SetDownloadBehaviorBehaviorDeny:
		* = SetDownloadBehaviorBehaviorDeny
	case SetDownloadBehaviorBehaviorAllow:
		* = SetDownloadBehaviorBehaviorAllow
	case SetDownloadBehaviorBehaviorAllowAndName:
		* = SetDownloadBehaviorBehaviorAllowAndName
	case SetDownloadBehaviorBehaviorDefault:
		* = SetDownloadBehaviorBehaviorDefault

	default:
		.AddError(fmt.Errorf("unknown SetDownloadBehaviorBehavior value: %v", ))
	}
}

// UnmarshalJSON satisfies json.Unmarshaler.
func ( *SetDownloadBehaviorBehavior) ( []byte) error {
	return easyjson.Unmarshal(, )
}