org.openqa.selenium.devtools.v90.webaudio.model.NodesDisconnected Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools-v90 Show documentation
Show all versions of selenium-devtools-v90 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
package org.openqa.selenium.devtools.v90.webaudio.model;
import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;
/**
* Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
*/
public class NodesDisconnected {
private final org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId contextId;
private final org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId sourceId;
private final org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId destinationId;
private final java.util.Optional sourceOutputIndex;
private final java.util.Optional destinationInputIndex;
public NodesDisconnected(org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId contextId, org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId sourceId, org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId destinationId, java.util.Optional sourceOutputIndex, java.util.Optional destinationInputIndex) {
this.contextId = java.util.Objects.requireNonNull(contextId, "contextId is required");
this.sourceId = java.util.Objects.requireNonNull(sourceId, "sourceId is required");
this.destinationId = java.util.Objects.requireNonNull(destinationId, "destinationId is required");
this.sourceOutputIndex = sourceOutputIndex;
this.destinationInputIndex = destinationInputIndex;
}
public org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId getContextId() {
return contextId;
}
public org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId getSourceId() {
return sourceId;
}
public org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId getDestinationId() {
return destinationId;
}
public java.util.Optional getSourceOutputIndex() {
return sourceOutputIndex;
}
public java.util.Optional getDestinationInputIndex() {
return destinationInputIndex;
}
private static NodesDisconnected fromJson(JsonInput input) {
org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId contextId = null;
org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId sourceId = null;
org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId destinationId = null;
java.util.Optional sourceOutputIndex = java.util.Optional.empty();
java.util.Optional destinationInputIndex = java.util.Optional.empty();
input.beginObject();
while (input.hasNext()) {
switch(input.nextName()) {
case "contextId":
contextId = input.read(org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId.class);
break;
case "sourceId":
sourceId = input.read(org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId.class);
break;
case "destinationId":
destinationId = input.read(org.openqa.selenium.devtools.v90.webaudio.model.GraphObjectId.class);
break;
case "sourceOutputIndex":
sourceOutputIndex = java.util.Optional.ofNullable(input.nextNumber());
break;
case "destinationInputIndex":
destinationInputIndex = java.util.Optional.ofNullable(input.nextNumber());
break;
default:
input.skipValue();
break;
}
}
input.endObject();
return new NodesDisconnected(contextId, sourceId, destinationId, sourceOutputIndex, destinationInputIndex);
}
}