|
| 1 | +/* |
| 2 | + * -------------------------------------------------------------------------------- |
| 3 | + * <copyright company="Aspose" file="PublicKeyResponse.java"> |
| 4 | + * Copyright (c) 2021 Aspose.Words for Cloud |
| 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.aspose.words.cloud.model; |
| 29 | + |
| 30 | +import java.util.Objects; |
| 31 | +import java.util.Arrays; |
| 32 | +import java.util.ArrayList; |
| 33 | +import java.util.List; |
| 34 | +import java.io.IOException; |
| 35 | +import org.threeten.bp.OffsetDateTime; |
| 36 | +import com.aspose.words.cloud.model.*; |
| 37 | +import com.google.gson.TypeAdapter; |
| 38 | +import com.google.gson.annotations.JsonAdapter; |
| 39 | +import com.google.gson.annotations.SerializedName; |
| 40 | +import com.google.gson.stream.JsonReader; |
| 41 | +import com.google.gson.stream.JsonWriter; |
| 42 | +import io.swagger.annotations.ApiModel; |
| 43 | +import io.swagger.annotations.ApiModelProperty; |
| 44 | + |
| 45 | +/** |
| 46 | + * REST response for RSA public key info. |
| 47 | + */ |
| 48 | +@ApiModel(description = "REST response for RSA public key info.") |
| 49 | +public class PublicKeyResponse extends WordsResponse { |
| 50 | + @SerializedName("Exponent") |
| 51 | + private String exponent = null; |
| 52 | + |
| 53 | + @SerializedName("Modulus") |
| 54 | + private String modulus = null; |
| 55 | + public PublicKeyResponse exponent(String exponent) { |
| 56 | + this.exponent = exponent; |
| 57 | + return this; |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * Gets or sets RSA key exponent as Base64 string. |
| 62 | + * @return exponent |
| 63 | + **/ |
| 64 | + @ApiModelProperty(value = "Gets or sets RSA key exponent as Base64 string.") |
| 65 | + public String getExponent() { |
| 66 | + return exponent; |
| 67 | + } |
| 68 | + |
| 69 | + public void setExponent(String exponent) { |
| 70 | + this.exponent = exponent; |
| 71 | + } |
| 72 | + |
| 73 | + public PublicKeyResponse modulus(String modulus) { |
| 74 | + this.modulus = modulus; |
| 75 | + return this; |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * Gets or sets RSA key modulus as Base64 string. |
| 80 | + * @return modulus |
| 81 | + **/ |
| 82 | + @ApiModelProperty(value = "Gets or sets RSA key modulus as Base64 string.") |
| 83 | + public String getModulus() { |
| 84 | + return modulus; |
| 85 | + } |
| 86 | + |
| 87 | + public void setModulus(String modulus) { |
| 88 | + this.modulus = modulus; |
| 89 | + } |
| 90 | + |
| 91 | + @Override |
| 92 | + public boolean equals(java.lang.Object o) { |
| 93 | + if (this == o) { |
| 94 | + return true; |
| 95 | + } |
| 96 | + if (o == null || getClass() != o.getClass()) { |
| 97 | + return false; |
| 98 | + } |
| 99 | + |
| 100 | + PublicKeyResponse publicKeyResponse = (PublicKeyResponse) o; |
| 101 | + return |
| 102 | + Objects.equals(this.exponent, publicKeyResponse.exponent) && |
| 103 | + Objects.equals(this.modulus, publicKeyResponse.modulus) && |
| 104 | + super.equals(o); |
| 105 | + } |
| 106 | + |
| 107 | + @Override |
| 108 | + public int hashCode() { |
| 109 | + return Objects.hash(exponent, modulus, super.hashCode()); |
| 110 | + } |
| 111 | + |
| 112 | + @Override |
| 113 | + public String toString() { |
| 114 | + StringBuilder sb = new StringBuilder(); |
| 115 | + sb.append("class PublicKeyResponse {\n"); |
| 116 | + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); |
| 117 | + sb.append(" exponent: ").append(toIndentedString(exponent)).append("\n"); |
| 118 | + sb.append(" modulus: ").append(toIndentedString(modulus)).append("\n"); |
| 119 | + sb.append("}"); |
| 120 | + return sb.toString(); |
| 121 | + } |
| 122 | + |
| 123 | + /** |
| 124 | + * Convert the given object to string with each line indented by 4 spaces |
| 125 | + * (except the first line). |
| 126 | + */ |
| 127 | + private String toIndentedString(java.lang.Object o) { |
| 128 | + if (o == null) { |
| 129 | + return "null"; |
| 130 | + } |
| 131 | + return o.toString().replace("\n", "\n "); |
| 132 | + } |
| 133 | +} |
0 commit comments