func (c *Network) GetAllCookies() ([]*NetworkCookie, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.getAllCookies"})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Cookies []*NetworkCookie
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Cookies, nil
}
GetAllCookies - Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field.
Returns -  cookies - Array of cookie objects.
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
}
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
}
func (c *Network) CanEmulateNetworkConditions() (bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &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() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.clearBrowserCache"})
}
func (c *Network) ClearBrowserCookies() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &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(v *NetworkContinueInterceptedRequestParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.continueInterceptedRequest", Params: v})
}
func (c *Network) ContinueInterceptedRequest(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(&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(v *NetworkDeleteCookiesParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.deleteCookies", Params: v})
}
func (c *Network) DeleteCookies(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(&v)
}
func (c *Network) Disable() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &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(v *NetworkEmulateNetworkConditionsParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.emulateNetworkConditions", Params: v})
}
func (c *Network) EmulateNetworkConditions(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(&v)
}
type NetworkEnableParams struct {
	MaxTotalBufferSize int `json:"maxTotalBufferSize,omitempty"`
	MaxResourceBufferSize int `json:"maxResourceBufferSize,omitempty"`
	MaxPostDataSize int `json:"maxPostDataSize,omitempty"`
}
func (c *Network) EnableWithParams(v *NetworkEnableParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.enable", Params: v})
}
func (c *Network) Enable(maxTotalBufferSize int, maxResourceBufferSize int, maxPostDataSize int) (*gcdmessage.ChromeResponse, error) {
	var v NetworkEnableParams
	v.MaxTotalBufferSize = maxTotalBufferSize
	v.MaxResourceBufferSize = maxResourceBufferSize
	v.MaxPostDataSize = maxPostDataSize
	return c.EnableWithParams(&v)
}