All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openqa.selenium.devtools.v90.media.model.PlayerEventsAdded Maven / Gradle / Ivy

Go to download

Selenium automates browsers. That's it! What you do with that power is entirely up to you.

There is a newer version: 4.0.0-beta-4
Show newest version
package org.openqa.selenium.devtools.v90.media.model;

import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;

/**
 * Send events as a list, allowing them to be batched on the browser for less
 * congestion. If batched, events must ALWAYS be in chronological order.
 */
public class PlayerEventsAdded {

    private final org.openqa.selenium.devtools.v90.media.model.PlayerId playerId;

    private final java.util.List events;

    public PlayerEventsAdded(org.openqa.selenium.devtools.v90.media.model.PlayerId playerId, java.util.List events) {
        this.playerId = java.util.Objects.requireNonNull(playerId, "playerId is required");
        this.events = java.util.Objects.requireNonNull(events, "events is required");
    }

    public org.openqa.selenium.devtools.v90.media.model.PlayerId getPlayerId() {
        return playerId;
    }

    public java.util.List getEvents() {
        return events;
    }

    private static PlayerEventsAdded fromJson(JsonInput input) {
        org.openqa.selenium.devtools.v90.media.model.PlayerId playerId = null;
        java.util.List events = null;
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "playerId":
                    playerId = input.read(org.openqa.selenium.devtools.v90.media.model.PlayerId.class);
                    break;
                case "events":
                    events = input.read(new com.google.common.reflect.TypeToken>() {
                    }.getType());
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new PlayerEventsAdded(playerId, events);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy