func (c *BackgroundService) ClearEventsWithParams(ctx context.Context, v *BackgroundServiceClearEventsParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "BackgroundService.clearEvents", Params: v})
}
ClearEventsWithParams - Clears all stored data for the service.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type BackgroundServiceEventMetadata struct {
	Key   string `json:"key"`    
	Value string `json:"value"`  
}
type BackgroundServiceBackgroundServiceEvent struct {
	Timestamp                   float64                           `json:"timestamp"`                    
	Origin                      string                            `json:"origin"`                       
	ServiceWorkerRegistrationId string                            `json:"serviceWorkerRegistrationId"`  
	Service                     string                            `json:"service"`                      
	EventName                   string                            `json:"eventName"`                    
	InstanceId                  string                            `json:"instanceId"`                   
	EventMetadata               []*BackgroundServiceEventMetadata `json:"eventMetadata"`                
}
type BackgroundServiceRecordingStateChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		IsRecording bool   `json:"isRecording"`  
		Service     string `json:"service"`      
	} `json:"Params,omitempty"`
}
type BackgroundServiceBackgroundServiceEventReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		BackgroundServiceEvent *BackgroundServiceBackgroundServiceEvent `json:"backgroundServiceEvent"`  
	} `json:"Params,omitempty"`
}
type BackgroundService struct {
	target gcdmessage.ChromeTargeter
}
func NewBackgroundService(target gcdmessage.ChromeTargeter) *BackgroundService {
	c := &BackgroundService{target: target}
	return c
}
type BackgroundServiceStartObservingParams struct {
	Service string `json:"service"`
}
func (c *BackgroundService) StartObservingWithParams(ctx context.Context, v *BackgroundServiceStartObservingParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "BackgroundService.startObserving", Params: v})
}
func (c *BackgroundService) StartObserving(ctx context.Context, service string) (*gcdmessage.ChromeResponse, error) {
	var v BackgroundServiceStartObservingParams
	v.Service = service
	return c.StartObservingWithParams(ctx, &v)
}
type BackgroundServiceStopObservingParams struct {
	Service string `json:"service"`
}
func (c *BackgroundService) StopObservingWithParams(ctx context.Context, v *BackgroundServiceStopObservingParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "BackgroundService.stopObserving", Params: v})
}
func (c *BackgroundService) StopObserving(ctx context.Context, service string) (*gcdmessage.ChromeResponse, error) {
	var v BackgroundServiceStopObservingParams
	v.Service = service
	return c.StopObservingWithParams(ctx, &v)
}
type BackgroundServiceSetRecordingParams struct {
	ShouldRecord bool `json:"shouldRecord"`
	Service string `json:"service"`
}
func (c *BackgroundService) SetRecordingWithParams(ctx context.Context, v *BackgroundServiceSetRecordingParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "BackgroundService.setRecording", Params: v})
}
func (c *BackgroundService) SetRecording(ctx context.Context, shouldRecord bool, service string) (*gcdmessage.ChromeResponse, error) {
	var v BackgroundServiceSetRecordingParams
	v.ShouldRecord = shouldRecord
	v.Service = service
	return c.SetRecordingWithParams(ctx, &v)
}
type BackgroundServiceClearEventsParams struct {
	Service string `json:"service"`
}