| 1 | /** |
| 2 | * Licensed to jclouds, Inc. (jclouds) under one or more |
| 3 | * contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. jclouds licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | package org.jclouds.atmos.domain; |
| 20 | |
| 21 | /** |
| 22 | * When an Atmos Storage request is in error, the client receives an error response. |
| 23 | * |
| 24 | * Provides access to EMC Atmos Online Storage resources via their REST API. |
| 25 | * |
| 26 | * @author Adrian Cole |
| 27 | * |
| 28 | */ |
| 29 | public class AtmosError { |
| 30 | private final int code; |
| 31 | private final String message; |
| 32 | private String stringSigned; |
| 33 | |
| 34 | @Override |
| 35 | public String toString() { |
| 36 | return "AtmosError [code=" + code + ", message=" + message |
| 37 | + (stringSigned != null ? (", stringSigned=" + stringSigned) : "") + "]"; |
| 38 | } |
| 39 | |
| 40 | public AtmosError(int code, String message) { |
| 41 | this.code = code; |
| 42 | this.message = message; |
| 43 | } |
| 44 | |
| 45 | public int getCode() { |
| 46 | return code; |
| 47 | } |
| 48 | |
| 49 | public String getMessage() { |
| 50 | return message; |
| 51 | } |
| 52 | |
| 53 | public void setStringSigned(String stringSigned) { |
| 54 | this.stringSigned = stringSigned; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @return what jclouds signed before sending the request. |
| 59 | */ |
| 60 | public String getStringSigned() { |
| 61 | return stringSigned; |
| 62 | } |
| 63 | |
| 64 | } |