func (c *ServiceWorker) StopWorker(versionId string) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerStopWorkerParams
	v.VersionId = versionId
	return c.StopWorkerWithParams(&v)
}
StopWorker -
versionId -
package gcdapi
import (
	"github.com/wirepair/gcd/gcdmessage"
)
type ServiceWorkerServiceWorkerRegistration struct {
	RegistrationId string `json:"registrationId"`  
	ScopeURL       string `json:"scopeURL"`        
	IsDeleted      bool   `json:"isDeleted"`       
}
type ServiceWorkerServiceWorkerVersion struct {
	VersionId          string   `json:"versionId"`                     
	RegistrationId     string   `json:"registrationId"`                
	ScriptURL          string   `json:"scriptURL"`                     
	RunningStatus      string   `json:"runningStatus"`                 
	Status             string   `json:"status"`                        
	ScriptLastModified float64  `json:"scriptLastModified,omitempty"`  
	ScriptResponseTime float64  `json:"scriptResponseTime,omitempty"`  
	ControlledClients  []string `json:"controlledClients,omitempty"`   
	TargetId           string   `json:"targetId,omitempty"`            
}
type ServiceWorkerServiceWorkerErrorMessage struct {
	ErrorMessage   string `json:"errorMessage"`    
	RegistrationId string `json:"registrationId"`  
	VersionId      string `json:"versionId"`       
	SourceURL      string `json:"sourceURL"`       
	LineNumber     int    `json:"lineNumber"`      
	ColumnNumber   int    `json:"columnNumber"`    
}
type ServiceWorkerWorkerErrorReportedEvent struct {
	Method string `json:"method"`
	Params struct {
		ErrorMessage *ServiceWorkerServiceWorkerErrorMessage `json:"errorMessage"`  
	} `json:"Params,omitempty"`
}
type ServiceWorkerWorkerRegistrationUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Registrations []*ServiceWorkerServiceWorkerRegistration `json:"registrations"`  
	} `json:"Params,omitempty"`
}
type ServiceWorkerWorkerVersionUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Versions []*ServiceWorkerServiceWorkerVersion `json:"versions"`  
	} `json:"Params,omitempty"`
}
type ServiceWorker struct {
	target gcdmessage.ChromeTargeter
}
func NewServiceWorker(target gcdmessage.ChromeTargeter) *ServiceWorker {
	c := &ServiceWorker{target: target}
	return c
}
type ServiceWorkerDeliverPushMessageParams struct {
	Origin string `json:"origin"`
	RegistrationId string `json:"registrationId"`
	Data string `json:"data"`
}
func (c *ServiceWorker) DeliverPushMessageWithParams(v *ServiceWorkerDeliverPushMessageParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.deliverPushMessage", Params: v})
}
func (c *ServiceWorker) DeliverPushMessage(origin string, registrationId string, data string) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerDeliverPushMessageParams
	v.Origin = origin
	v.RegistrationId = registrationId
	v.Data = data
	return c.DeliverPushMessageWithParams(&v)
}
func (c *ServiceWorker) Disable() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.disable"})
}
type ServiceWorkerDispatchSyncEventParams struct {
	Origin string `json:"origin"`
	RegistrationId string `json:"registrationId"`
	Tag string `json:"tag"`
	LastChance bool `json:"lastChance"`
}
func (c *ServiceWorker) DispatchSyncEventWithParams(v *ServiceWorkerDispatchSyncEventParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.dispatchSyncEvent", Params: v})
}
func (c *ServiceWorker) DispatchSyncEvent(origin string, registrationId string, tag string, lastChance bool) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerDispatchSyncEventParams
	v.Origin = origin
	v.RegistrationId = registrationId
	v.Tag = tag
	v.LastChance = lastChance
	return c.DispatchSyncEventWithParams(&v)
}
func (c *ServiceWorker) Enable() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.enable"})
}
type ServiceWorkerInspectWorkerParams struct {
	VersionId string `json:"versionId"`
}
func (c *ServiceWorker) InspectWorkerWithParams(v *ServiceWorkerInspectWorkerParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.inspectWorker", Params: v})
}
func (c *ServiceWorker) InspectWorker(versionId string) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerInspectWorkerParams
	v.VersionId = versionId
	return c.InspectWorkerWithParams(&v)
}
type ServiceWorkerSetForceUpdateOnPageLoadParams struct {
	ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"`
}
func (c *ServiceWorker) SetForceUpdateOnPageLoadWithParams(v *ServiceWorkerSetForceUpdateOnPageLoadParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.setForceUpdateOnPageLoad", Params: v})
}
func (c *ServiceWorker) SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerSetForceUpdateOnPageLoadParams
	v.ForceUpdateOnPageLoad = forceUpdateOnPageLoad
	return c.SetForceUpdateOnPageLoadWithParams(&v)
}
type ServiceWorkerSkipWaitingParams struct {
	ScopeURL string `json:"scopeURL"`
}
func (c *ServiceWorker) SkipWaitingWithParams(v *ServiceWorkerSkipWaitingParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.skipWaiting", Params: v})
}
func (c *ServiceWorker) SkipWaiting(scopeURL string) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerSkipWaitingParams
	v.ScopeURL = scopeURL
	return c.SkipWaitingWithParams(&v)
}
type ServiceWorkerStartWorkerParams struct {
	ScopeURL string `json:"scopeURL"`
}
func (c *ServiceWorker) StartWorkerWithParams(v *ServiceWorkerStartWorkerParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.startWorker", Params: v})
}
func (c *ServiceWorker) StartWorker(scopeURL string) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerStartWorkerParams
	v.ScopeURL = scopeURL
	return c.StartWorkerWithParams(&v)
}
func (c *ServiceWorker) StopAllWorkers() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.stopAllWorkers"})
}
type ServiceWorkerStopWorkerParams struct {
	VersionId string `json:"versionId"`
}
func (c *ServiceWorker) StopWorkerWithParams(v *ServiceWorkerStopWorkerParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.stopWorker", Params: v})
}