|
| 1 | +/** |
| 2 | + * -------------------------------------------------------------------------------------------------------------------- |
| 3 | + * <copyright company="Aspose Pty Ltd" file="ApiErrorResponse.java"> |
| 4 | + * Copyright (c) 2003-2023 Aspose Pty Ltd |
| 5 | + * </copyright> |
| 6 | + * <summary> |
| 7 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 8 | + * of this software and associated documentation files (the "Software"), to deal |
| 9 | + * in the Software without restriction, including without limitation the rights |
| 10 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 11 | + * copies of the Software, and to permit persons to whom the Software is |
| 12 | + * furnished to do so, subject to the following conditions: |
| 13 | + * |
| 14 | + * The above copyright notice and this permission notice shall be included in all |
| 15 | + * copies or substantial portions of the Software. |
| 16 | + * |
| 17 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 20 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 22 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 23 | + * SOFTWARE. |
| 24 | + * </summary> |
| 25 | + * -------------------------------------------------------------------------------------------------------------------- |
| 26 | + */ |
| 27 | + |
| 28 | +package com.groupdocs.cloud.conversion.model; |
| 29 | + |
| 30 | +import java.util.Objects; |
| 31 | +import com.google.gson.TypeAdapter; |
| 32 | +import com.google.gson.annotations.JsonAdapter; |
| 33 | +import com.google.gson.annotations.SerializedName; |
| 34 | +import com.google.gson.stream.JsonReader; |
| 35 | +import com.google.gson.stream.JsonWriter; |
| 36 | +import com.groupdocs.cloud.conversion.model.ApiError; |
| 37 | +import io.swagger.annotations.ApiModel; |
| 38 | +import io.swagger.annotations.ApiModelProperty; |
| 39 | +import java.io.IOException; |
| 40 | + |
| 41 | +/** |
| 42 | + * ApiErrorResponse |
| 43 | + */ |
| 44 | +public class ApiErrorResponse { |
| 45 | + @SerializedName("requestId") |
| 46 | + private String requestId = null; |
| 47 | + |
| 48 | + @SerializedName("error") |
| 49 | + private ApiError error = null; |
| 50 | + |
| 51 | + public ApiErrorResponse requestId(String requestId) { |
| 52 | + this.requestId = requestId; |
| 53 | + return this; |
| 54 | + } |
| 55 | + |
| 56 | + /** |
| 57 | + * Get requestId |
| 58 | + * @return requestId |
| 59 | + **/ |
| 60 | + @ApiModelProperty(value = "") |
| 61 | + public String getRequestId() { |
| 62 | + return requestId; |
| 63 | + } |
| 64 | + |
| 65 | + public void setRequestId(String requestId) { |
| 66 | + this.requestId = requestId; |
| 67 | + } |
| 68 | + |
| 69 | + public ApiErrorResponse error(ApiError error) { |
| 70 | + this.error = error; |
| 71 | + return this; |
| 72 | + } |
| 73 | + |
| 74 | + /** |
| 75 | + * Get error |
| 76 | + * @return error |
| 77 | + **/ |
| 78 | + @ApiModelProperty(value = "") |
| 79 | + public ApiError getError() { |
| 80 | + return error; |
| 81 | + } |
| 82 | + |
| 83 | + public void setError(ApiError error) { |
| 84 | + this.error = error; |
| 85 | + } |
| 86 | + |
| 87 | + |
| 88 | + @Override |
| 89 | + public boolean equals(java.lang.Object o) { |
| 90 | + if (this == o) { |
| 91 | + return true; |
| 92 | + } |
| 93 | + if (o == null || getClass() != o.getClass()) { |
| 94 | + return false; |
| 95 | + } |
| 96 | + ApiErrorResponse apiErrorResponse = (ApiErrorResponse) o; |
| 97 | + return Objects.equals(this.requestId, apiErrorResponse.requestId) && |
| 98 | + Objects.equals(this.error, apiErrorResponse.error); |
| 99 | + } |
| 100 | + |
| 101 | + @Override |
| 102 | + public int hashCode() { |
| 103 | + return Objects.hash(requestId, error); |
| 104 | + } |
| 105 | + |
| 106 | + |
| 107 | + @Override |
| 108 | + public String toString() { |
| 109 | + StringBuilder sb = new StringBuilder(); |
| 110 | + sb.append("class ApiErrorResponse {\n"); |
| 111 | + |
| 112 | + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); |
| 113 | + sb.append(" error: ").append(toIndentedString(error)).append("\n"); |
| 114 | + sb.append("}"); |
| 115 | + return sb.toString(); |
| 116 | + } |
| 117 | + |
| 118 | + /** |
| 119 | + * Convert the given object to string with each line indented by 4 spaces |
| 120 | + * (except the first line). |
| 121 | + */ |
| 122 | + private String toIndentedString(java.lang.Object o) { |
| 123 | + if (o == null) { |
| 124 | + return "null"; |
| 125 | + } |
| 126 | + return o.toString().replace("\n", "\n "); |
| 127 | + } |
| 128 | + |
| 129 | +} |
| 130 | + |
0 commit comments