mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 12:37:45 +00:00
323 lines
8.9 KiB
Java
323 lines
8.9 KiB
Java
/*
|
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
*/
|
|
|
|
package dev.plexapi.sdk.models.operations;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import dev.plexapi.sdk.utils.Utils;
|
|
import java.lang.Boolean;
|
|
import java.lang.Integer;
|
|
import java.lang.Long;
|
|
import java.lang.Override;
|
|
import java.lang.String;
|
|
import java.util.Objects;
|
|
import java.util.Optional;
|
|
|
|
|
|
public class StatisticsBandwidth {
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("accountID")
|
|
private Optional<Integer> accountID;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("deviceID")
|
|
private Optional<Integer> deviceID;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("timespan")
|
|
private Optional<Long> timespan;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("at")
|
|
private Optional<Integer> at;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("lan")
|
|
private Optional<Boolean> lan;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("bytes")
|
|
private Optional<Long> bytes;
|
|
|
|
@JsonCreator
|
|
public StatisticsBandwidth(
|
|
@JsonProperty("accountID") Optional<Integer> accountID,
|
|
@JsonProperty("deviceID") Optional<Integer> deviceID,
|
|
@JsonProperty("timespan") Optional<Long> timespan,
|
|
@JsonProperty("at") Optional<Integer> at,
|
|
@JsonProperty("lan") Optional<Boolean> lan,
|
|
@JsonProperty("bytes") Optional<Long> bytes) {
|
|
Utils.checkNotNull(accountID, "accountID");
|
|
Utils.checkNotNull(deviceID, "deviceID");
|
|
Utils.checkNotNull(timespan, "timespan");
|
|
Utils.checkNotNull(at, "at");
|
|
Utils.checkNotNull(lan, "lan");
|
|
Utils.checkNotNull(bytes, "bytes");
|
|
this.accountID = accountID;
|
|
this.deviceID = deviceID;
|
|
this.timespan = timespan;
|
|
this.at = at;
|
|
this.lan = lan;
|
|
this.bytes = bytes;
|
|
}
|
|
|
|
public StatisticsBandwidth() {
|
|
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Integer> accountID() {
|
|
return accountID;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Integer> deviceID() {
|
|
return deviceID;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Long> timespan() {
|
|
return timespan;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Integer> at() {
|
|
return at;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Boolean> lan() {
|
|
return lan;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Long> bytes() {
|
|
return bytes;
|
|
}
|
|
|
|
public final static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
public StatisticsBandwidth withAccountID(int accountID) {
|
|
Utils.checkNotNull(accountID, "accountID");
|
|
this.accountID = Optional.ofNullable(accountID);
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withAccountID(Optional<Integer> accountID) {
|
|
Utils.checkNotNull(accountID, "accountID");
|
|
this.accountID = accountID;
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withDeviceID(int deviceID) {
|
|
Utils.checkNotNull(deviceID, "deviceID");
|
|
this.deviceID = Optional.ofNullable(deviceID);
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withDeviceID(Optional<Integer> deviceID) {
|
|
Utils.checkNotNull(deviceID, "deviceID");
|
|
this.deviceID = deviceID;
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withTimespan(long timespan) {
|
|
Utils.checkNotNull(timespan, "timespan");
|
|
this.timespan = Optional.ofNullable(timespan);
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withTimespan(Optional<Long> timespan) {
|
|
Utils.checkNotNull(timespan, "timespan");
|
|
this.timespan = timespan;
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withAt(int at) {
|
|
Utils.checkNotNull(at, "at");
|
|
this.at = Optional.ofNullable(at);
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withAt(Optional<Integer> at) {
|
|
Utils.checkNotNull(at, "at");
|
|
this.at = at;
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withLan(boolean lan) {
|
|
Utils.checkNotNull(lan, "lan");
|
|
this.lan = Optional.ofNullable(lan);
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withLan(Optional<Boolean> lan) {
|
|
Utils.checkNotNull(lan, "lan");
|
|
this.lan = lan;
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withBytes(long bytes) {
|
|
Utils.checkNotNull(bytes, "bytes");
|
|
this.bytes = Optional.ofNullable(bytes);
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth withBytes(Optional<Long> bytes) {
|
|
Utils.checkNotNull(bytes, "bytes");
|
|
this.bytes = bytes;
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(java.lang.Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
StatisticsBandwidth other = (StatisticsBandwidth) o;
|
|
return
|
|
Objects.deepEquals(this.accountID, other.accountID) &&
|
|
Objects.deepEquals(this.deviceID, other.deviceID) &&
|
|
Objects.deepEquals(this.timespan, other.timespan) &&
|
|
Objects.deepEquals(this.at, other.at) &&
|
|
Objects.deepEquals(this.lan, other.lan) &&
|
|
Objects.deepEquals(this.bytes, other.bytes);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(
|
|
accountID,
|
|
deviceID,
|
|
timespan,
|
|
at,
|
|
lan,
|
|
bytes);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return Utils.toString(StatisticsBandwidth.class,
|
|
"accountID", accountID,
|
|
"deviceID", deviceID,
|
|
"timespan", timespan,
|
|
"at", at,
|
|
"lan", lan,
|
|
"bytes", bytes);
|
|
}
|
|
|
|
public final static class Builder {
|
|
|
|
private Optional<Integer> accountID = Optional.empty();
|
|
|
|
private Optional<Integer> deviceID = Optional.empty();
|
|
|
|
private Optional<Long> timespan = Optional.empty();
|
|
|
|
private Optional<Integer> at = Optional.empty();
|
|
|
|
private Optional<Boolean> lan = Optional.empty();
|
|
|
|
private Optional<Long> bytes = Optional.empty();
|
|
|
|
private Builder() {
|
|
// force use of static builder() method
|
|
}
|
|
|
|
public Builder accountID(int accountID) {
|
|
Utils.checkNotNull(accountID, "accountID");
|
|
this.accountID = Optional.ofNullable(accountID);
|
|
return this;
|
|
}
|
|
|
|
public Builder accountID(Optional<Integer> accountID) {
|
|
Utils.checkNotNull(accountID, "accountID");
|
|
this.accountID = accountID;
|
|
return this;
|
|
}
|
|
|
|
public Builder deviceID(int deviceID) {
|
|
Utils.checkNotNull(deviceID, "deviceID");
|
|
this.deviceID = Optional.ofNullable(deviceID);
|
|
return this;
|
|
}
|
|
|
|
public Builder deviceID(Optional<Integer> deviceID) {
|
|
Utils.checkNotNull(deviceID, "deviceID");
|
|
this.deviceID = deviceID;
|
|
return this;
|
|
}
|
|
|
|
public Builder timespan(long timespan) {
|
|
Utils.checkNotNull(timespan, "timespan");
|
|
this.timespan = Optional.ofNullable(timespan);
|
|
return this;
|
|
}
|
|
|
|
public Builder timespan(Optional<Long> timespan) {
|
|
Utils.checkNotNull(timespan, "timespan");
|
|
this.timespan = timespan;
|
|
return this;
|
|
}
|
|
|
|
public Builder at(int at) {
|
|
Utils.checkNotNull(at, "at");
|
|
this.at = Optional.ofNullable(at);
|
|
return this;
|
|
}
|
|
|
|
public Builder at(Optional<Integer> at) {
|
|
Utils.checkNotNull(at, "at");
|
|
this.at = at;
|
|
return this;
|
|
}
|
|
|
|
public Builder lan(boolean lan) {
|
|
Utils.checkNotNull(lan, "lan");
|
|
this.lan = Optional.ofNullable(lan);
|
|
return this;
|
|
}
|
|
|
|
public Builder lan(Optional<Boolean> lan) {
|
|
Utils.checkNotNull(lan, "lan");
|
|
this.lan = lan;
|
|
return this;
|
|
}
|
|
|
|
public Builder bytes(long bytes) {
|
|
Utils.checkNotNull(bytes, "bytes");
|
|
this.bytes = Optional.ofNullable(bytes);
|
|
return this;
|
|
}
|
|
|
|
public Builder bytes(Optional<Long> bytes) {
|
|
Utils.checkNotNull(bytes, "bytes");
|
|
this.bytes = bytes;
|
|
return this;
|
|
}
|
|
|
|
public StatisticsBandwidth build() {
|
|
return new StatisticsBandwidth(
|
|
accountID,
|
|
deviceID,
|
|
timespan,
|
|
at,
|
|
lan,
|
|
bytes);
|
|
}
|
|
}
|
|
}
|
|
|