|
25 | 25 | import java.util.StringJoiner; |
26 | 26 |
|
27 | 27 | /** Result used when a table is successfully loaded. */ |
28 | | -@JsonPropertyOrder({GetTableResponse.JSON_PROPERTY_PROPERTIES}) |
| 28 | +@JsonPropertyOrder({ |
| 29 | + GetTableResponse.JSON_PROPERTY_LOCATION, |
| 30 | + GetTableResponse.JSON_PROPERTY_PROPERTIES |
| 31 | +}) |
29 | 32 | @javax.annotation.Generated( |
30 | 33 | value = "org.openapitools.codegen.languages.JavaClientCodegen", |
31 | 34 | comments = "Generator version: 7.12.0") |
32 | 35 | public class GetTableResponse { |
| 36 | + public static final String JSON_PROPERTY_LOCATION = "location"; |
| 37 | + @javax.annotation.Nonnull private String location; |
| 38 | + |
33 | 39 | public static final String JSON_PROPERTY_PROPERTIES = "properties"; |
34 | 40 | @javax.annotation.Nullable private Map<String, String> properties = new HashMap<>(); |
35 | 41 |
|
36 | 42 | public GetTableResponse() {} |
37 | 43 |
|
| 44 | + public GetTableResponse location(@javax.annotation.Nonnull String location) { |
| 45 | + |
| 46 | + this.location = location; |
| 47 | + return this; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * Get location |
| 52 | + * |
| 53 | + * @return location |
| 54 | + */ |
| 55 | + @javax.annotation.Nonnull |
| 56 | + @JsonProperty(JSON_PROPERTY_LOCATION) |
| 57 | + @JsonInclude(value = JsonInclude.Include.ALWAYS) |
| 58 | + public String getLocation() { |
| 59 | + return location; |
| 60 | + } |
| 61 | + |
| 62 | + @JsonProperty(JSON_PROPERTY_LOCATION) |
| 63 | + @JsonInclude(value = JsonInclude.Include.ALWAYS) |
| 64 | + public void setLocation(@javax.annotation.Nonnull String location) { |
| 65 | + this.location = location; |
| 66 | + } |
| 67 | + |
38 | 68 | public GetTableResponse properties(@javax.annotation.Nullable Map<String, String> properties) { |
39 | 69 |
|
40 | 70 | this.properties = properties; |
@@ -76,18 +106,20 @@ public boolean equals(Object o) { |
76 | 106 | return false; |
77 | 107 | } |
78 | 108 | GetTableResponse getTableResponse = (GetTableResponse) o; |
79 | | - return Objects.equals(this.properties, getTableResponse.properties); |
| 109 | + return Objects.equals(this.location, getTableResponse.location) |
| 110 | + && Objects.equals(this.properties, getTableResponse.properties); |
80 | 111 | } |
81 | 112 |
|
82 | 113 | @Override |
83 | 114 | public int hashCode() { |
84 | | - return Objects.hash(properties); |
| 115 | + return Objects.hash(location, properties); |
85 | 116 | } |
86 | 117 |
|
87 | 118 | @Override |
88 | 119 | public String toString() { |
89 | 120 | StringBuilder sb = new StringBuilder(); |
90 | 121 | sb.append("class GetTableResponse {\n"); |
| 122 | + sb.append(" location: ").append(toIndentedString(location)).append("\n"); |
91 | 123 | sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); |
92 | 124 | sb.append("}"); |
93 | 125 | return sb.toString(); |
@@ -135,6 +167,22 @@ public String toUrlQueryString(String prefix) { |
135 | 167 |
|
136 | 168 | StringJoiner joiner = new StringJoiner("&"); |
137 | 169 |
|
| 170 | + // add `location` to the URL query string |
| 171 | + if (getLocation() != null) { |
| 172 | + try { |
| 173 | + joiner.add( |
| 174 | + String.format( |
| 175 | + "%slocation%s=%s", |
| 176 | + prefix, |
| 177 | + suffix, |
| 178 | + URLEncoder.encode(String.valueOf(getLocation()), "UTF-8") |
| 179 | + .replaceAll("\\+", "%20"))); |
| 180 | + } catch (UnsupportedEncodingException e) { |
| 181 | + // Should never happen, UTF-8 is always supported |
| 182 | + throw new RuntimeException(e); |
| 183 | + } |
| 184 | + } |
| 185 | + |
138 | 186 | // add `properties` to the URL query string |
139 | 187 | if (getProperties() != null) { |
140 | 188 | for (String _key : getProperties().keySet()) { |
|
0 commit comments