func (c *Emulation) SetPageScaleFactorWithParams(ctx context.Context, v *EmulationSetPageScaleFactorParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setPageScaleFactor", Params: v})
}
SetPageScaleFactorWithParams - Sets a specified page scale factor.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type EmulationScreenOrientation struct {
	Type  string `json:"type"`   
	Angle int    `json:"angle"`  
}
type EmulationDisplayFeature struct {
	Orientation string `json:"orientation"`  
	Offset      int    `json:"offset"`       
	MaskLength  int    `json:"maskLength"`   
}
type EmulationMediaFeature struct {
	Name  string `json:"name"`   
	Value string `json:"value"`  
}
type EmulationUserAgentBrandVersion struct {
	Brand   string `json:"brand"`    
	Version string `json:"version"`  
}
type EmulationUserAgentMetadata struct {
	Brands          []*EmulationUserAgentBrandVersion `json:"brands,omitempty"`       
	FullVersion     string                            `json:"fullVersion,omitempty"`  
	Platform        string                            `json:"platform"`               
	PlatformVersion string                            `json:"platformVersion"`        
	Architecture    string                            `json:"architecture"`           
	Model           string                            `json:"model"`                  
	Mobile          bool                              `json:"mobile"`                 
}
type Emulation struct {
	target gcdmessage.ChromeTargeter
}
func NewEmulation(target gcdmessage.ChromeTargeter) *Emulation {
	c := &Emulation{target: target}
	return c
}
func (c *Emulation) CanEmulate(ctx context.Context) (bool, error) {
	resp, err := c.target.SendCustomReturn(ctx, &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(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.clearDeviceMetricsOverride"})
}
func (c *Emulation) ClearGeolocationOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.clearGeolocationOverride"})
}
func (c *Emulation) ResetPageScaleFactor(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.resetPageScaleFactor"})
}
type EmulationSetFocusEmulationEnabledParams struct {
	Enabled bool `json:"enabled"`
}
func (c *Emulation) SetFocusEmulationEnabledWithParams(ctx context.Context, v *EmulationSetFocusEmulationEnabledParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setFocusEmulationEnabled", Params: v})
}
func (c *Emulation) SetFocusEmulationEnabled(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetFocusEmulationEnabledParams
	v.Enabled = enabled
	return c.SetFocusEmulationEnabledWithParams(ctx, &v)
}
type EmulationSetCPUThrottlingRateParams struct {
	Rate float64 `json:"rate"`
}
func (c *Emulation) SetCPUThrottlingRateWithParams(ctx context.Context, v *EmulationSetCPUThrottlingRateParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setCPUThrottlingRate", Params: v})
}
func (c *Emulation) SetCPUThrottlingRate(ctx context.Context, rate float64) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetCPUThrottlingRateParams
	v.Rate = rate
	return c.SetCPUThrottlingRateWithParams(ctx, &v)
}
type EmulationSetDefaultBackgroundColorOverrideParams struct {
	Color *DOMRGBA `json:"color,omitempty"`
}
func (c *Emulation) SetDefaultBackgroundColorOverrideWithParams(ctx context.Context, v *EmulationSetDefaultBackgroundColorOverrideParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setDefaultBackgroundColorOverride", Params: v})
}
func (c *Emulation) SetDefaultBackgroundColorOverride(ctx context.Context, color *DOMRGBA) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetDefaultBackgroundColorOverrideParams
	v.Color = color
	return c.SetDefaultBackgroundColorOverrideWithParams(ctx, &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"`
	DisplayFeature *EmulationDisplayFeature `json:"displayFeature,omitempty"`
}
func (c *Emulation) SetDeviceMetricsOverrideWithParams(ctx context.Context, v *EmulationSetDeviceMetricsOverrideParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setDeviceMetricsOverride", Params: v})
}
func (c *Emulation) SetDeviceMetricsOverride(ctx context.Context, width int, height int, deviceScaleFactor float64, mobile bool, scale float64, screenWidth int, screenHeight int, positionX int, positionY int, dontSetVisibleSize bool, screenOrientation *EmulationScreenOrientation, viewport *PageViewport, displayFeature *EmulationDisplayFeature) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetDeviceMetricsOverrideParams
	v.Width = width
	v.Height = height
	v.DeviceScaleFactor = deviceScaleFactor
	v.Mobile = mobile
	v.Scale = scale
	v.ScreenWidth = screenWidth
	v.ScreenHeight = screenHeight
	v.PositionX = positionX
	v.PositionY = positionY
	v.DontSetVisibleSize = dontSetVisibleSize
	v.ScreenOrientation = screenOrientation
	v.Viewport = viewport
	v.DisplayFeature = displayFeature
	return c.SetDeviceMetricsOverrideWithParams(ctx, &v)
}
type EmulationSetScrollbarsHiddenParams struct {
	Hidden bool `json:"hidden"`
}
func (c *Emulation) SetScrollbarsHiddenWithParams(ctx context.Context, v *EmulationSetScrollbarsHiddenParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setScrollbarsHidden", Params: v})
}
func (c *Emulation) SetScrollbarsHidden(ctx context.Context, hidden bool) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetScrollbarsHiddenParams
	v.Hidden = hidden
	return c.SetScrollbarsHiddenWithParams(ctx, &v)
}
type EmulationSetDocumentCookieDisabledParams struct {
	Disabled bool `json:"disabled"`
}
func (c *Emulation) SetDocumentCookieDisabledWithParams(ctx context.Context, v *EmulationSetDocumentCookieDisabledParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setDocumentCookieDisabled", Params: v})
}
func (c *Emulation) SetDocumentCookieDisabled(ctx context.Context, disabled bool) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetDocumentCookieDisabledParams
	v.Disabled = disabled
	return c.SetDocumentCookieDisabledWithParams(ctx, &v)
}
type EmulationSetEmitTouchEventsForMouseParams struct {
	Enabled bool `json:"enabled"`
	Configuration string `json:"configuration,omitempty"`
}
func (c *Emulation) SetEmitTouchEventsForMouseWithParams(ctx context.Context, v *EmulationSetEmitTouchEventsForMouseParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setEmitTouchEventsForMouse", Params: v})
}
func (c *Emulation) SetEmitTouchEventsForMouse(ctx context.Context, enabled bool, configuration string) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetEmitTouchEventsForMouseParams
	v.Enabled = enabled
	v.Configuration = configuration
	return c.SetEmitTouchEventsForMouseWithParams(ctx, &v)
}
type EmulationSetEmulatedMediaParams struct {
	Media string `json:"media,omitempty"`
	Features []*EmulationMediaFeature `json:"features,omitempty"`
}
func (c *Emulation) SetEmulatedMediaWithParams(ctx context.Context, v *EmulationSetEmulatedMediaParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setEmulatedMedia", Params: v})
}
func (c *Emulation) SetEmulatedMedia(ctx context.Context, media string, features []*EmulationMediaFeature) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetEmulatedMediaParams
	v.Media = media
	v.Features = features
	return c.SetEmulatedMediaWithParams(ctx, &v)
}
type EmulationSetEmulatedVisionDeficiencyParams struct {
	TheType string `json:"type"`
}
func (c *Emulation) SetEmulatedVisionDeficiencyWithParams(ctx context.Context, v *EmulationSetEmulatedVisionDeficiencyParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setEmulatedVisionDeficiency", Params: v})
}
func (c *Emulation) SetEmulatedVisionDeficiency(ctx context.Context, theType string) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetEmulatedVisionDeficiencyParams
	v.TheType = theType
	return c.SetEmulatedVisionDeficiencyWithParams(ctx, &v)
}
type EmulationSetGeolocationOverrideParams struct {
	Latitude float64 `json:"latitude,omitempty"`
	Longitude float64 `json:"longitude,omitempty"`
	Accuracy float64 `json:"accuracy,omitempty"`
}
func (c *Emulation) SetGeolocationOverrideWithParams(ctx context.Context, v *EmulationSetGeolocationOverrideParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setGeolocationOverride", Params: v})
}
func (c *Emulation) SetGeolocationOverride(ctx context.Context, latitude float64, longitude float64, accuracy float64) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetGeolocationOverrideParams
	v.Latitude = latitude
	v.Longitude = longitude
	v.Accuracy = accuracy
	return c.SetGeolocationOverrideWithParams(ctx, &v)
}
type EmulationSetIdleOverrideParams struct {
	IsUserActive bool `json:"isUserActive"`
	IsScreenUnlocked bool `json:"isScreenUnlocked"`
}
func (c *Emulation) SetIdleOverrideWithParams(ctx context.Context, v *EmulationSetIdleOverrideParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setIdleOverride", Params: v})
}
func (c *Emulation) SetIdleOverride(ctx context.Context, isUserActive bool, isScreenUnlocked bool) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetIdleOverrideParams
	v.IsUserActive = isUserActive
	v.IsScreenUnlocked = isScreenUnlocked
	return c.SetIdleOverrideWithParams(ctx, &v)
}
func (c *Emulation) ClearIdleOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.clearIdleOverride"})
}
type EmulationSetNavigatorOverridesParams struct {
	Platform string `json:"platform"`
}
func (c *Emulation) SetNavigatorOverridesWithParams(ctx context.Context, v *EmulationSetNavigatorOverridesParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setNavigatorOverrides", Params: v})
}
func (c *Emulation) SetNavigatorOverrides(ctx context.Context, platform string) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetNavigatorOverridesParams
	v.Platform = platform
	return c.SetNavigatorOverridesWithParams(ctx, &v)
}
type EmulationSetPageScaleFactorParams struct {
	PageScaleFactor float64 `json:"pageScaleFactor"`
}