com.hubspot.chrome.devtools.client.core.page.ScreencastFrameMetadata Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.page;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hubspot.chrome.devtools.client.core.network.TimeSinceEpoch;
/**
* Screencast frame metadata.
*/
public final class ScreencastFrameMetadata {
private Number offsetTop;
private Number pageScaleFactor;
private Number deviceWidth;
private Number deviceHeight;
private Number scrollOffsetX;
private Number scrollOffsetY;
private TimeSinceEpoch timestamp;
@JsonCreator
public ScreencastFrameMetadata(@JsonProperty("offsetTop") Number offsetTop,
@JsonProperty("pageScaleFactor") Number pageScaleFactor,
@JsonProperty("deviceWidth") Number deviceWidth,
@JsonProperty("deviceHeight") Number deviceHeight,
@JsonProperty("scrollOffsetX") Number scrollOffsetX,
@JsonProperty("scrollOffsetY") Number scrollOffsetY,
@JsonProperty("timestamp") TimeSinceEpoch timestamp) {
this.offsetTop = offsetTop;
this.pageScaleFactor = pageScaleFactor;
this.deviceWidth = deviceWidth;
this.deviceHeight = deviceHeight;
this.scrollOffsetX = scrollOffsetX;
this.scrollOffsetY = scrollOffsetY;
this.timestamp = timestamp;
}
public Number getOffsetTop() {
return offsetTop;
}
public Number getPageScaleFactor() {
return pageScaleFactor;
}
public Number getDeviceWidth() {
return deviceWidth;
}
public Number getDeviceHeight() {
return deviceHeight;
}
public Number getScrollOffsetX() {
return scrollOffsetX;
}
public Number getScrollOffsetY() {
return scrollOffsetY;
}
public TimeSinceEpoch getTimestamp() {
return timestamp;
}
public static ScreencastFrameMetadata.Builder builder() {
return new ScreencastFrameMetadata.Builder();
}
public static final class Builder {
private Number offsetTop;
private Number pageScaleFactor;
private Number deviceWidth;
private Number deviceHeight;
private Number scrollOffsetX;
private Number scrollOffsetY;
private TimeSinceEpoch timestamp;
private Builder() {
}
public ScreencastFrameMetadata.Builder setOffsetTop(Number offsetTop) {
this.offsetTop = offsetTop;
return this;
}
public ScreencastFrameMetadata.Builder setPageScaleFactor(Number pageScaleFactor) {
this.pageScaleFactor = pageScaleFactor;
return this;
}
public ScreencastFrameMetadata.Builder setDeviceWidth(Number deviceWidth) {
this.deviceWidth = deviceWidth;
return this;
}
public ScreencastFrameMetadata.Builder setDeviceHeight(Number deviceHeight) {
this.deviceHeight = deviceHeight;
return this;
}
public ScreencastFrameMetadata.Builder setScrollOffsetX(Number scrollOffsetX) {
this.scrollOffsetX = scrollOffsetX;
return this;
}
public ScreencastFrameMetadata.Builder setScrollOffsetY(Number scrollOffsetY) {
this.scrollOffsetY = scrollOffsetY;
return this;
}
public ScreencastFrameMetadata.Builder setTimestamp(TimeSinceEpoch timestamp) {
this.timestamp = timestamp;
return this;
}
public ScreencastFrameMetadata build() {
return new ScreencastFrameMetadata(offsetTop, pageScaleFactor, deviceWidth, deviceHeight, scrollOffsetX, scrollOffsetY, timestamp);
}
}
}