| /** |
| * Copyright (c) 2019 CEA. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * CEA - initial API and implementation and/or initial documentation |
| */ |
| package org.eclipse.sensinact.studio.http.messages.snamessage.actresponse; |
| |
| /** |
| * @author Etienne Gandrille |
| */ |
| public class ObjectResponse { |
| |
| private String task; |
| private long start; |
| private long end; |
| private String uri; |
| private String status; |
| |
| public String getTask() { |
| return task; |
| } |
| |
| public void setTask(String task) { |
| this.task = task; |
| } |
| |
| public long getStart() { |
| return start; |
| } |
| |
| public void setStart(long start) { |
| this.start = start; |
| } |
| |
| public long getEnd() { |
| return end; |
| } |
| |
| public void setEnd(long end) { |
| this.end = end; |
| } |
| |
| public String getUri() { |
| return uri; |
| } |
| |
| public void setUri(String uri) { |
| this.uri = uri; |
| } |
| |
| public String getStatus() { |
| return status; |
| } |
| |
| public void setStatus(String status) { |
| this.status = status; |
| } |
| |
| @Override |
| public int hashCode() { |
| final int prime = 31; |
| int result = 1; |
| result = prime * result + (int) (end ^ (end >>> 32)); |
| result = prime * result + (int) (start ^ (start >>> 32)); |
| result = prime * result + ((status == null) ? 0 : status.hashCode()); |
| result = prime * result + ((task == null) ? 0 : task.hashCode()); |
| result = prime * result + ((uri == null) ? 0 : uri.hashCode()); |
| return result; |
| } |
| |
| @Override |
| public boolean equals(Object obj) { |
| if (this == obj) |
| return true; |
| if (obj == null) |
| return false; |
| if (getClass() != obj.getClass()) |
| return false; |
| ObjectResponse other = (ObjectResponse) obj; |
| if (end != other.end) |
| return false; |
| if (start != other.start) |
| return false; |
| if (status == null) { |
| if (other.status != null) |
| return false; |
| } else if (!status.equals(other.status)) |
| return false; |
| if (task == null) { |
| if (other.task != null) |
| return false; |
| } else if (!task.equals(other.task)) |
| return false; |
| if (uri == null) { |
| if (other.uri != null) |
| return false; |
| } else if (!uri.equals(other.uri)) |
| return false; |
| return true; |
| } |
| |
| @Override |
| public String toString() { |
| return "ObjectResponse [task=" + task + ", start=" + start + ", end=" + end + ", uri=" + uri + ", status=" |
| + status + "]"; |
| } |
| } |