2 * Copyright 2017 Gregory Moyer
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openhab.binding.sleepiq.api.model;
18 import com.google.gson.annotations.SerializedName;
22 @SerializedName("Code")
24 @SerializedName("Message")
25 private String message;
32 public void setCode(Long code)
37 public Error withCode(Long code)
43 public String getMessage()
48 public void setMessage(String message)
50 this.message = message;
53 public Error withMessage(String message)
64 result = prime * result + ((code == null) ? 0 : code.hashCode());
69 public boolean equals(Object obj)
79 if (!(obj instanceof Error))
83 Error other = (Error)obj;
86 if (other.code != null)
91 else if (!code.equals(other.code))
99 public String toString()
101 StringBuilder builder = new StringBuilder();
102 builder.append("Error [code=");
103 builder.append(code);
104 builder.append(", message=");
105 builder.append(message);
107 return builder.toString();