1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 package ohos.devtools.datasources.utils.device.entity; 17 18 import java.io.Serializable; 19 import java.util.Objects; 20 21 /** 22 * Equipment process 23 * 24 * @since 2021/5/19 16:39 25 */ 26 public class DeviceProcessInfo implements Serializable { 27 private static final long serialVersionUID = -3815785606619485252L; 28 29 private String deviceName; 30 private String processName; 31 private long localSessionId; 32 private String deviceType; 33 private long startTime; 34 private long endTime; 35 36 /** 37 * get DeviceName 38 * 39 * @return String 40 */ getDeviceName()41 public String getDeviceName() { 42 return deviceName; 43 } 44 45 /** 46 * set DeviceName 47 * 48 * @param deviceName deviceName 49 */ setDeviceName(String deviceName)50 public void setDeviceName(String deviceName) { 51 this.deviceName = deviceName; 52 } 53 54 /** 55 * get ProcessName 56 * 57 * @return String 58 */ getProcessName()59 public String getProcessName() { 60 return processName; 61 } 62 63 /** 64 * set ProcessName 65 * 66 * @param processName processName 67 */ setProcessName(String processName)68 public void setProcessName(String processName) { 69 this.processName = processName; 70 } 71 72 /** 73 * get Device Type 74 * 75 * @return String 76 */ getDeviceType()77 public String getDeviceType() { 78 return deviceType; 79 } 80 81 /** 82 * set Device Type 83 * 84 * @param deviceType deviceType 85 */ setDeviceType(String deviceType)86 public void setDeviceType(String deviceType) { 87 this.deviceType = deviceType; 88 } 89 90 /** 91 * get LocalSession Id 92 * 93 * @return long 94 */ getLocalSessionId()95 public long getLocalSessionId() { 96 return localSessionId; 97 } 98 99 /** 100 * set LocalSession Id 101 * 102 * @param localSessionId localSessionId 103 */ setLocalSessionId(long localSessionId)104 public void setLocalSessionId(long localSessionId) { 105 this.localSessionId = localSessionId; 106 } 107 108 /** 109 * get Start Time 110 * 111 * @return long 112 */ getStartTime()113 public long getStartTime() { 114 return startTime; 115 } 116 117 /** 118 * set Start Time 119 * 120 * @param startTime startTime 121 */ setStartTime(long startTime)122 public void setStartTime(long startTime) { 123 this.startTime = startTime; 124 } 125 126 /** 127 * long 128 * 129 * @return getEndTime 130 */ getEndTime()131 public long getEndTime() { 132 return endTime; 133 } 134 135 /** 136 * set End Time 137 * 138 * @param endTime endTime 139 */ setEndTime(long endTime)140 public void setEndTime(long endTime) { 141 this.endTime = endTime; 142 } 143 144 @Override equals(Object obj)145 public boolean equals(Object obj) { 146 return super.equals(obj); 147 } 148 149 @Override hashCode()150 public int hashCode() { 151 return Objects.hash(deviceName, processName, localSessionId, deviceType, startTime, endTime); 152 } 153 154 @Override clone()155 protected Object clone() throws CloneNotSupportedException { 156 return super.clone(); 157 } 158 159 @Override toString()160 public String toString() { 161 return "DeviceProcessInfo{" 162 + "deviceName='" + deviceName + '\'' 163 + ", processName='" + processName + '\'' 164 + ", localSessionId=" + localSessionId 165 + ", deviceType='" + deviceType + '\'' 166 + ", startTime=" + startTime 167 + ", endTime=" + endTime 168 + '}'; 169 } 170 } 171