summaryrefslogtreecommitdiffstats
path: root/java/jvpp-stats/io/fd/jvpp/stats/dto
diff options
context:
space:
mode:
Diffstat (limited to 'java/jvpp-stats/io/fd/jvpp/stats/dto')
-rw-r--r--java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatistics.java101
-rw-r--r--java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetails.java71
-rw-r--r--java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetailsReplyDump.java54
-rw-r--r--java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDump.java51
4 files changed, 220 insertions, 57 deletions
diff --git a/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatistics.java b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatistics.java
index 49486a1..e831e35 100644
--- a/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatistics.java
+++ b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatistics.java
@@ -16,25 +16,27 @@
package io.fd.jvpp.stats.dto;
+import java.util.Objects;
+
public class InterfaceStatistics {
- private int swIfIndex;
- private int outErrors;
- private int outMulticastPkts;
- private int outUnicastPkts;
- private int outBroadcastPkts;
- private int outBytes;
- private int inErrors;
- private int inMulticastPkts;
- private int inUnicastPkts;
- private int inBroadcastPkts;
- private int inBytes;
+ public int swIfIndex;
+ public int outErrors;
+ public int outMulticastPkts;
+ public int outUnicastPkts;
+ public int outBroadcastPkts;
+ public int outBytes;
+ public int inErrors;
+ public int inMulticastPkts;
+ public int inUnicastPkts;
+ public int inBroadcastPkts;
+ public int inBytes;
public InterfaceStatistics(final int swIfIndex, final int outErrors, final int outMulticastPkts,
- final int outUnicastPkts,
- final int outBroadcastPkts, final int outBytes, final int inErrors,
- final int inMulticastPkts, final int inUnicastPkts,
- final int inBroadcastPkts, final int inBytes) {
+ final int outUnicastPkts, final int outBroadcastPkts,
+ final int outBytes, final int inErrors, final int inMulticastPkts,
+ final int inUnicastPkts, final int inBroadcastPkts,
+ final int inBytes) {
this.swIfIndex = swIfIndex;
this.outErrors = outErrors;
this.outMulticastPkts = outMulticastPkts;
@@ -48,52 +50,37 @@ public class InterfaceStatistics {
this.inBytes = inBytes;
}
- public int getSwIfIndex() {
- return swIfIndex;
- }
-
- public int getOutErrors() {
- return outErrors;
- }
-
- public int getOutMulticastPkts() {
- return outMulticastPkts;
- }
-
- public int getOutUnicastPkts() {
- return outUnicastPkts;
- }
-
- public int getOutBroadcastPkts() {
- return outBroadcastPkts;
- }
-
- public int getOutBytes() {
- return outBytes;
- }
-
- public int getInErrors() {
- return inErrors;
- }
-
- public int getInMulticastPkts() {
- return inMulticastPkts;
- }
-
- public int getInUnicastPkts() {
- return inUnicastPkts;
- }
-
- public int getInBroadcastPkts() {
- return inBroadcastPkts;
+ @Override
+ public boolean equals(final Object other) {
+ if (this == other) {
+ return true;
+ }
+ if (other == null || getClass() != other.getClass()) {
+ return false;
+ }
+ final InterfaceStatistics otherIfcStats = (InterfaceStatistics) other;
+ return swIfIndex == otherIfcStats.swIfIndex &&
+ outErrors == otherIfcStats.outErrors &&
+ outMulticastPkts == otherIfcStats.outMulticastPkts &&
+ outUnicastPkts == otherIfcStats.outUnicastPkts &&
+ outBroadcastPkts == otherIfcStats.outBroadcastPkts &&
+ outBytes == otherIfcStats.outBytes &&
+ inErrors == otherIfcStats.inErrors &&
+ inMulticastPkts == otherIfcStats.inMulticastPkts &&
+ inUnicastPkts == otherIfcStats.inUnicastPkts &&
+ inBroadcastPkts == otherIfcStats.inBroadcastPkts &&
+ inBytes == otherIfcStats.inBytes;
}
- public int getInBytes() {
- return inBytes;
+ @Override
+ public int hashCode() {
+ return Objects
+ .hash(swIfIndex, outErrors, outMulticastPkts, outUnicastPkts, outBroadcastPkts, outBytes, inErrors,
+ inMulticastPkts, inUnicastPkts, inBroadcastPkts, inBytes);
}
- @java.lang.Override
- public java.lang.String toString() {
+ @Override
+ public String toString() {
return "InterfaceStatistics{" +
"swIfIndex=" + swIfIndex +
", outErrors=" + outErrors +
diff --git a/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetails.java b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetails.java
new file mode 100644
index 0000000..997dc70
--- /dev/null
+++ b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetails.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2019 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.jvpp.stats.dto;
+
+/**
+ * <p>This class represents reply DTO for InterfaceStatisticsDetails.
+ */
+public final class InterfaceStatisticsDetails implements io.fd.jvpp.dto.JVppReply<InterfaceStatisticsDump> {
+ public int context;
+ public InterfaceStatistics[] interfaceStatistics;
+ public int length;
+
+ public InterfaceStatisticsDetails(int length, int context) {
+ this.context = context;
+ this.length = length;
+ this.interfaceStatistics = new InterfaceStatistics[length];
+ }
+
+ @Override
+ @io.fd.jvpp.coverity.SuppressFBWarnings("UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD")
+ public int hashCode() {
+ return java.util.Objects.hash(context, interfaceStatistics, length);
+ }
+
+ @Override
+ public boolean equals(final Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ final InterfaceStatisticsDetails other = (InterfaceStatisticsDetails) o;
+
+ if (!java.util.Objects.equals(this.context, other.context)) {
+ return false;
+ }
+ if (!java.util.Arrays.equals(this.interfaceStatistics, other.interfaceStatistics)) {
+ return false;
+ }
+ if (!java.util.Objects.equals(this.length, other.length)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return "InterfaceStatisticsDetails{" +
+ "context=" + context +
+ ", interfaceStatistics=" + java.util.Arrays.toString(interfaceStatistics) +
+ ", length=" + length +
+ '}';
+ }
+}
diff --git a/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetailsReplyDump.java b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetailsReplyDump.java
new file mode 100644
index 0000000..53ef30f
--- /dev/null
+++ b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDetailsReplyDump.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2019 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.jvpp.stats.dto;
+
+/**
+ * <p>This class represents dump reply wrapper for InterfaceStatisticsDetails.
+ */
+public final class InterfaceStatisticsDetailsReplyDump
+ implements io.fd.jvpp.dto.JVppReplyDump<InterfaceStatisticsDump, InterfaceStatisticsDetails> {
+
+ public InterfaceStatisticsDetails interfaceStatisticsDetails;
+
+ @Override
+ @io.fd.jvpp.coverity.SuppressFBWarnings("UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD")
+ public int hashCode() {
+ return java.util.Objects.hash(interfaceStatisticsDetails);
+ }
+
+ @Override
+ public boolean equals(final Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ final InterfaceStatisticsDetailsReplyDump
+ other = (InterfaceStatisticsDetailsReplyDump) o;
+
+ return java.util.Objects.equals(this.interfaceStatisticsDetails, other.interfaceStatisticsDetails);
+ }
+
+ @Override
+ public String toString() {
+ return "InterfaceStatisticsDetailsReplyDump{" +
+ "interfaceStatisticsDetails=" + interfaceStatisticsDetails +
+ '}';
+ }
+}
diff --git a/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDump.java b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDump.java
new file mode 100644
index 0000000..e51936a
--- /dev/null
+++ b/java/jvpp-stats/io/fd/jvpp/stats/dto/InterfaceStatisticsDump.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2019 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.jvpp.stats.dto;
+
+/**
+ * <p>This class represents request DTO.
+ */
+public final class InterfaceStatisticsDump implements io.fd.jvpp.dto.JVppDump {
+
+ @Override
+ @io.fd.jvpp.coverity.SuppressFBWarnings("UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD")
+ public int hashCode() {
+ return java.util.Objects.hash();
+ }
+
+ @Override
+ public boolean equals(final Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "InterfaceStatisticsDump{}";
+ }
+
+ @Override
+ public int send(final io.fd.jvpp.JVpp jvpp) throws io.fd.jvpp.VppInvocationException {
+ return ((io.fd.jvpp.stats.JVppStats) jvpp).interfaceStatisticsDump();
+ }
+}