func (c *Animation) SeekAnimations(ctx context.Context, animations []string, currentTime float64) (*gcdmessage.ChromeResponse, error) {
	var v AnimationSeekAnimationsParams
	v.Animations = animations
	v.CurrentTime = currentTime
	return c.SeekAnimationsWithParams(ctx, &v)
}
SeekAnimations - Seek a set of animations to a particular time within each animation.
animations - List of animation ids to seek.
currentTime - Set the current time of each animation.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type AnimationAnimation struct {
	Id           string                    `json:"id"`                
	Name         string                    `json:"name"`              
	PausedState  bool                      `json:"pausedState"`       
	PlayState    string                    `json:"playState"`         
	PlaybackRate float64                   `json:"playbackRate"`      
	StartTime    float64                   `json:"startTime"`         
	CurrentTime  float64                   `json:"currentTime"`       
	Type         string                    `json:"type"`              
	Source       *AnimationAnimationEffect `json:"source,omitempty"`  
	CssId        string                    `json:"cssId,omitempty"`   
}
type AnimationAnimationEffect struct {
	Delay          float64                 `json:"delay"`                    
	EndDelay       float64                 `json:"endDelay"`                 
	IterationStart float64                 `json:"iterationStart"`           
	Iterations     float64                 `json:"iterations"`               
	Duration       float64                 `json:"duration"`                 
	Direction      string                  `json:"direction"`                
	Fill           string                  `json:"fill"`                     
	BackendNodeId  int                     `json:"backendNodeId,omitempty"`  
	KeyframesRule  *AnimationKeyframesRule `json:"keyframesRule,omitempty"`  
	Easing         string                  `json:"easing"`                   
}
type AnimationKeyframesRule struct {
	Name      string                    `json:"name,omitempty"`  
	Keyframes []*AnimationKeyframeStyle `json:"keyframes"`       
}
type AnimationKeyframeStyle struct {
	Offset string `json:"offset"`  
	Easing string `json:"easing"`  
}
type AnimationAnimationCanceledEvent struct {
	Method string `json:"method"`
	Params struct {
		Id string `json:"id"`  
	} `json:"Params,omitempty"`
}
type AnimationAnimationCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id string `json:"id"`  
	} `json:"Params,omitempty"`
}
type AnimationAnimationStartedEvent struct {
	Method string `json:"method"`
	Params struct {
		Animation *AnimationAnimation `json:"animation"`  
	} `json:"Params,omitempty"`
}
type Animation struct {
	target gcdmessage.ChromeTargeter
}
func NewAnimation(target gcdmessage.ChromeTargeter) *Animation {
	c := &Animation{target: target}
	return c
}
func (c *Animation) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.disable"})
}
func (c *Animation) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.enable"})
}
type AnimationGetCurrentTimeParams struct {
	Id string `json:"id"`
}
func (c *Animation) GetCurrentTimeWithParams(ctx context.Context, v *AnimationGetCurrentTimeParams) (float64, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.getCurrentTime", Params: v})
	if err != nil {
		return 0, err
	}
	var chromeData struct {
		Result struct {
			CurrentTime float64
		}
	}
	if resp == nil {
		return 0, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return 0, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return 0, err
	}
	return chromeData.Result.CurrentTime, nil
}
func (c *Animation) GetCurrentTime(ctx context.Context, id string) (float64, error) {
	var v AnimationGetCurrentTimeParams
	v.Id = id
	return c.GetCurrentTimeWithParams(ctx, &v)
}
func (c *Animation) GetPlaybackRate(ctx context.Context) (float64, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.getPlaybackRate"})
	if err != nil {
		return 0, err
	}
	var chromeData struct {
		Result struct {
			PlaybackRate float64
		}
	}
	if resp == nil {
		return 0, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return 0, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return 0, err
	}
	return chromeData.Result.PlaybackRate, nil
}
type AnimationReleaseAnimationsParams struct {
	Animations []string `json:"animations"`
}
func (c *Animation) ReleaseAnimationsWithParams(ctx context.Context, v *AnimationReleaseAnimationsParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.releaseAnimations", Params: v})
}
func (c *Animation) ReleaseAnimations(ctx context.Context, animations []string) (*gcdmessage.ChromeResponse, error) {
	var v AnimationReleaseAnimationsParams
	v.Animations = animations
	return c.ReleaseAnimationsWithParams(ctx, &v)
}
type AnimationResolveAnimationParams struct {
	AnimationId string `json:"animationId"`
}
func (c *Animation) ResolveAnimationWithParams(ctx context.Context, v *AnimationResolveAnimationParams) (*RuntimeRemoteObject, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.resolveAnimation", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			RemoteObject *RuntimeRemoteObject
		}
	}
	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.RemoteObject, nil
}
func (c *Animation) ResolveAnimation(ctx context.Context, animationId string) (*RuntimeRemoteObject, error) {
	var v AnimationResolveAnimationParams
	v.AnimationId = animationId
	return c.ResolveAnimationWithParams(ctx, &v)
}
type AnimationSeekAnimationsParams struct {
	Animations []string `json:"animations"`
	CurrentTime float64 `json:"currentTime"`
}
func (c *Animation) SeekAnimationsWithParams(ctx context.Context, v *AnimationSeekAnimationsParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Animation.seekAnimations", Params: v})
}