package input

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

import (
	
	
	

	
	
	
)

// TouchPoint [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TouchPoint
type TouchPoint struct {
	X                  float64 `json:"x"`                            // X coordinate of the event relative to the main frame's viewport in CSS pixels.
	Y                  float64 `json:"y"`                            // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	RadiusX            float64 `json:"radiusX,omitempty"`            // X radius of the touch area (default: 1.0).
	RadiusY            float64 `json:"radiusY,omitempty"`            // Y radius of the touch area (default: 1.0).
	RotationAngle      float64 `json:"rotationAngle,omitempty"`      // Rotation angle (default: 0.0).
	Force              float64 `json:"force,omitempty"`              // Force (default: 1.0).
	TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
	TiltX              float64 `json:"tiltX,omitempty"`              // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
	TiltY              float64 `json:"tiltY,omitempty"`              // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
	Twist              int64   `json:"twist,omitempty"`              // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
	ID                 float64 `json:"id,omitempty"`                 // Identifier used to track touch sources between events, must be unique within an event.
}

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

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

// GestureSourceType values.
const (
	GestureDefault GestureSourceType = "default"
	GestureTouch   GestureSourceType = "touch"
	GestureMouse   GestureSourceType = "mouse"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *GestureSourceType) ( *jlexer.Lexer) {
	 := .String()
	switch GestureSourceType() {
	case GestureDefault:
		* = GestureDefault
	case GestureTouch:
		* = GestureTouch
	case GestureMouse:
		* = GestureMouse

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

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

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

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

// MouseButton values.
const (
	None    MouseButton = "none"
	Left    MouseButton = "left"
	Middle  MouseButton = "middle"
	Right   MouseButton = "right"
	Back    MouseButton = "back"
	Forward MouseButton = "forward"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *MouseButton) ( *jlexer.Lexer) {
	 := .String()
	switch MouseButton() {
	case None:
		* = None
	case Left:
		* = Left
	case Middle:
		* = Middle
	case Right:
		* = Right
	case Back:
		* = Back
	case Forward:
		* = Forward

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

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

// TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TimeSinceEpoch
type TimeSinceEpoch time.Time

// Time returns the TimeSinceEpoch as time.Time value.
func ( TimeSinceEpoch) () time.Time {
	return time.Time()
}

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( TimeSinceEpoch) ( *jwriter.Writer) {
	 := float64(time.Time().UnixNano() / int64(time.Second))

	.Buffer.EnsureSpace(20)
	.Buffer.Buf = strconv.AppendFloat(.Buffer.Buf, , 'f', -1, 64)
}

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *TimeSinceEpoch) ( *jlexer.Lexer) {
	* = TimeSinceEpoch(time.Unix(0, int64(.Float64()*float64(time.Second))))
}

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

// DragDataItem [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragDataItem
type DragDataItem struct {
	MimeType string `json:"mimeType"`          // Mime type of the dragged data.
	Data     string `json:"data"`              // Depending of the value of mimeType, it contains the dragged link, text, HTML markup or any other data.
	Title    string `json:"title,omitempty"`   // Title associated with a link. Only valid when mimeType == "text/uri-list".
	BaseURL  string `json:"baseURL,omitempty"` // Stores the base URL for the contained markup. Only valid when mimeType == "text/html".
}

// DragData [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragData
type DragData struct {
	Items              []*DragDataItem `json:"items"`
	Files              []string        `json:"files,omitempty"`    // List of filenames that should be included when dropping
	DragOperationsMask int64           `json:"dragOperationsMask"` // Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
}

// Modifier input key modifier type.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
type Modifier int64

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

// Modifier values.
const (
	ModifierNone  Modifier = 0
	ModifierAlt   Modifier = 1
	ModifierCtrl  Modifier = 2
	ModifierMeta  Modifier = 4
	ModifierShift Modifier = 8
)

// String returns the Modifier as string value.
func ( Modifier) () string {
	switch  {
	case ModifierNone:
		return "None"
	case ModifierAlt:
		return "Alt"
	case ModifierCtrl:
		return "Ctrl"
	case ModifierMeta:
		return "Meta"
	case ModifierShift:
		return "Shift"
	}

	return fmt.Sprintf("Modifier(%d)", )
}

// MarshalEasyJSON satisfies easyjson.Marshaler.
func ( Modifier) ( *jwriter.Writer) {
	.Int64(int64())
}

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *Modifier) ( *jlexer.Lexer) {
	 := .Int64()
	switch Modifier() {
	case ModifierNone:
		* = ModifierNone
	case ModifierAlt:
		* = ModifierAlt
	case ModifierCtrl:
		* = ModifierCtrl
	case ModifierMeta:
		* = ModifierMeta
	case ModifierShift:
		* = ModifierShift

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

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

// ModifierCommand is an alias for ModifierMeta.
const ModifierCommand Modifier = ModifierMeta

// DispatchDragEventType type of the drag event.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent
type DispatchDragEventType string

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

// DispatchDragEventType values.
const (
	DragEnter  DispatchDragEventType = "dragEnter"
	DragOver   DispatchDragEventType = "dragOver"
	Drop       DispatchDragEventType = "drop"
	DragCancel DispatchDragEventType = "dragCancel"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *DispatchDragEventType) ( *jlexer.Lexer) {
	 := .String()
	switch DispatchDragEventType() {
	case DragEnter:
		* = DragEnter
	case DragOver:
		* = DragOver
	case Drop:
		* = Drop
	case DragCancel:
		* = DragCancel

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

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

// KeyType type of the key event.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
type KeyType string

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

// KeyType values.
const (
	KeyDown    KeyType = "keyDown"
	KeyUp      KeyType = "keyUp"
	KeyRawDown KeyType = "rawKeyDown"
	KeyChar    KeyType = "char"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *KeyType) ( *jlexer.Lexer) {
	 := .String()
	switch KeyType() {
	case KeyDown:
		* = KeyDown
	case KeyUp:
		* = KeyUp
	case KeyRawDown:
		* = KeyRawDown
	case KeyChar:
		* = KeyChar

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

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

// MouseType type of the mouse event.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
type MouseType string

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

// MouseType values.
const (
	MousePressed  MouseType = "mousePressed"
	MouseReleased MouseType = "mouseReleased"
	MouseMoved    MouseType = "mouseMoved"
	MouseWheel    MouseType = "mouseWheel"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *MouseType) ( *jlexer.Lexer) {
	 := .String()
	switch MouseType() {
	case MousePressed:
		* = MousePressed
	case MouseReleased:
		* = MouseReleased
	case MouseMoved:
		* = MouseMoved
	case MouseWheel:
		* = MouseWheel

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

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

// DispatchMouseEventPointerType pointer type (default: "mouse").
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
type DispatchMouseEventPointerType string

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

// DispatchMouseEventPointerType values.
const (
	Mouse DispatchMouseEventPointerType = "mouse"
	Pen   DispatchMouseEventPointerType = "pen"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *DispatchMouseEventPointerType) ( *jlexer.Lexer) {
	 := .String()
	switch DispatchMouseEventPointerType() {
	case Mouse:
		* = Mouse
	case Pen:
		* = Pen

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

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

// TouchType type of the touch event. TouchEnd and TouchCancel must not
// contain any touch points, while TouchStart and TouchMove must contains at
// least one.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent
type TouchType string

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

// TouchType values.
const (
	TouchStart  TouchType = "touchStart"
	TouchEnd    TouchType = "touchEnd"
	TouchMove   TouchType = "touchMove"
	TouchCancel TouchType = "touchCancel"
)

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

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

// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func ( *TouchType) ( *jlexer.Lexer) {
	 := .String()
	switch TouchType() {
	case TouchStart:
		* = TouchStart
	case TouchEnd:
		* = TouchEnd
	case TouchMove:
		* = TouchMove
	case TouchCancel:
		* = TouchCancel

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

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