func (c *Emulation) SetDeviceMetricsOverrideWithParams(v *EmulationSetDeviceMetricsOverrideParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setDeviceMetricsOverride", Params: v})
}
SetDeviceMetricsOverrideWithParams - Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
package gcdapi
import (
	"encoding/json"
	"github.com/wirepair/gcd/gcdmessage"
)
type EmulationScreenOrientation struct {
	Type  string `json:"type"`   
	Angle int    `json:"angle"`  
}
type EmulationVirtualTimeAdvancedEvent struct {
	Method string `json:"method"`
	Params struct {
		VirtualTimeElapsed float64 `json:"virtualTimeElapsed"`  
	} `json:"Params,omitempty"`
}
type EmulationVirtualTimePausedEvent struct {
	Method string `json:"method"`
	Params struct {
		VirtualTimeElapsed float64 `json:"virtualTimeElapsed"`  
	} `json:"Params,omitempty"`
}
type Emulation struct {
	target gcdmessage.ChromeTargeter
}
func NewEmulation(target gcdmessage.ChromeTargeter) *Emulation {
	c := &Emulation{target: target}
	return c
}
func (c *Emulation) CanEmulate() (bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.canEmulate"})
	if err != nil {
		return false, err
	}
	var chromeData struct {
		Result struct {
			Result bool
		}
	}
	if resp == nil {
		return false, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return false, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return false, err
	}
	return chromeData.Result.Result, nil
}
func (c *Emulation) ClearDeviceMetricsOverride() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.clearDeviceMetricsOverride"})
}
func (c *Emulation) ClearGeolocationOverride() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.clearGeolocationOverride"})
}
func (c *Emulation) ResetPageScaleFactor() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.resetPageScaleFactor"})
}
type EmulationSetFocusEmulationEnabledParams struct {
	Enabled bool `json:"enabled"`
}
func (c *Emulation) SetFocusEmulationEnabledWithParams(v *EmulationSetFocusEmulationEnabledParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setFocusEmulationEnabled", Params: v})
}
func (c *Emulation) SetFocusEmulationEnabled(enabled bool) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetFocusEmulationEnabledParams
	v.Enabled = enabled
	return c.SetFocusEmulationEnabledWithParams(&v)
}
type EmulationSetCPUThrottlingRateParams struct {
	Rate float64 `json:"rate"`
}
func (c *Emulation) SetCPUThrottlingRateWithParams(v *EmulationSetCPUThrottlingRateParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setCPUThrottlingRate", Params: v})
}
func (c *Emulation) SetCPUThrottlingRate(rate float64) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetCPUThrottlingRateParams
	v.Rate = rate
	return c.SetCPUThrottlingRateWithParams(&v)
}
type EmulationSetDefaultBackgroundColorOverrideParams struct {
	Color *DOMRGBA `json:"color,omitempty"`
}
func (c *Emulation) SetDefaultBackgroundColorOverrideWithParams(v *EmulationSetDefaultBackgroundColorOverrideParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setDefaultBackgroundColorOverride", Params: v})
}
func (c *Emulation) SetDefaultBackgroundColorOverride(color *DOMRGBA) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetDefaultBackgroundColorOverrideParams
	v.Color = color
	return c.SetDefaultBackgroundColorOverrideWithParams(&v)
}
type EmulationSetDeviceMetricsOverrideParams struct {
	Width int `json:"width"`
	Height int `json:"height"`
	DeviceScaleFactor float64 `json:"deviceScaleFactor"`
	Mobile bool `json:"mobile"`
	Scale float64 `json:"scale,omitempty"`
	ScreenWidth int `json:"screenWidth,omitempty"`
	ScreenHeight int `json:"screenHeight,omitempty"`
	PositionX int `json:"positionX,omitempty"`
	PositionY int `json:"positionY,omitempty"`
	DontSetVisibleSize bool `json:"dontSetVisibleSize,omitempty"`
	ScreenOrientation *EmulationScreenOrientation `json:"screenOrientation,omitempty"`
	Viewport *PageViewport `json:"viewport,omitempty"`
}