func (c *Network) CanClearBrowserCookies() (bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &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
}
CanClearBrowserCookies - Tells whether clearing browser cookies is supported.
Returns -  result - True if browser cookies can be cleared.
package gcdapi
import (
	"encoding/json"
	"github.com/wirepair/gcd/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"`        
	SendStart         float64 `json:"sendStart"`          
	SendEnd           float64 `json:"sendEnd"`            
	PushStart         float64 `json:"pushStart"`          
	PushEnd           float64 `json:"pushEnd"`            
	ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"`  
}
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"`       
	MixedContentType string                 `json:"mixedContentType,omitempty"`  
	InitialPriority  string                 `json:"initialPriority"`             
	ReferrerPolicy   string                 `json:"referrerPolicy"`              
	IsLinkPreload    bool                   `json:"isLinkPreload,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 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"`   
	EncodedDataLength  float64                 `json:"encodedDataLength"`             
	Timing             *NetworkResourceTiming  `json:"timing,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"`  
}
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"`  
}
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"`   
}
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"`       
	RequestMethod   string                            `json:"requestMethod"`    
	ResponseCode    int                               `json:"responseCode"`     
	ResponseHeaders map[string]interface{}            `json:"responseHeaders"`  
	Signatures      []*NetworkSignedExchangeSignature `json:"signatures"`       
}
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 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"`  
	} `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"`      
	} `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 Network struct {
	target gcdmessage.ChromeTargeter
}
func NewNetwork(target gcdmessage.ChromeTargeter) *Network {
	c := &Network{target: target}
	return c
}
func (c *Network) CanClearBrowserCache() (bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &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
}