func (c *Network) EmulateNetworkConditions(ctx context.Context, offline bool, latency float64, downloadThroughput float64, uploadThroughput float64, connectionType string) (*gcdmessage.ChromeResponse, error) {
	var v NetworkEmulateNetworkConditionsParams
	v.Offline = offline
	v.Latency = latency
	v.DownloadThroughput = downloadThroughput
	v.UploadThroughput = uploadThroughput
	v.ConnectionType = connectionType
	return c.EmulateNetworkConditionsWithParams(ctx, &v)
}
EmulateNetworkConditions - Activates emulation of network conditions.
offline - True to emulate internet disconnection.
latency - Minimum latency from request sent to response headers received (ms).
downloadThroughput - Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
uploadThroughput - Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
connectionType - Connection type if known. enum values: none, cellular2g, cellular3g, cellular4g, bluetooth, ethernet, wifi, wimax, other
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type NetworkResourceTiming struct {
	RequestTime              float64 `json:"requestTime"`               
	ProxyStart               float64 `json:"proxyStart"`                
	ProxyEnd                 float64 `json:"proxyEnd"`                  
	DnsStart                 float64 `json:"dnsStart"`                  
	DnsEnd                   float64 `json:"dnsEnd"`                    
	ConnectStart             float64 `json:"connectStart"`              
	ConnectEnd               float64 `json:"connectEnd"`                
	SslStart                 float64 `json:"sslStart"`                  
	SslEnd                   float64 `json:"sslEnd"`                    
	WorkerStart              float64 `json:"workerStart"`               
	WorkerReady              float64 `json:"workerReady"`               
	WorkerFetchStart         float64 `json:"workerFetchStart"`          
	WorkerRespondWithSettled float64 `json:"workerRespondWithSettled"`  
	SendStart                float64 `json:"sendStart"`                 
	SendEnd                  float64 `json:"sendEnd"`                   
	PushStart                float64 `json:"pushStart"`                 
	PushEnd                  float64 `json:"pushEnd"`                   
	ReceiveHeadersEnd        float64 `json:"receiveHeadersEnd"`         
}
type NetworkPostDataEntry struct {
	Bytes string `json:"bytes,omitempty"`  
}
type NetworkRequest struct {
	Url              string                   `json:"url"`                         
	UrlFragment      string                   `json:"urlFragment,omitempty"`       
	Method           string                   `json:"method"`                      
	Headers          map[string]interface{}   `json:"headers"`                     
	PostData         string                   `json:"postData,omitempty"`          
	HasPostData      bool                     `json:"hasPostData,omitempty"`       
	PostDataEntries  []*NetworkPostDataEntry  `json:"postDataEntries,omitempty"`   
	MixedContentType string                   `json:"mixedContentType,omitempty"`  
	InitialPriority  string                   `json:"initialPriority"`             
	ReferrerPolicy   string                   `json:"referrerPolicy"`              
	IsLinkPreload    bool                     `json:"isLinkPreload,omitempty"`     
	TrustTokenParams *NetworkTrustTokenParams `json:"trustTokenParams,omitempty"`  
}
type NetworkSignedCertificateTimestamp struct {
	Status             string  `json:"status"`              
	Origin             string  `json:"origin"`              
	LogDescription     string  `json:"logDescription"`      
	LogId              string  `json:"logId"`               
	Timestamp          float64 `json:"timestamp"`           
	HashAlgorithm      string  `json:"hashAlgorithm"`       
	SignatureAlgorithm string  `json:"signatureAlgorithm"`  
	SignatureData      string  `json:"signatureData"`       
}
type NetworkSecurityDetails struct {
	Protocol                          string                               `json:"protocol"`                           
	KeyExchange                       string                               `json:"keyExchange"`                        
	KeyExchangeGroup                  string                               `json:"keyExchangeGroup,omitempty"`         
	Cipher                            string                               `json:"cipher"`                             
	Mac                               string                               `json:"mac,omitempty"`                      
	CertificateId                     int                                  `json:"certificateId"`                      
	SubjectName                       string                               `json:"subjectName"`                        
	SanList                           []string                             `json:"sanList"`                            
	Issuer                            string                               `json:"issuer"`                             
	ValidFrom                         float64                              `json:"validFrom"`                          
	ValidTo                           float64                              `json:"validTo"`                            
	SignedCertificateTimestampList    []*NetworkSignedCertificateTimestamp `json:"signedCertificateTimestampList"`     
	CertificateTransparencyCompliance string                               `json:"certificateTransparencyCompliance"`  
}
type NetworkCorsErrorStatus struct {
	CorsError       string `json:"corsError"`        
	FailedParameter string `json:"failedParameter"`  
}
type NetworkTrustTokenParams struct {
	Type          string   `json:"type"`               
	RefreshPolicy string   `json:"refreshPolicy"`      
	Issuers       []string `json:"issuers,omitempty"`  
}
type NetworkResponse struct {
	Url                         string                  `json:"url"`                                    
	Status                      int                     `json:"status"`                                 
	StatusText                  string                  `json:"statusText"`                             
	Headers                     map[string]interface{}  `json:"headers"`                                
	HeadersText                 string                  `json:"headersText,omitempty"`                  
	MimeType                    string                  `json:"mimeType"`                               
	RequestHeaders              map[string]interface{}  `json:"requestHeaders,omitempty"`               
	RequestHeadersText          string                  `json:"requestHeadersText,omitempty"`           
	ConnectionReused            bool                    `json:"connectionReused"`                       
	ConnectionId                float64                 `json:"connectionId"`                           
	RemoteIPAddress             string                  `json:"remoteIPAddress,omitempty"`              
	RemotePort                  int                     `json:"remotePort,omitempty"`                   
	FromDiskCache               bool                    `json:"fromDiskCache,omitempty"`                
	FromServiceWorker           bool                    `json:"fromServiceWorker,omitempty"`            
	FromPrefetchCache           bool                    `json:"fromPrefetchCache,omitempty"`            
	EncodedDataLength           float64                 `json:"encodedDataLength"`                      
	Timing                      *NetworkResourceTiming  `json:"timing,omitempty"`                       
	ServiceWorkerResponseSource string                  `json:"serviceWorkerResponseSource,omitempty"`  
	ResponseTime                float64                 `json:"responseTime,omitempty"`                 
	CacheStorageCacheName       string                  `json:"cacheStorageCacheName,omitempty"`        
	Protocol                    string                  `json:"protocol,omitempty"`                     
	SecurityState               string                  `json:"securityState"`                          
	SecurityDetails             *NetworkSecurityDetails `json:"securityDetails,omitempty"`              
}
type NetworkWebSocketRequest struct {
	Headers map[string]interface{} `json:"headers"`  
}
type NetworkWebSocketResponse struct {
	Status             int                    `json:"status"`                        
	StatusText         string                 `json:"statusText"`                    
	Headers            map[string]interface{} `json:"headers"`                       
	HeadersText        string                 `json:"headersText,omitempty"`         
	RequestHeaders     map[string]interface{} `json:"requestHeaders,omitempty"`      
	RequestHeadersText string                 `json:"requestHeadersText,omitempty"`  
}
type NetworkWebSocketFrame struct {
	Opcode      float64 `json:"opcode"`       
	Mask        bool    `json:"mask"`         
	PayloadData string  `json:"payloadData"`  
}
type NetworkCachedResource struct {
	Url      string           `json:"url"`                 
	Type     string           `json:"type"`                
	Response *NetworkResponse `json:"response,omitempty"`  
	BodySize float64          `json:"bodySize"`            
}
type NetworkInitiator struct {
	Type         string             `json:"type"`                    
	Stack        *RuntimeStackTrace `json:"stack,omitempty"`         
	Url          string             `json:"url,omitempty"`           
	LineNumber   float64            `json:"lineNumber,omitempty"`    
	ColumnNumber float64            `json:"columnNumber,omitempty"`  
	RequestId    string             `json:"requestId,omitempty"`     
}
type NetworkCookie struct {
	Name         string  `json:"name"`                
	Value        string  `json:"value"`               
	Domain       string  `json:"domain"`              
	Path         string  `json:"path"`                
	Expires      float64 `json:"expires"`             
	Size         int     `json:"size"`                
	HttpOnly     bool    `json:"httpOnly"`            
	Secure       bool    `json:"secure"`              
	Session      bool    `json:"session"`             
	SameSite     string  `json:"sameSite,omitempty"`  
	Priority     string  `json:"priority"`            
	SameParty    bool    `json:"sameParty"`           
	SourceScheme string  `json:"sourceScheme"`        
	SourcePort   int     `json:"sourcePort"`          
}
type NetworkBlockedSetCookieWithReason struct {
	BlockedReasons []string       `json:"blockedReasons"`    
	CookieLine     string         `json:"cookieLine"`        
	Cookie         *NetworkCookie `json:"cookie,omitempty"`  
}
type NetworkBlockedCookieWithReason struct {
	BlockedReasons []string       `json:"blockedReasons"`  
	Cookie         *NetworkCookie `json:"cookie"`          
}
type NetworkCookieParam struct {
	Name         string  `json:"name"`                    
	Value        string  `json:"value"`                   
	Url          string  `json:"url,omitempty"`           
	Domain       string  `json:"domain,omitempty"`        
	Path         string  `json:"path,omitempty"`          
	Secure       bool    `json:"secure,omitempty"`        
	HttpOnly     bool    `json:"httpOnly,omitempty"`      
	SameSite     string  `json:"sameSite,omitempty"`      
	Expires      float64 `json:"expires,omitempty"`       
	Priority     string  `json:"priority,omitempty"`      
	SameParty    bool    `json:"sameParty,omitempty"`     
	SourceScheme string  `json:"sourceScheme,omitempty"`  
	SourcePort   int     `json:"sourcePort,omitempty"`    
}
type NetworkAuthChallenge struct {
	Source string `json:"source,omitempty"`  
	Origin string `json:"origin"`            
	Scheme string `json:"scheme"`            
	Realm  string `json:"realm"`             
}
type NetworkAuthChallengeResponse struct {
	Response string `json:"response"`            
	Username string `json:"username,omitempty"`  
	Password string `json:"password,omitempty"`  
}
type NetworkRequestPattern struct {
	UrlPattern        string `json:"urlPattern,omitempty"`         
	ResourceType      string `json:"resourceType,omitempty"`       
	InterceptionStage string `json:"interceptionStage,omitempty"`  
}
type NetworkSignedExchangeSignature struct {
	Label        string   `json:"label"`                   
	Signature    string   `json:"signature"`               
	Integrity    string   `json:"integrity"`               
	CertUrl      string   `json:"certUrl,omitempty"`       
	CertSha256   string   `json:"certSha256,omitempty"`    
	ValidityUrl  string   `json:"validityUrl"`             
	Date         int      `json:"date"`                    
	Expires      int      `json:"expires"`                 
	Certificates []string `json:"certificates,omitempty"`  
}
type NetworkSignedExchangeHeader struct {
	RequestUrl      string                            `json:"requestUrl"`       
	ResponseCode    int                               `json:"responseCode"`     
	ResponseHeaders map[string]interface{}            `json:"responseHeaders"`  
	Signatures      []*NetworkSignedExchangeSignature `json:"signatures"`       
	HeaderIntegrity string                            `json:"headerIntegrity"`  
}
type NetworkSignedExchangeError struct {
	Message        string `json:"message"`                   
	SignatureIndex int    `json:"signatureIndex,omitempty"`  
	ErrorField     string `json:"errorField,omitempty"`      
}
type NetworkSignedExchangeInfo struct {
	OuterResponse   *NetworkResponse              `json:"outerResponse"`              
	Header          *NetworkSignedExchangeHeader  `json:"header,omitempty"`           
	SecurityDetails *NetworkSecurityDetails       `json:"securityDetails,omitempty"`  
	Errors          []*NetworkSignedExchangeError `json:"errors,omitempty"`           
}
type NetworkClientSecurityState struct {
	InitiatorIsSecureContext    bool   `json:"initiatorIsSecureContext"`     
	InitiatorIPAddressSpace     string `json:"initiatorIPAddressSpace"`      
	PrivateNetworkRequestPolicy string `json:"privateNetworkRequestPolicy"`  
}
type NetworkCrossOriginOpenerPolicyStatus struct {
	Value                       string `json:"value"`                                  
	ReportOnlyValue             string `json:"reportOnlyValue"`                        
	ReportingEndpoint           string `json:"reportingEndpoint,omitempty"`            
	ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"`  
}
type NetworkCrossOriginEmbedderPolicyStatus struct {
	Value                       string `json:"value"`                                  
	ReportOnlyValue             string `json:"reportOnlyValue"`                        
	ReportingEndpoint           string `json:"reportingEndpoint,omitempty"`            
	ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"`  
}
type NetworkSecurityIsolationStatus struct {
	Coop *NetworkCrossOriginOpenerPolicyStatus   `json:"coop,omitempty"`  
	Coep *NetworkCrossOriginEmbedderPolicyStatus `json:"coep,omitempty"`  
}
type NetworkLoadNetworkResourcePageResult struct {
	Success        bool                   `json:"success"`                   
	NetError       float64                `json:"netError,omitempty"`        
	NetErrorName   string                 `json:"netErrorName,omitempty"`    
	HttpStatusCode float64                `json:"httpStatusCode,omitempty"`  
	Stream         string                 `json:"stream,omitempty"`          
	Headers        map[string]interface{} `json:"headers,omitempty"`         
}
type NetworkLoadNetworkResourceOptions struct {
	DisableCache       bool `json:"disableCache"`        
	IncludeCredentials bool `json:"includeCredentials"`  
}
type NetworkDataReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId         string  `json:"requestId"`          
		Timestamp         float64 `json:"timestamp"`          
		DataLength        int     `json:"dataLength"`         
		EncodedDataLength int     `json:"encodedDataLength"`  
	} `json:"Params,omitempty"`
}
type NetworkEventSourceMessageReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string  `json:"requestId"`  
		Timestamp float64 `json:"timestamp"`  
		EventName string  `json:"eventName"`  
		EventId   string  `json:"eventId"`    
		Data      string  `json:"data"`       
	} `json:"Params,omitempty"`
}
type NetworkLoadingFailedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId       string                  `json:"requestId"`                  
		Timestamp       float64                 `json:"timestamp"`                  
		Type            string                  `json:"type"`                       
		ErrorText       string                  `json:"errorText"`                  
		Canceled        bool                    `json:"canceled,omitempty"`         
		BlockedReason   string                  `json:"blockedReason,omitempty"`    
		CorsErrorStatus *NetworkCorsErrorStatus `json:"corsErrorStatus,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkLoadingFinishedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId                string  `json:"requestId"`                           
		Timestamp                float64 `json:"timestamp"`                           
		EncodedDataLength        float64 `json:"encodedDataLength"`                   
		ShouldReportCorbBlocking bool    `json:"shouldReportCorbBlocking,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkRequestInterceptedEvent struct {
	Method string `json:"method"`
	Params struct {
		InterceptionId      string                 `json:"interceptionId"`                 
		Request             *NetworkRequest        `json:"request"`                        
		FrameId             string                 `json:"frameId"`                        
		ResourceType        string                 `json:"resourceType"`                   
		IsNavigationRequest bool                   `json:"isNavigationRequest"`            
		IsDownload          bool                   `json:"isDownload,omitempty"`           
		RedirectUrl         string                 `json:"redirectUrl,omitempty"`          
		AuthChallenge       *NetworkAuthChallenge  `json:"authChallenge,omitempty"`        
		ResponseErrorReason string                 `json:"responseErrorReason,omitempty"`  
		ResponseStatusCode  int                    `json:"responseStatusCode,omitempty"`   
		ResponseHeaders     map[string]interface{} `json:"responseHeaders,omitempty"`      
		RequestId           string                 `json:"requestId,omitempty"`            
	} `json:"Params,omitempty"`
}
type NetworkRequestServedFromCacheEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string `json:"requestId"`  
	} `json:"Params,omitempty"`
}
type NetworkRequestWillBeSentEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId        string            `json:"requestId"`                   
		LoaderId         string            `json:"loaderId"`                    
		DocumentURL      string            `json:"documentURL"`                 
		Request          *NetworkRequest   `json:"request"`                     
		Timestamp        float64           `json:"timestamp"`                   
		WallTime         float64           `json:"wallTime"`                    
		Initiator        *NetworkInitiator `json:"initiator"`                   
		RedirectResponse *NetworkResponse  `json:"redirectResponse,omitempty"`  
		Type             string            `json:"type,omitempty"`              
		FrameId          string            `json:"frameId,omitempty"`           
		HasUserGesture   bool              `json:"hasUserGesture,omitempty"`    
	} `json:"Params,omitempty"`
}
type NetworkResourceChangedPriorityEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId   string  `json:"requestId"`    
		NewPriority string  `json:"newPriority"`  
		Timestamp   float64 `json:"timestamp"`    
	} `json:"Params,omitempty"`
}
type NetworkSignedExchangeReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                     `json:"requestId"`  
		Info      *NetworkSignedExchangeInfo `json:"info"`       
	} `json:"Params,omitempty"`
}
type NetworkResponseReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string           `json:"requestId"`          
		LoaderId  string           `json:"loaderId"`           
		Timestamp float64          `json:"timestamp"`          
		Type      string           `json:"type"`               
		Response  *NetworkResponse `json:"response"`           
		FrameId   string           `json:"frameId,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkWebSocketClosedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string  `json:"requestId"`  
		Timestamp float64 `json:"timestamp"`  
	} `json:"Params,omitempty"`
}
type NetworkWebSocketCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string            `json:"requestId"`            
		Url       string            `json:"url"`                  
		Initiator *NetworkInitiator `json:"initiator,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkWebSocketFrameErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId    string  `json:"requestId"`     
		Timestamp    float64 `json:"timestamp"`     
		ErrorMessage string  `json:"errorMessage"`  
	} `json:"Params,omitempty"`
}
type NetworkWebSocketFrameReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                 `json:"requestId"`  
		Timestamp float64                `json:"timestamp"`  
		Response  *NetworkWebSocketFrame `json:"response"`   
	} `json:"Params,omitempty"`
}
type NetworkWebSocketFrameSentEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                 `json:"requestId"`  
		Timestamp float64                `json:"timestamp"`  
		Response  *NetworkWebSocketFrame `json:"response"`   
	} `json:"Params,omitempty"`
}
type NetworkWebSocketHandshakeResponseReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                    `json:"requestId"`  
		Timestamp float64                   `json:"timestamp"`  
		Response  *NetworkWebSocketResponse `json:"response"`   
	} `json:"Params,omitempty"`
}
type NetworkWebSocketWillSendHandshakeRequestEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                   `json:"requestId"`  
		Timestamp float64                  `json:"timestamp"`  
		WallTime  float64                  `json:"wallTime"`   
		Request   *NetworkWebSocketRequest `json:"request"`    
	} `json:"Params,omitempty"`
}
type NetworkWebTransportCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		TransportId string            `json:"transportId"`          
		Url         string            `json:"url"`                  
		Timestamp   float64           `json:"timestamp"`            
		Initiator   *NetworkInitiator `json:"initiator,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkWebTransportConnectionEstablishedEvent struct {
	Method string `json:"method"`
	Params struct {
		TransportId string  `json:"transportId"`  
		Timestamp   float64 `json:"timestamp"`    
	} `json:"Params,omitempty"`
}
type NetworkWebTransportClosedEvent struct {
	Method string `json:"method"`
	Params struct {
		TransportId string  `json:"transportId"`  
		Timestamp   float64 `json:"timestamp"`    
	} `json:"Params,omitempty"`
}
type NetworkRequestWillBeSentExtraInfoEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId           string                            `json:"requestId"`                      
		AssociatedCookies   []*NetworkBlockedCookieWithReason `json:"associatedCookies"`              
		Headers             map[string]interface{}            `json:"headers"`                        
		ClientSecurityState *NetworkClientSecurityState       `json:"clientSecurityState,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkResponseReceivedExtraInfoEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId              string                               `json:"requestId"`               
		BlockedCookies         []*NetworkBlockedSetCookieWithReason `json:"blockedCookies"`          
		Headers                map[string]interface{}               `json:"headers"`                 
		ResourceIPAddressSpace string                               `json:"resourceIPAddressSpace"`  
		HeadersText            string                               `json:"headersText,omitempty"`   
	} `json:"Params,omitempty"`
}
type NetworkTrustTokenOperationDoneEvent struct {
	Method string `json:"method"`
	Params struct {
		Status           string `json:"status"`                      
		Type             string `json:"type"`                        
		RequestId        string `json:"requestId"`                   
		TopLevelOrigin   string `json:"topLevelOrigin,omitempty"`    
		IssuerOrigin     string `json:"issuerOrigin,omitempty"`      
		IssuedTokenCount int    `json:"issuedTokenCount,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkSubresourceWebBundleMetadataReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string   `json:"requestId"`  
		Urls      []string `json:"urls"`       
	} `json:"Params,omitempty"`
}
type NetworkSubresourceWebBundleMetadataErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId    string `json:"requestId"`     
		ErrorMessage string `json:"errorMessage"`  
	} `json:"Params,omitempty"`
}
type NetworkSubresourceWebBundleInnerResponseParsedEvent struct {
	Method string `json:"method"`
	Params struct {
		InnerRequestId  string `json:"innerRequestId"`             
		InnerRequestURL string `json:"innerRequestURL"`            
		BundleRequestId string `json:"bundleRequestId,omitempty"`  
	} `json:"Params,omitempty"`
}
type NetworkSubresourceWebBundleInnerResponseErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		InnerRequestId  string `json:"innerRequestId"`             
		InnerRequestURL string `json:"innerRequestURL"`            
		ErrorMessage    string `json:"errorMessage"`               
		BundleRequestId string `json:"bundleRequestId,omitempty"`  
	} `json:"Params,omitempty"`
}
type Network struct {
	target gcdmessage.ChromeTargeter
}
func NewNetwork(target gcdmessage.ChromeTargeter) *Network {
	c := &Network{target: target}
	return c
}
type NetworkSetAcceptedEncodingsParams struct {
	Encodings []string `json:"encodings"`
}
func (c *Network) SetAcceptedEncodingsWithParams(ctx context.Context, v *NetworkSetAcceptedEncodingsParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.setAcceptedEncodings", Params: v})
}
func (c *Network) SetAcceptedEncodings(ctx context.Context, encodings []string) (*gcdmessage.ChromeResponse, error) {
	var v NetworkSetAcceptedEncodingsParams
	v.Encodings = encodings
	return c.SetAcceptedEncodingsWithParams(ctx, &v)
}
func (c *Network) ClearAcceptedEncodingsOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.clearAcceptedEncodingsOverride"})
}
func (c *Network) CanClearBrowserCache(ctx context.Context) (bool, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.canClearBrowserCache"})
	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 *Network) CanClearBrowserCookies(ctx context.Context) (bool, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.canClearBrowserCookies"})
	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 *Network) CanEmulateNetworkConditions(ctx context.Context) (bool, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.canEmulateNetworkConditions"})
	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 *Network) ClearBrowserCache(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.clearBrowserCache"})
}
func (c *Network) ClearBrowserCookies(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.clearBrowserCookies"})
}
type NetworkContinueInterceptedRequestParams struct {
	InterceptionId string `json:"interceptionId"`
	ErrorReason string `json:"errorReason,omitempty"`
	RawResponse string `json:"rawResponse,omitempty"`
	Url string `json:"url,omitempty"`
	Method string `json:"method,omitempty"`
	PostData string `json:"postData,omitempty"`
	Headers map[string]interface{} `json:"headers,omitempty"`
	AuthChallengeResponse *NetworkAuthChallengeResponse `json:"authChallengeResponse,omitempty"`
}
func (c *Network) ContinueInterceptedRequestWithParams(ctx context.Context, v *NetworkContinueInterceptedRequestParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.continueInterceptedRequest", Params: v})
}
func (c *Network) ContinueInterceptedRequest(ctx context.Context, interceptionId string, errorReason string, rawResponse string, url string, method string, postData string, headers map[string]interface{}, authChallengeResponse *NetworkAuthChallengeResponse) (*gcdmessage.ChromeResponse, error) {
	var v NetworkContinueInterceptedRequestParams
	v.InterceptionId = interceptionId
	v.ErrorReason = errorReason
	v.RawResponse = rawResponse
	v.Url = url
	v.Method = method
	v.PostData = postData
	v.Headers = headers
	v.AuthChallengeResponse = authChallengeResponse
	return c.ContinueInterceptedRequestWithParams(ctx, &v)
}
type NetworkDeleteCookiesParams struct {
	Name string `json:"name"`
	Url string `json:"url,omitempty"`
	Domain string `json:"domain,omitempty"`
	Path string `json:"path,omitempty"`
}
func (c *Network) DeleteCookiesWithParams(ctx context.Context, v *NetworkDeleteCookiesParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.deleteCookies", Params: v})
}
func (c *Network) DeleteCookies(ctx context.Context, name string, url string, domain string, path string) (*gcdmessage.ChromeResponse, error) {
	var v NetworkDeleteCookiesParams
	v.Name = name
	v.Url = url
	v.Domain = domain
	v.Path = path
	return c.DeleteCookiesWithParams(ctx, &v)
}
func (c *Network) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.disable"})
}
type NetworkEmulateNetworkConditionsParams struct {
	Offline bool `json:"offline"`
	Latency float64 `json:"latency"`
	DownloadThroughput float64 `json:"downloadThroughput"`
	UploadThroughput float64 `json:"uploadThroughput"`
	ConnectionType string `json:"connectionType,omitempty"`
}
func (c *Network) EmulateNetworkConditionsWithParams(ctx context.Context, v *NetworkEmulateNetworkConditionsParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.emulateNetworkConditions", Params: v})
}