use okttp builder instead of instance in retrofit2

Fix #3188
This commit is contained in:
cbornet 2016-06-29 16:02:50 +02:00
parent acc28495e8
commit f54b505704
83 changed files with 4687 additions and 1004 deletions

View File

@ -48,7 +48,7 @@ import {{invokerPackage}}.auth.OAuthFlow;
public class ApiClient { public class ApiClient {
private Map<String, Interceptor> apiAuthorizations; private Map<String, Interceptor> apiAuthorizations;
private OkHttpClient okClient; private OkHttpClient.Builder okBuilder;
private Retrofit.Builder adapterBuilder; private Retrofit.Builder adapterBuilder;
public ApiClient() { public ApiClient() {
@ -130,7 +130,7 @@ public class ApiClient {
.registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter())
.create(); .create();
okClient = new OkHttpClient(); okBuilder = new OkHttpClient.Builder();
String baseUrl = "{{{basePath}}}"; String baseUrl = "{{{basePath}}}";
if(!baseUrl.endsWith("/")) if(!baseUrl.endsWith("/"))
@ -139,14 +139,16 @@ public class ApiClient {
adapterBuilder = new Retrofit adapterBuilder = new Retrofit
.Builder() .Builder()
.baseUrl(baseUrl) .baseUrl(baseUrl)
.client(okClient)
{{#useRxJava}}.addCallAdapterFactory(RxJavaCallAdapterFactory.create()){{/useRxJava}} {{#useRxJava}}.addCallAdapterFactory(RxJavaCallAdapterFactory.create()){{/useRxJava}}
.addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonCustomConverterFactory.create(gson)); .addConverterFactory(GsonCustomConverterFactory.create(gson));
} }
public <S> S createService(Class<S> serviceClass) { public <S> S createService(Class<S> serviceClass) {
return adapterBuilder.build().create(serviceClass); return adapterBuilder
.client(okBuilder.build())
.build()
.create(serviceClass);
} }
@ -272,7 +274,7 @@ public class ApiClient {
throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
} }
apiAuthorizations.put(authName, authorization); apiAuthorizations.put(authName, authorization);
okClient.interceptors().add(authorization); okBuilder.addInterceptor(authorization);
} }
public Map<String, Interceptor> getApiAuthorizations() { public Map<String, Interceptor> getApiAuthorizations() {
@ -291,24 +293,24 @@ public class ApiClient {
this.adapterBuilder = adapterBuilder; this.adapterBuilder = adapterBuilder;
} }
public OkHttpClient getOkClient() { public OkHttpClient.Builder getOkBuilder() {
return okClient; return okBuilder;
} }
public void addAuthsToOkClient(OkHttpClient okClient) { public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) { for(Interceptor apiAuthorization : apiAuthorizations.values()) {
okClient.interceptors().add(apiAuthorization); okBuilder.addInterceptor(apiAuthorization);
} }
} }
/** /**
* Clones the okClient given in parameter, adds the auth interceptors and uses it to configure the Retrofit * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit
* @param okClient * @param okClient
*/ */
public void configureFromOkclient(OkHttpClient okClient) { public void configureFromOkclient(OkHttpClient okClient) {
OkHttpClient clone = okClient.newBuilder().build(); this.okBuilder = okClient.newBuilder();
addAuthsToOkClient(clone); addAuthsToOkBuilder(this.okBuilder);
adapterBuilder.client(clone);
} }
} }

View File

@ -32,10 +32,6 @@ After the client library is installed/deployed, you can use it in your Maven pro
``` ```
## Recommendation
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue.
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}

View File

@ -155,16 +155,15 @@
<java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version> <java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<swagger-core-version>1.5.8</swagger-core-version> <swagger-core-version>1.5.9</swagger-core-version>
<retrofit-version>2.0.2</retrofit-version> <retrofit-version>2.1.0</retrofit-version>
{{#useRxJava}} {{#useRxJava}}
<rxjava-version>1.1.3</rxjava-version> <rxjava-version>1.1.6</rxjava-version>
{{/useRxJava}} {{/useRxJava}}
{{^java8}} {{^java8}}
<jodatime-version>2.9.3</jodatime-version> <jodatime-version>2.9.4</jodatime-version>
{{/java8}} {{/java8}}
<oltu-version>1.0.1</oltu-version> <oltu-version>1.0.1</oltu-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version> <junit-version>4.12</junit-version>
</properties> </properties>
</project> </project>

View File

@ -0,0 +1,29 @@
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
- mvn test
# uncomment below to test using gradle
# - gradle test
# uncomment below to test using sbt
# - sbt test

View File

@ -0,0 +1,10 @@
# ArrayOfArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayArrayNumber** | [**List&lt;List&lt;BigDecimal&gt;&gt;**](List.md) | | [optional]

View File

@ -0,0 +1,10 @@
# ArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayNumber** | [**List&lt;BigDecimal&gt;**](BigDecimal.md) | | [optional]

View File

@ -7,6 +7,13 @@ Name | Type | Description | Notes
**arrayOfString** | **List&lt;String&gt;** | | [optional] **arrayOfString** | **List&lt;String&gt;** | | [optional]
**arrayArrayOfInteger** | [**List&lt;List&lt;Long&gt;&gt;**](List.md) | | [optional] **arrayArrayOfInteger** | [**List&lt;List&lt;Long&gt;&gt;**](List.md) | | [optional]
**arrayArrayOfModel** | [**List&lt;List&lt;ReadOnlyFirst&gt;&gt;**](List.md) | | [optional] **arrayArrayOfModel** | [**List&lt;List&lt;ReadOnlyFirst&gt;&gt;**](List.md) | | [optional]
**arrayOfEnum** | [**List&lt;ArrayOfEnumEnum&gt;**](#List&lt;ArrayOfEnumEnum&gt;) | | [optional]
<a name="List<ArrayOfEnumEnum>"></a>
## Enum: List&lt;ArrayOfEnumEnum&gt;
Name | Value
---- | -----

View File

@ -4,9 +4,54 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**testCodeInjectEnd**](FakeApi.md#testCodeInjectEnd) | **PUT** fake | To test code injection &#x3D;end
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** fake | To test enum query parameters
<a name="testCodeInjectEnd"></a>
# **testCodeInjectEnd**
> Void testCodeInjectEnd(testCodeInjectEnd)
To test code injection &#x3D;end
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
String testCodeInjectEnd = "testCodeInjectEnd_example"; // String | To test code injection =end
try {
Void result = apiInstance.testCodeInjectEnd(testCodeInjectEnd);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testCodeInjectEnd");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**testCodeInjectEnd** | **String**| To test code injection &#x3D;end | [optional]
### Return type
[**Void**](.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json, */ =end'));(phpinfo('
- **Accept**: application/json, */ end
<a name="testEndpointParameters"></a> <a name="testEndpointParameters"></a>
# **testEndpointParameters** # **testEndpointParameters**
> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password) > Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
@ -74,3 +119,50 @@ No authorization required
- **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
<a name="testEnumQueryParameters"></a>
# **testEnumQueryParameters**
> Void testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble)
To test enum query parameters
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
BigDecimal enumQueryInteger = new BigDecimal(); // BigDecimal | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
try {
Void result = apiInstance.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumQueryParameters");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **BigDecimal**| Query parameter enum test (double) | [optional]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional]
### Return type
[**Void**](.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json

View File

@ -0,0 +1,11 @@
# HasOnlyReadOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]
**foo** | **String** | | [optional]

View File

@ -0,0 +1,17 @@
# MapTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapMapOfString** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapOfEnumString** | [**Map&lt;String, InnerEnum&gt;**](#Map&lt;String, InnerEnum&gt;) | | [optional]
<a name="Map<String, InnerEnum>"></a>
## Enum: Map&lt;String, InnerEnum&gt;
Name | Value
---- | -----

View File

@ -0,0 +1,10 @@
# NumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]

0
samples/client/petstore/java/retrofit2/gradlew vendored Executable file → Normal file
View File

View File

@ -141,11 +141,10 @@
<java.version>1.7</java.version> <java.version>1.7</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<swagger-core-version>1.5.8</swagger-core-version> <swagger-core-version>1.5.9</swagger-core-version>
<retrofit-version>2.0.2</retrofit-version> <retrofit-version>2.1.0</retrofit-version>
<jodatime-version>2.9.3</jodatime-version> <jodatime-version>2.9.4</jodatime-version>
<oltu-version>1.0.1</oltu-version> <oltu-version>1.0.1</oltu-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version> <junit-version>4.12</junit-version>
</properties> </properties>
</project> </project>

View File

@ -41,7 +41,7 @@ import io.swagger.client.auth.OAuthFlow;
public class ApiClient { public class ApiClient {
private Map<String, Interceptor> apiAuthorizations; private Map<String, Interceptor> apiAuthorizations;
private OkHttpClient okClient; private OkHttpClient.Builder okBuilder;
private Retrofit.Builder adapterBuilder; private Retrofit.Builder adapterBuilder;
public ApiClient() { public ApiClient() {
@ -117,7 +117,7 @@ public class ApiClient {
.registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter())
.create(); .create();
okClient = new OkHttpClient(); okBuilder = new OkHttpClient.Builder();
String baseUrl = "http://petstore.swagger.io/v2"; String baseUrl = "http://petstore.swagger.io/v2";
if(!baseUrl.endsWith("/")) if(!baseUrl.endsWith("/"))
@ -126,14 +126,16 @@ public class ApiClient {
adapterBuilder = new Retrofit adapterBuilder = new Retrofit
.Builder() .Builder()
.baseUrl(baseUrl) .baseUrl(baseUrl)
.client(okClient)
.addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonCustomConverterFactory.create(gson)); .addConverterFactory(GsonCustomConverterFactory.create(gson));
} }
public <S> S createService(Class<S> serviceClass) { public <S> S createService(Class<S> serviceClass) {
return adapterBuilder.build().create(serviceClass); return adapterBuilder
.client(okBuilder.build())
.build()
.create(serviceClass);
} }
@ -259,7 +261,7 @@ public class ApiClient {
throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
} }
apiAuthorizations.put(authName, authorization); apiAuthorizations.put(authName, authorization);
okClient.interceptors().add(authorization); okBuilder.addInterceptor(authorization);
} }
public Map<String, Interceptor> getApiAuthorizations() { public Map<String, Interceptor> getApiAuthorizations() {
@ -278,24 +280,24 @@ public class ApiClient {
this.adapterBuilder = adapterBuilder; this.adapterBuilder = adapterBuilder;
} }
public OkHttpClient getOkClient() { public OkHttpClient.Builder getOkBuilder() {
return okClient; return okBuilder;
} }
public void addAuthsToOkClient(OkHttpClient okClient) { public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) { for(Interceptor apiAuthorization : apiAuthorizations.values()) {
okClient.interceptors().add(apiAuthorization); okBuilder.addInterceptor(apiAuthorization);
} }
} }
/** /**
* Clones the okClient given in parameter, adds the auth interceptors and uses it to configure the Retrofit * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit
* @param okClient * @param okClient
*/ */
public void configureFromOkclient(OkHttpClient okClient) { public void configureFromOkclient(OkHttpClient okClient) {
OkHttpClient clone = okClient.newBuilder().build(); this.okBuilder = okClient.newBuilder();
addAuthsToOkClient(clone); addAuthsToOkBuilder(this.okBuilder);
adapterBuilder.client(clone);
} }
} }

View File

@ -18,6 +18,19 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public interface FakeApi { public interface FakeApi {
/**
* To test code injection &#x3D;end
*
* @param testCodeInjectEnd To test code injection &#x3D;end (optional)
* @return Call<Void>
*/
@FormUrlEncoded
@PUT("fake")
Call<Void> testCodeInjectEnd(
@Field("test code inject */ &#x3D;end") String testCodeInjectEnd
);
/** /**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -42,4 +55,19 @@ public interface FakeApi {
@Field("number") BigDecimal number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password @Field("number") BigDecimal number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password
); );
/**
* To test enum query parameters
*
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @return Call<Void>
*/
@FormUrlEncoded
@GET("fake")
Call<Void> testEnumQueryParameters(
@Field("enum_query_string") String enumQueryString, @Query("enum_query_integer") BigDecimal enumQueryInteger, @Field("enum_query_double") Double enumQueryDouble
);
} }

View File

@ -1,49 +1,89 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.google.gson.annotations.SerializedName;
/**
* AdditionalPropertiesClass
*/
public class AdditionalPropertiesClass { public class AdditionalPropertiesClass {
@SerializedName("map_property") @SerializedName("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>(); private Map<String, String> mapProperty = new HashMap<String, String>();
@SerializedName("map_of_map_property") @SerializedName("map_of_map_property")
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>(); private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>();
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
/** /**
* Get mapProperty
* @return mapProperty
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Map<String, String> getMapProperty() { public Map<String, String> getMapProperty() {
return mapProperty; return mapProperty;
} }
public void setMapProperty(Map<String, String> mapProperty) { public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty; this.mapProperty = mapProperty;
} }
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
/** /**
* Get mapOfMapProperty
* @return mapOfMapProperty
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Map<String, Map<String, String>> getMapOfMapProperty() { public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty; return mapOfMapProperty;
} }
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) { public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty; this.mapOfMapProperty = mapOfMapProperty;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -51,8 +91,8 @@ public class AdditionalPropertiesClass {
return false; return false;
} }
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(mapProperty, additionalPropertiesClass.mapProperty) && return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
} }
@Override @Override
@ -75,10 +115,11 @@ public class AdditionalPropertiesClass {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,46 +1,86 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* Animal
*/
public class Animal { public class Animal {
@SerializedName("className") @SerializedName("className")
private String className = null; private String className = null;
@SerializedName("color") @SerializedName("color")
private String color = "red"; private String color = "red";
public Animal className(String className) {
this.className = className;
return this;
}
/** /**
* Get className
* @return className
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Animal color(String color) {
this.color = color;
return this;
}
/** /**
* Get color
* @return color
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -48,8 +88,8 @@ public class Animal {
return false; return false;
} }
Animal animal = (Animal) o; Animal animal = (Animal) o;
return Objects.equals(className, animal.className) && return Objects.equals(this.className, animal.className) &&
Objects.equals(color, animal.color); Objects.equals(this.color, animal.color);
} }
@Override @Override
@ -72,10 +112,11 @@ public class Animal {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,3 +1,28 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
@ -5,30 +30,27 @@ import io.swagger.client.model.Animal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* AnimalFarm
*/
public class AnimalFarm extends ArrayList<Animal> { public class AnimalFarm extends ArrayList<Animal> {
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
AnimalFarm animalFarm = (AnimalFarm) o;
return true; return true;
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(); return Objects.hash(super.hashCode());
} }
@Override @Override
@ -44,10 +66,11 @@ public class AnimalFarm extends ArrayList<Animal> {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,102 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfArrayOfNumberOnly
*/
public class ArrayOfArrayOfNumberOnly {
@SerializedName("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
/**
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@ApiModelProperty(example = "null", value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,102 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfNumberOnly
*/
public class ArrayOfNumberOnly {
@SerializedName("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
/**
* Get arrayNumber
* @return arrayNumber
**/
@ApiModelProperty(example = "null", value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,19 +1,44 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.ReadOnlyFirst;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* ArrayTest
*/
public class ArrayTest { public class ArrayTest {
@SerializedName("array_of_string") @SerializedName("array_of_string")
private List<String> arrayOfString = new ArrayList<String>(); private List<String> arrayOfString = new ArrayList<String>();
@ -24,38 +49,105 @@ public class ArrayTest {
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>(); private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
/** /**
* Gets or Sets arrayOfEnum
*/
public enum ArrayOfEnumEnum {
@SerializedName("UPPER")
UPPER("UPPER"),
@SerializedName("lower")
LOWER("lower");
private String value;
ArrayOfEnumEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
@SerializedName("array_of_enum")
private List<ArrayOfEnumEnum> arrayOfEnum = new ArrayList<ArrayOfEnumEnum>();
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
/**
* Get arrayOfString
* @return arrayOfString
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<String> getArrayOfString() { public List<String> getArrayOfString() {
return arrayOfString; return arrayOfString;
} }
public void setArrayOfString(List<String> arrayOfString) { public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString; this.arrayOfString = arrayOfString;
} }
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
/** /**
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger; return arrayArrayOfInteger;
} }
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) { public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger; this.arrayArrayOfInteger = arrayArrayOfInteger;
} }
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
/** /**
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel; return arrayArrayOfModel;
} }
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) { public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel; this.arrayArrayOfModel = arrayArrayOfModel;
} }
public ArrayTest arrayOfEnum(List<ArrayOfEnumEnum> arrayOfEnum) {
this.arrayOfEnum = arrayOfEnum;
return this;
}
/**
* Get arrayOfEnum
* @return arrayOfEnum
**/
@ApiModelProperty(example = "null", value = "")
public List<ArrayOfEnumEnum> getArrayOfEnum() {
return arrayOfEnum;
}
public void setArrayOfEnum(List<ArrayOfEnumEnum> arrayOfEnum) {
this.arrayOfEnum = arrayOfEnum;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -63,14 +155,15 @@ public class ArrayTest {
return false; return false;
} }
ArrayTest arrayTest = (ArrayTest) o; ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(arrayOfString, arrayTest.arrayOfString) && return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(arrayArrayOfModel, arrayTest.arrayArrayOfModel); Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel) &&
Objects.equals(this.arrayOfEnum, arrayTest.arrayOfEnum);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel, arrayOfEnum);
} }
@Override @Override
@ -81,6 +174,7 @@ public class ArrayTest {
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n");
sb.append(" arrayOfEnum: ").append(toIndentedString(arrayOfEnum)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
@ -89,10 +183,11 @@ public class ArrayTest {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,18 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal; import io.swagger.client.model.Animal;
import com.google.gson.annotations.SerializedName;
/**
* Cat
*/
public class Cat extends Animal { public class Cat extends Animal {
@SerializedName("className") @SerializedName("className")
private String className = null; private String className = null;
@ -22,39 +46,63 @@ public class Cat extends Animal {
@SerializedName("declawed") @SerializedName("declawed")
private Boolean declawed = null; private Boolean declawed = null;
public Cat className(String className) {
this.className = className;
return this;
}
/** /**
* Get className
* @return className
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Cat color(String color) {
this.color = color;
return this;
}
/** /**
* Get color
* @return color
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
/** /**
* Get declawed
* @return declawed
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Boolean getDeclawed() { public Boolean getDeclawed() {
return declawed; return declawed;
} }
public void setDeclawed(Boolean declawed) { public void setDeclawed(Boolean declawed) {
this.declawed = declawed; this.declawed = declawed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -62,14 +110,15 @@ public class Cat extends Animal {
return false; return false;
} }
Cat cat = (Cat) o; Cat cat = (Cat) o;
return Objects.equals(className, cat.className) && return Objects.equals(this.className, cat.className) &&
Objects.equals(color, cat.color) && Objects.equals(this.color, cat.color) &&
Objects.equals(declawed, cat.declawed); Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(className, color, declawed); return Objects.hash(className, color, declawed, super.hashCode());
} }
@Override @Override
@ -88,10 +137,11 @@ public class Cat extends Animal {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,46 +1,86 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* Category
*/
public class Category { public class Category {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@SerializedName("name") @SerializedName("name")
private String name = null; private String name = null;
public Category id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Category name(String name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -48,8 +88,8 @@ public class Category {
return false; return false;
} }
Category category = (Category) o; Category category = (Category) o;
return Objects.equals(id, category.id) && return Objects.equals(this.id, category.id) &&
Objects.equals(name, category.name); Objects.equals(this.name, category.name);
} }
@Override @Override
@ -72,10 +112,11 @@ public class Category {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,18 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal; import io.swagger.client.model.Animal;
import com.google.gson.annotations.SerializedName;
/**
* Dog
*/
public class Dog extends Animal { public class Dog extends Animal {
@SerializedName("className") @SerializedName("className")
private String className = null; private String className = null;
@ -22,39 +46,63 @@ public class Dog extends Animal {
@SerializedName("breed") @SerializedName("breed")
private String breed = null; private String breed = null;
public Dog className(String className) {
this.className = className;
return this;
}
/** /**
* Get className
* @return className
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Dog color(String color) {
this.color = color;
return this;
}
/** /**
* Get color
* @return color
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/** /**
* Get breed
* @return breed
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getBreed() { public String getBreed() {
return breed; return breed;
} }
public void setBreed(String breed) { public void setBreed(String breed) {
this.breed = breed; this.breed = breed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -62,14 +110,15 @@ public class Dog extends Animal {
return false; return false;
} }
Dog dog = (Dog) o; Dog dog = (Dog) o;
return Objects.equals(className, dog.className) && return Objects.equals(this.className, dog.className) &&
Objects.equals(color, dog.color) && Objects.equals(this.color, dog.color) &&
Objects.equals(breed, dog.breed); Objects.equals(this.breed, dog.breed) &&
super.equals(o);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(className, color, breed); return Objects.hash(className, color, breed, super.hashCode());
} }
@Override @Override
@ -88,10 +137,11 @@ public class Dog extends Animal {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,50 +1,57 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
/**
* Gets or Sets EnumClass
*/
public enum EnumClass {
@SerializedName("_abc")
_ABC("_abc"),
@SerializedName("-efg")
_EFG("-efg"),
public class EnumClass { @SerializedName("(xyz)")
_XYZ_("(xyz)");
private String value;
@Override EnumClass(String value) {
public boolean equals(Object o) { this.value = value;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumClass enumClass = (EnumClass) o;
return true;
}
@Override
public int hashCode() {
return Objects.hash();
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); return String.valueOf(value);
sb.append("class EnumClass {\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,18 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* EnumTest
*/
public class EnumTest { public class EnumTest {
/** /**
* Gets or Sets enumString * Gets or Sets enumString
*/ */
@ -38,7 +61,6 @@ public class EnumTest {
@SerializedName("enum_string") @SerializedName("enum_string")
private EnumStringEnum enumString = null; private EnumStringEnum enumString = null;
/** /**
* Gets or Sets enumInteger * Gets or Sets enumInteger
*/ */
@ -64,7 +86,6 @@ public class EnumTest {
@SerializedName("enum_integer") @SerializedName("enum_integer")
private EnumIntegerEnum enumInteger = null; private EnumIntegerEnum enumInteger = null;
/** /**
* Gets or Sets enumNumber * Gets or Sets enumNumber
*/ */
@ -90,39 +111,63 @@ public class EnumTest {
@SerializedName("enum_number") @SerializedName("enum_number")
private EnumNumberEnum enumNumber = null; private EnumNumberEnum enumNumber = null;
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
/** /**
* Get enumString
* @return enumString
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public EnumStringEnum getEnumString() { public EnumStringEnum getEnumString() {
return enumString; return enumString;
} }
public void setEnumString(EnumStringEnum enumString) { public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString; this.enumString = enumString;
} }
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
/** /**
* Get enumInteger
* @return enumInteger
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public EnumIntegerEnum getEnumInteger() { public EnumIntegerEnum getEnumInteger() {
return enumInteger; return enumInteger;
} }
public void setEnumInteger(EnumIntegerEnum enumInteger) { public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
} }
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
/** /**
* Get enumNumber
* @return enumNumber
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public EnumNumberEnum getEnumNumber() { public EnumNumberEnum getEnumNumber() {
return enumNumber; return enumNumber;
} }
public void setEnumNumber(EnumNumberEnum enumNumber) { public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber; this.enumNumber = enumNumber;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -130,9 +175,9 @@ public class EnumTest {
return false; return false;
} }
EnumTest enumTest = (EnumTest) o; EnumTest enumTest = (EnumTest) o;
return Objects.equals(enumString, enumTest.enumString) && return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(enumInteger, enumTest.enumInteger) && Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(enumNumber, enumTest.enumNumber); Objects.equals(this.enumNumber, enumTest.enumNumber);
} }
@Override @Override
@ -156,10 +201,11 @@ public class EnumTest {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,20 +1,44 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import com.google.gson.annotations.SerializedName;
/**
* FormatTest
*/
public class FormatTest { public class FormatTest {
@SerializedName("integer") @SerializedName("integer")
private Integer integer = null; private Integer integer = null;
@ -54,149 +78,253 @@ public class FormatTest {
@SerializedName("password") @SerializedName("password")
private String password = null; private String password = null;
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
/** /**
* Get integer
* minimum: 10.0 * minimum: 10.0
* maximum: 100.0 * maximum: 100.0
* @return integer
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getInteger() { public Integer getInteger() {
return integer; return integer;
} }
public void setInteger(Integer integer) { public void setInteger(Integer integer) {
this.integer = integer; this.integer = integer;
} }
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
/** /**
* Get int32
* minimum: 20.0 * minimum: 20.0
* maximum: 200.0 * maximum: 200.0
* @return int32
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getInt32() { public Integer getInt32() {
return int32; return int32;
} }
public void setInt32(Integer int32) { public void setInt32(Integer int32) {
this.int32 = int32; this.int32 = int32;
} }
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
/** /**
* Get int64
* @return int64
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getInt64() { public Long getInt64() {
return int64; return int64;
} }
public void setInt64(Long int64) { public void setInt64(Long int64) {
this.int64 = int64; this.int64 = int64;
} }
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
/** /**
* Get number
* minimum: 32.1 * minimum: 32.1
* maximum: 543.2 * maximum: 543.2
* @return number
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public BigDecimal getNumber() { public BigDecimal getNumber() {
return number; return number;
} }
public void setNumber(BigDecimal number) { public void setNumber(BigDecimal number) {
this.number = number; this.number = number;
} }
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
/** /**
* Get _float
* minimum: 54.3 * minimum: 54.3
* maximum: 987.6 * maximum: 987.6
* @return _float
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Float getFloat() { public Float getFloat() {
return _float; return _float;
} }
public void setFloat(Float _float) { public void setFloat(Float _float) {
this._float = _float; this._float = _float;
} }
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
/** /**
* Get _double
* minimum: 67.8 * minimum: 67.8
* maximum: 123.4 * maximum: 123.4
* @return _double
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Double getDouble() { public Double getDouble() {
return _double; return _double;
} }
public void setDouble(Double _double) { public void setDouble(Double _double) {
this._double = _double; this._double = _double;
} }
public FormatTest string(String string) {
this.string = string;
return this;
}
/** /**
* Get string
* @return string
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getString() { public String getString() {
return string; return string;
} }
public void setString(String string) { public void setString(String string) {
this.string = string; this.string = string;
} }
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/** /**
* Get _byte
* @return _byte
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public byte[] getByte() { public byte[] getByte() {
return _byte; return _byte;
} }
public void setByte(byte[] _byte) { public void setByte(byte[] _byte) {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
/** /**
* Get binary
* @return binary
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public byte[] getBinary() { public byte[] getBinary() {
return binary; return binary;
} }
public void setBinary(byte[] binary) { public void setBinary(byte[] binary) {
this.binary = binary; this.binary = binary;
} }
public FormatTest date(LocalDate date) {
this.date = date;
return this;
}
/** /**
* Get date
* @return date
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public LocalDate getDate() { public LocalDate getDate() {
return date; return date;
} }
public void setDate(LocalDate date) { public void setDate(LocalDate date) {
this.date = date; this.date = date;
} }
public FormatTest dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/** /**
* Get dateTime
* @return dateTime
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public DateTime getDateTime() { public DateTime getDateTime() {
return dateTime; return dateTime;
} }
public void setDateTime(DateTime dateTime) { public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
} }
public FormatTest uuid(String uuid) {
this.uuid = uuid;
return this;
}
/** /**
* Get uuid
* @return uuid
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getUuid() { public String getUuid() {
return uuid; return uuid;
} }
public void setUuid(String uuid) { public void setUuid(String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
public FormatTest password(String password) {
this.password = password;
return this;
}
/** /**
* Get password
* @return password
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -204,19 +332,19 @@ public class FormatTest {
return false; return false;
} }
FormatTest formatTest = (FormatTest) o; FormatTest formatTest = (FormatTest) o;
return Objects.equals(integer, formatTest.integer) && return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(int32, formatTest.int32) && Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(int64, formatTest.int64) && Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(number, formatTest.number) && Objects.equals(this.number, formatTest.number) &&
Objects.equals(_float, formatTest._float) && Objects.equals(this._float, formatTest._float) &&
Objects.equals(_double, formatTest._double) && Objects.equals(this._double, formatTest._double) &&
Objects.equals(string, formatTest.string) && Objects.equals(this.string, formatTest.string) &&
Objects.equals(_byte, formatTest._byte) && Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(binary, formatTest.binary) && Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(date, formatTest.date) && Objects.equals(this.date, formatTest.date) &&
Objects.equals(dateTime, formatTest.dateTime) && Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(uuid, formatTest.uuid) && Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(password, formatTest.password); Objects.equals(this.password, formatTest.password);
} }
@Override @Override
@ -250,10 +378,11 @@ public class FormatTest {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,104 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* HasOnlyReadOnly
*/
public class HasOnlyReadOnly {
@SerializedName("bar")
private String bar = null;
@SerializedName("foo")
private String foo = null;
/**
* Get bar
* @return bar
**/
@ApiModelProperty(example = "null", value = "")
public String getBar() {
return bar;
}
/**
* Get foo
* @return foo
**/
@ApiModelProperty(example = "null", value = "")
public String getFoo() {
return foo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
}
@Override
public int hashCode() {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HasOnlyReadOnly {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" foo: ").append(toIndentedString(foo)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,147 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MapTest
*/
public class MapTest {
@SerializedName("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
/**
* Gets or Sets inner
*/
public enum InnerEnum {
@SerializedName("UPPER")
UPPER("UPPER"),
@SerializedName("lower")
LOWER("lower");
private String value;
InnerEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
@SerializedName("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
/**
* Get mapMapOfString
* @return mapMapOfString
**/
@ApiModelProperty(example = "null", value = "")
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
/**
* Get mapOfEnumString
* @return mapOfEnumString
**/
@ApiModelProperty(example = "null", value = "")
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
}
@Override
public int hashCode() {
return Objects.hash(mapMapOfString, mapOfEnumString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MapTest {\n");
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,6 +1,32 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal; import io.swagger.client.model.Animal;
@ -9,14 +35,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import com.google.gson.annotations.SerializedName;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
public class MixedPropertiesAndAdditionalPropertiesClass { public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid") @SerializedName("uuid")
private String uuid = null; private String uuid = null;
@ -26,39 +50,63 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("map") @SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>(); private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
this.uuid = uuid;
return this;
}
/** /**
* Get uuid
* @return uuid
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getUuid() { public String getUuid() {
return uuid; return uuid;
} }
public void setUuid(String uuid) { public void setUuid(String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/** /**
* Get dateTime
* @return dateTime
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public DateTime getDateTime() { public DateTime getDateTime() {
return dateTime; return dateTime;
} }
public void setDateTime(DateTime dateTime) { public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
} }
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
return this;
}
/** /**
* Get map
* @return map
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Map<String, Animal> getMap() { public Map<String, Animal> getMap() {
return map; return map;
} }
public void setMap(Map<String, Animal> map) { public void setMap(Map<String, Animal> map) {
this.map = map; this.map = map;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -66,9 +114,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return false; return false;
} }
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(map, mixedPropertiesAndAdditionalPropertiesClass.map); Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
} }
@Override @Override
@ -92,10 +140,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,49 +1,87 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/** /**
* Model for testing model name starting with number * Model for testing model name starting with number
**/ */
@ApiModel(description = "Model for testing model name starting with number") @ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
public class Model200Response {
@SerializedName("name") @SerializedName("name")
private Integer name = null; private Integer name = null;
@SerializedName("class") @SerializedName("class")
private String PropertyClass = null; private String PropertyClass = null;
public Model200Response name(Integer name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getName() { public Integer getName() {
return name; return name;
} }
public void setName(Integer name) { public void setName(Integer name) {
this.name = name; this.name = name;
} }
public Model200Response PropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
return this;
}
/** /**
* Get PropertyClass
* @return PropertyClass
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getPropertyClass() { public String getPropertyClass() {
return PropertyClass; return PropertyClass;
} }
public void setPropertyClass(String PropertyClass) { public void setPropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass; this.PropertyClass = PropertyClass;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -51,8 +89,8 @@ public class Model200Response {
return false; return false;
} }
Model200Response _200Response = (Model200Response) o; Model200Response _200Response = (Model200Response) o;
return Objects.equals(name, _200Response.name) && return Objects.equals(this.name, _200Response.name) &&
Objects.equals(PropertyClass, _200Response.PropertyClass); Objects.equals(this.PropertyClass, _200Response.PropertyClass);
} }
@Override @Override
@ -75,10 +113,11 @@ public class Model200Response {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,17 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* ModelApiResponse
*/
public class ModelApiResponse { public class ModelApiResponse {
@SerializedName("code") @SerializedName("code")
private Integer code = null; private Integer code = null;
@ -21,39 +45,63 @@ public class ModelApiResponse {
@SerializedName("message") @SerializedName("message")
private String message = null; private String message = null;
public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
/** /**
* Get code
* @return code
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
public void setCode(Integer code) { public void setCode(Integer code) {
this.code = code; this.code = code;
} }
public ModelApiResponse type(String type) {
this.type = type;
return this;
}
/** /**
* Get type
* @return type
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getType() { public String getType() {
return type; return type;
} }
public void setType(String type) { public void setType(String type) {
this.type = type; this.type = type;
} }
public ModelApiResponse message(String message) {
this.message = message;
return this;
}
/** /**
* Get message
* @return message
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getMessage() { public String getMessage() {
return message; return message;
} }
public void setMessage(String message) { public void setMessage(String message) {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -61,9 +109,9 @@ public class ModelApiResponse {
return false; return false;
} }
ModelApiResponse _apiResponse = (ModelApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(code, _apiResponse.code) && return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(type, _apiResponse.type) && Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(message, _apiResponse.message); Objects.equals(this.message, _apiResponse.message);
} }
@Override @Override
@ -87,10 +135,11 @@ public class ModelApiResponse {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,36 +1,66 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/** /**
* Model for testing reserved words * Model for testing reserved words
**/ */
@ApiModel(description = "Model for testing reserved words") @ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
public class ModelReturn {
@SerializedName("return") @SerializedName("return")
private Integer _return = null; private Integer _return = null;
public ModelReturn _return(Integer _return) {
this._return = _return;
return this;
}
/** /**
* Get _return
* @return _return
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getReturn() { public Integer getReturn() {
return _return; return _return;
} }
public void setReturn(Integer _return) { public void setReturn(Integer _return) {
this._return = _return; this._return = _return;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -38,7 +68,7 @@ public class ModelReturn {
return false; return false;
} }
ModelReturn _return = (ModelReturn) o; ModelReturn _return = (ModelReturn) o;
return Objects.equals(_return, _return._return); return Objects.equals(this._return, _return._return);
} }
@Override @Override
@ -60,10 +90,11 @@ public class ModelReturn {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,20 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/** /**
* Model for testing model name same as property name * Model for testing model name same as property name
**/ */
@ApiModel(description = "Model for testing model name same as property name") @ApiModel(description = "Model for testing model name same as property name")
public class Name {
public class Name {
@SerializedName("name") @SerializedName("name")
private Integer name = null; private Integer name = null;
@ -27,43 +49,63 @@ public class Name {
@SerializedName("123Number") @SerializedName("123Number")
private Integer _123Number = null; private Integer _123Number = null;
public Name name(Integer name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public Integer getName() { public Integer getName() {
return name; return name;
} }
public void setName(Integer name) { public void setName(Integer name) {
this.name = name; this.name = name;
} }
/** /**
* Get snakeCase
* @return snakeCase
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getSnakeCase() { public Integer getSnakeCase() {
return snakeCase; return snakeCase;
} }
public Name property(String property) {
this.property = property;
return this;
}
/** /**
* Get property
* @return property
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getProperty() { public String getProperty() {
return property; return property;
} }
public void setProperty(String property) { public void setProperty(String property) {
this.property = property; this.property = property;
} }
/** /**
* Get _123Number
* @return _123Number
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer get123Number() { public Integer get123Number() {
return _123Number; return _123Number;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -71,10 +113,10 @@ public class Name {
return false; return false;
} }
Name name = (Name) o; Name name = (Name) o;
return Objects.equals(name, name.name) && return Objects.equals(this.name, name.name) &&
Objects.equals(snakeCase, name.snakeCase) && Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(property, name.property) && Objects.equals(this.property, name.property) &&
Objects.equals(_123Number, name._123Number); Objects.equals(this._123Number, name._123Number);
} }
@Override @Override
@ -99,10 +141,11 @@ public class Name {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,100 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* NumberOnly
*/
public class NumberOnly {
@SerializedName("JustNumber")
private BigDecimal justNumber = null;
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
/**
* Get justNumber
* @return justNumber
**/
@ApiModelProperty(example = "null", value = "")
public BigDecimal getJustNumber() {
return justNumber;
}
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NumberOnly numberOnly = (NumberOnly) o;
return Objects.equals(this.justNumber, numberOnly.justNumber);
}
@Override
public int hashCode() {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NumberOnly {\n");
sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,18 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import com.google.gson.annotations.SerializedName;
/**
* Order
*/
public class Order { public class Order {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@ -25,7 +49,6 @@ public class Order {
@SerializedName("shipDate") @SerializedName("shipDate")
private DateTime shipDate = null; private DateTime shipDate = null;
/** /**
* Order Status * Order Status
*/ */
@ -57,70 +80,117 @@ public class Order {
@SerializedName("complete") @SerializedName("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Order petId(Long petId) {
this.petId = petId;
return this;
}
/** /**
* Get petId
* @return petId
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
public void setPetId(Long petId) { public void setPetId(Long petId) {
this.petId = petId; this.petId = petId;
} }
public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
/** /**
* Get quantity
* @return quantity
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
public void setQuantity(Integer quantity) { public void setQuantity(Integer quantity) {
this.quantity = quantity; this.quantity = quantity;
} }
public Order shipDate(DateTime shipDate) {
this.shipDate = shipDate;
return this;
}
/** /**
* Get shipDate
* @return shipDate
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public DateTime getShipDate() { public DateTime getShipDate() {
return shipDate; return shipDate;
} }
public void setShipDate(DateTime shipDate) { public void setShipDate(DateTime shipDate) {
this.shipDate = shipDate; this.shipDate = shipDate;
} }
public Order status(StatusEnum status) {
this.status = status;
return this;
}
/** /**
* Order Status * Order Status
* @return status
**/ **/
@ApiModelProperty(value = "Order Status") @ApiModelProperty(example = "null", value = "Order Status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
public void setStatus(StatusEnum status) { public void setStatus(StatusEnum status) {
this.status = status; this.status = status;
} }
public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
/** /**
* Get complete
* @return complete
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -128,12 +198,12 @@ public class Order {
return false; return false;
} }
Order order = (Order) o; Order order = (Order) o;
return Objects.equals(id, order.id) && return Objects.equals(this.id, order.id) &&
Objects.equals(petId, order.petId) && Objects.equals(this.petId, order.petId) &&
Objects.equals(quantity, order.quantity) && Objects.equals(this.quantity, order.quantity) &&
Objects.equals(shipDate, order.shipDate) && Objects.equals(this.shipDate, order.shipDate) &&
Objects.equals(status, order.status) && Objects.equals(this.status, order.status) &&
Objects.equals(complete, order.complete); Objects.equals(this.complete, order.complete);
} }
@Override @Override
@ -160,10 +230,11 @@ public class Order {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,6 +1,32 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Category; import io.swagger.client.model.Category;
@ -8,14 +34,12 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* Pet
*/
public class Pet { public class Pet {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@ -31,7 +55,6 @@ public class Pet {
@SerializedName("tags") @SerializedName("tags")
private List<Tag> tags = new ArrayList<Tag>(); private List<Tag> tags = new ArrayList<Tag>();
/** /**
* pet status in the store * pet status in the store
*/ */
@ -60,70 +83,117 @@ public class Pet {
@SerializedName("status") @SerializedName("status")
private StatusEnum status = null; private StatusEnum status = null;
public Pet id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Pet category(Category category) {
this.category = category;
return this;
}
/** /**
* Get category
* @return category
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
public void setCategory(Category category) { public void setCategory(Category category) {
this.category = category; this.category = category;
} }
public Pet name(String name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
/** /**
* Get photoUrls
* @return photoUrls
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
public void setPhotoUrls(List<String> photoUrls) { public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls; this.photoUrls = photoUrls;
} }
public Pet tags(List<Tag> tags) {
this.tags = tags;
return this;
}
/** /**
* Get tags
* @return tags
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
public void setTags(List<Tag> tags) { public void setTags(List<Tag> tags) {
this.tags = tags; this.tags = tags;
} }
public Pet status(StatusEnum status) {
this.status = status;
return this;
}
/** /**
* pet status in the store * pet status in the store
* @return status
**/ **/
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(example = "null", value = "pet status in the store")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
public void setStatus(StatusEnum status) { public void setStatus(StatusEnum status) {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -131,12 +201,12 @@ public class Pet {
return false; return false;
} }
Pet pet = (Pet) o; Pet pet = (Pet) o;
return Objects.equals(id, pet.id) && return Objects.equals(this.id, pet.id) &&
Objects.equals(category, pet.category) && Objects.equals(this.category, pet.category) &&
Objects.equals(name, pet.name) && Objects.equals(this.name, pet.name) &&
Objects.equals(photoUrls, pet.photoUrls) && Objects.equals(this.photoUrls, pet.photoUrls) &&
Objects.equals(tags, pet.tags) && Objects.equals(this.tags, pet.tags) &&
Objects.equals(status, pet.status); Objects.equals(this.status, pet.status);
} }
@Override @Override
@ -163,10 +233,11 @@ public class Pet {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,17 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* ReadOnlyFirst
*/
public class ReadOnlyFirst { public class ReadOnlyFirst {
@SerializedName("bar") @SerializedName("bar")
private String bar = null; private String bar = null;
@ -19,25 +43,35 @@ public class ReadOnlyFirst {
private String baz = null; private String baz = null;
/** /**
* Get bar
* @return bar
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getBar() { public String getBar() {
return bar; return bar;
} }
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
/** /**
* Get baz
* @return baz
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getBaz() { public String getBaz() {
return baz; return baz;
} }
public void setBaz(String baz) { public void setBaz(String baz) {
this.baz = baz; this.baz = baz;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -45,8 +79,8 @@ public class ReadOnlyFirst {
return false; return false;
} }
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(bar, readOnlyFirst.bar) && return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(baz, readOnlyFirst.baz); Objects.equals(this.baz, readOnlyFirst.baz);
} }
@Override @Override
@ -69,10 +103,11 @@ public class ReadOnlyFirst {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,33 +1,65 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* SpecialModelName
*/
public class SpecialModelName { public class SpecialModelName {
@SerializedName("$special[property.name]") @SerializedName("$special[property.name]")
private Long specialPropertyName = null; private Long specialPropertyName = null;
public SpecialModelName specialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
return this;
}
/** /**
* Get specialPropertyName
* @return specialPropertyName
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getSpecialPropertyName() { public Long getSpecialPropertyName() {
return specialPropertyName; return specialPropertyName;
} }
public void setSpecialPropertyName(Long specialPropertyName) { public void setSpecialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName; this.specialPropertyName = specialPropertyName;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -35,7 +67,7 @@ public class SpecialModelName {
return false; return false;
} }
SpecialModelName specialModelName = (SpecialModelName) o; SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(specialPropertyName, specialModelName.specialPropertyName); return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
} }
@Override @Override
@ -57,10 +89,11 @@ public class SpecialModelName {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,46 +1,86 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* Tag
*/
public class Tag { public class Tag {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@SerializedName("name") @SerializedName("name")
private String name = null; private String name = null;
public Tag id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Tag name(String name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -48,8 +88,8 @@ public class Tag {
return false; return false;
} }
Tag tag = (Tag) o; Tag tag = (Tag) o;
return Objects.equals(id, tag.id) && return Objects.equals(this.id, tag.id) &&
Objects.equals(name, tag.name); Objects.equals(this.name, tag.name);
} }
@Override @Override
@ -72,10 +112,11 @@ public class Tag {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,17 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* User
*/
public class User { public class User {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@ -36,90 +60,153 @@ public class User {
@SerializedName("userStatus") @SerializedName("userStatus")
private Integer userStatus = null; private Integer userStatus = null;
public User id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public User username(String username) {
this.username = username;
return this;
}
/** /**
* Get username
* @return username
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getUsername() { public String getUsername() {
return username; return username;
} }
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/** /**
* Get firstName
* @return firstName
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
public void setFirstName(String firstName) { public void setFirstName(String firstName) {
this.firstName = firstName; this.firstName = firstName;
} }
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/** /**
* Get lastName
* @return lastName
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
public void setLastName(String lastName) { public void setLastName(String lastName) {
this.lastName = lastName; this.lastName = lastName;
} }
public User email(String email) {
this.email = email;
return this;
}
/** /**
* Get email
* @return email
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getEmail() { public String getEmail() {
return email; return email;
} }
public void setEmail(String email) { public void setEmail(String email) {
this.email = email; this.email = email;
} }
public User password(String password) {
this.password = password;
return this;
}
/** /**
* Get password
* @return password
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
public User phone(String phone) {
this.phone = phone;
return this;
}
/** /**
* Get phone
* @return phone
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
public void setPhone(String phone) { public void setPhone(String phone) {
this.phone = phone; this.phone = phone;
} }
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
/** /**
* User Status * User Status
* @return userStatus
**/ **/
@ApiModelProperty(value = "User Status") @ApiModelProperty(example = "null", value = "User Status")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
public void setUserStatus(Integer userStatus) { public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -127,14 +214,14 @@ public class User {
return false; return false;
} }
User user = (User) o; User user = (User) o;
return Objects.equals(id, user.id) && return Objects.equals(this.id, user.id) &&
Objects.equals(username, user.username) && Objects.equals(this.username, user.username) &&
Objects.equals(firstName, user.firstName) && Objects.equals(this.firstName, user.firstName) &&
Objects.equals(lastName, user.lastName) && Objects.equals(this.lastName, user.lastName) &&
Objects.equals(email, user.email) && Objects.equals(this.email, user.email) &&
Objects.equals(password, user.password) && Objects.equals(this.password, user.password) &&
Objects.equals(phone, user.phone) && Objects.equals(this.phone, user.phone) &&
Objects.equals(userStatus, user.userStatus); Objects.equals(this.userStatus, user.userStatus);
} }
@Override @Override
@ -163,10 +250,11 @@ public class User {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,29 @@
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
- mvn test
# uncomment below to test using gradle
# - gradle test
# uncomment below to test using sbt
# - sbt test

View File

@ -0,0 +1,10 @@
# ArrayOfArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayArrayNumber** | [**List&lt;List&lt;BigDecimal&gt;&gt;**](List.md) | | [optional]

View File

@ -0,0 +1,10 @@
# ArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayNumber** | [**List&lt;BigDecimal&gt;**](BigDecimal.md) | | [optional]

View File

@ -7,6 +7,13 @@ Name | Type | Description | Notes
**arrayOfString** | **List&lt;String&gt;** | | [optional] **arrayOfString** | **List&lt;String&gt;** | | [optional]
**arrayArrayOfInteger** | [**List&lt;List&lt;Long&gt;&gt;**](List.md) | | [optional] **arrayArrayOfInteger** | [**List&lt;List&lt;Long&gt;&gt;**](List.md) | | [optional]
**arrayArrayOfModel** | [**List&lt;List&lt;ReadOnlyFirst&gt;&gt;**](List.md) | | [optional] **arrayArrayOfModel** | [**List&lt;List&lt;ReadOnlyFirst&gt;&gt;**](List.md) | | [optional]
**arrayOfEnum** | [**List&lt;ArrayOfEnumEnum&gt;**](#List&lt;ArrayOfEnumEnum&gt;) | | [optional]
<a name="List<ArrayOfEnumEnum>"></a>
## Enum: List&lt;ArrayOfEnumEnum&gt;
Name | Value
---- | -----

View File

@ -4,9 +4,54 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**testCodeInjectEnd**](FakeApi.md#testCodeInjectEnd) | **PUT** fake | To test code injection &#x3D;end
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** fake | To test enum query parameters
<a name="testCodeInjectEnd"></a>
# **testCodeInjectEnd**
> Void testCodeInjectEnd(testCodeInjectEnd)
To test code injection &#x3D;end
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
String testCodeInjectEnd = "testCodeInjectEnd_example"; // String | To test code injection =end
try {
Void result = apiInstance.testCodeInjectEnd(testCodeInjectEnd);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testCodeInjectEnd");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**testCodeInjectEnd** | **String**| To test code injection &#x3D;end | [optional]
### Return type
[**Void**](.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json, */ =end'));(phpinfo('
- **Accept**: application/json, */ end
<a name="testEndpointParameters"></a> <a name="testEndpointParameters"></a>
# **testEndpointParameters** # **testEndpointParameters**
> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password) > Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
@ -74,3 +119,50 @@ No authorization required
- **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
<a name="testEnumQueryParameters"></a>
# **testEnumQueryParameters**
> Void testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble)
To test enum query parameters
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
BigDecimal enumQueryInteger = new BigDecimal(); // BigDecimal | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
try {
Void result = apiInstance.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumQueryParameters");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **BigDecimal**| Query parameter enum test (double) | [optional]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional]
### Return type
[**Void**](.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json

View File

@ -0,0 +1,11 @@
# HasOnlyReadOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]
**foo** | **String** | | [optional]

View File

@ -0,0 +1,17 @@
# MapTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapMapOfString** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapOfEnumString** | [**Map&lt;String, InnerEnum&gt;**](#Map&lt;String, InnerEnum&gt;) | | [optional]
<a name="Map<String, InnerEnum>"></a>
## Enum: Map&lt;String, InnerEnum&gt;
Name | Value
---- | -----

View File

@ -0,0 +1,10 @@
# NumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]

0
samples/client/petstore/java/retrofit2rx/gradlew vendored Executable file → Normal file
View File

View File

@ -151,12 +151,11 @@
<java.version>1.7</java.version> <java.version>1.7</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<swagger-core-version>1.5.8</swagger-core-version> <swagger-core-version>1.5.9</swagger-core-version>
<retrofit-version>2.0.2</retrofit-version> <retrofit-version>2.1.0</retrofit-version>
<rxjava-version>1.1.3</rxjava-version> <rxjava-version>1.1.6</rxjava-version>
<jodatime-version>2.9.3</jodatime-version> <jodatime-version>2.9.4</jodatime-version>
<oltu-version>1.0.1</oltu-version> <oltu-version>1.0.1</oltu-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version> <junit-version>4.12</junit-version>
</properties> </properties>
</project> </project>

View File

@ -41,7 +41,7 @@ import io.swagger.client.auth.OAuthFlow;
public class ApiClient { public class ApiClient {
private Map<String, Interceptor> apiAuthorizations; private Map<String, Interceptor> apiAuthorizations;
private OkHttpClient okClient; private OkHttpClient.Builder okBuilder;
private Retrofit.Builder adapterBuilder; private Retrofit.Builder adapterBuilder;
public ApiClient() { public ApiClient() {
@ -117,7 +117,7 @@ public class ApiClient {
.registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter())
.create(); .create();
okClient = new OkHttpClient(); okBuilder = new OkHttpClient.Builder();
String baseUrl = "http://petstore.swagger.io/v2"; String baseUrl = "http://petstore.swagger.io/v2";
if(!baseUrl.endsWith("/")) if(!baseUrl.endsWith("/"))
@ -126,14 +126,16 @@ public class ApiClient {
adapterBuilder = new Retrofit adapterBuilder = new Retrofit
.Builder() .Builder()
.baseUrl(baseUrl) .baseUrl(baseUrl)
.client(okClient)
.addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonCustomConverterFactory.create(gson)); .addConverterFactory(GsonCustomConverterFactory.create(gson));
} }
public <S> S createService(Class<S> serviceClass) { public <S> S createService(Class<S> serviceClass) {
return adapterBuilder.build().create(serviceClass); return adapterBuilder
.client(okBuilder.build())
.build()
.create(serviceClass);
} }
@ -259,7 +261,7 @@ public class ApiClient {
throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
} }
apiAuthorizations.put(authName, authorization); apiAuthorizations.put(authName, authorization);
okClient.interceptors().add(authorization); okBuilder.addInterceptor(authorization);
} }
public Map<String, Interceptor> getApiAuthorizations() { public Map<String, Interceptor> getApiAuthorizations() {
@ -278,24 +280,24 @@ public class ApiClient {
this.adapterBuilder = adapterBuilder; this.adapterBuilder = adapterBuilder;
} }
public OkHttpClient getOkClient() { public OkHttpClient.Builder getOkBuilder() {
return okClient; return okBuilder;
} }
public void addAuthsToOkClient(OkHttpClient okClient) { public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) { for(Interceptor apiAuthorization : apiAuthorizations.values()) {
okClient.interceptors().add(apiAuthorization); okBuilder.addInterceptor(apiAuthorization);
} }
} }
/** /**
* Clones the okClient given in parameter, adds the auth interceptors and uses it to configure the Retrofit * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit
* @param okClient * @param okClient
*/ */
public void configureFromOkclient(OkHttpClient okClient) { public void configureFromOkclient(OkHttpClient okClient) {
OkHttpClient clone = okClient.newBuilder().build(); this.okBuilder = okClient.newBuilder();
addAuthsToOkClient(clone); addAuthsToOkBuilder(this.okBuilder);
adapterBuilder.client(clone);
} }
} }

View File

@ -18,6 +18,19 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public interface FakeApi { public interface FakeApi {
/**
* To test code injection &#x3D;end
*
* @param testCodeInjectEnd To test code injection &#x3D;end (optional)
* @return Call<Void>
*/
@FormUrlEncoded
@PUT("fake")
Observable<Void> testCodeInjectEnd(
@Field("test code inject */ &#x3D;end") String testCodeInjectEnd
);
/** /**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -42,4 +55,19 @@ public interface FakeApi {
@Field("number") BigDecimal number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password @Field("number") BigDecimal number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password
); );
/**
* To test enum query parameters
*
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @return Call<Void>
*/
@FormUrlEncoded
@GET("fake")
Observable<Void> testEnumQueryParameters(
@Field("enum_query_string") String enumQueryString, @Query("enum_query_integer") BigDecimal enumQueryInteger, @Field("enum_query_double") Double enumQueryDouble
);
} }

View File

@ -1,49 +1,89 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.google.gson.annotations.SerializedName;
/**
* AdditionalPropertiesClass
*/
public class AdditionalPropertiesClass { public class AdditionalPropertiesClass {
@SerializedName("map_property") @SerializedName("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>(); private Map<String, String> mapProperty = new HashMap<String, String>();
@SerializedName("map_of_map_property") @SerializedName("map_of_map_property")
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>(); private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>();
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
/** /**
* Get mapProperty
* @return mapProperty
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Map<String, String> getMapProperty() { public Map<String, String> getMapProperty() {
return mapProperty; return mapProperty;
} }
public void setMapProperty(Map<String, String> mapProperty) { public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty; this.mapProperty = mapProperty;
} }
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
/** /**
* Get mapOfMapProperty
* @return mapOfMapProperty
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Map<String, Map<String, String>> getMapOfMapProperty() { public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty; return mapOfMapProperty;
} }
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) { public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty; this.mapOfMapProperty = mapOfMapProperty;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -51,8 +91,8 @@ public class AdditionalPropertiesClass {
return false; return false;
} }
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(mapProperty, additionalPropertiesClass.mapProperty) && return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
} }
@Override @Override
@ -75,10 +115,11 @@ public class AdditionalPropertiesClass {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,46 +1,86 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* Animal
*/
public class Animal { public class Animal {
@SerializedName("className") @SerializedName("className")
private String className = null; private String className = null;
@SerializedName("color") @SerializedName("color")
private String color = "red"; private String color = "red";
public Animal className(String className) {
this.className = className;
return this;
}
/** /**
* Get className
* @return className
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Animal color(String color) {
this.color = color;
return this;
}
/** /**
* Get color
* @return color
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -48,8 +88,8 @@ public class Animal {
return false; return false;
} }
Animal animal = (Animal) o; Animal animal = (Animal) o;
return Objects.equals(className, animal.className) && return Objects.equals(this.className, animal.className) &&
Objects.equals(color, animal.color); Objects.equals(this.color, animal.color);
} }
@Override @Override
@ -72,10 +112,11 @@ public class Animal {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,3 +1,28 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
@ -5,30 +30,27 @@ import io.swagger.client.model.Animal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* AnimalFarm
*/
public class AnimalFarm extends ArrayList<Animal> { public class AnimalFarm extends ArrayList<Animal> {
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
AnimalFarm animalFarm = (AnimalFarm) o;
return true; return true;
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(); return Objects.hash(super.hashCode());
} }
@Override @Override
@ -44,10 +66,11 @@ public class AnimalFarm extends ArrayList<Animal> {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,102 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfArrayOfNumberOnly
*/
public class ArrayOfArrayOfNumberOnly {
@SerializedName("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
/**
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@ApiModelProperty(example = "null", value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,102 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfNumberOnly
*/
public class ArrayOfNumberOnly {
@SerializedName("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
/**
* Get arrayNumber
* @return arrayNumber
**/
@ApiModelProperty(example = "null", value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,19 +1,44 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.ReadOnlyFirst;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* ArrayTest
*/
public class ArrayTest { public class ArrayTest {
@SerializedName("array_of_string") @SerializedName("array_of_string")
private List<String> arrayOfString = new ArrayList<String>(); private List<String> arrayOfString = new ArrayList<String>();
@ -24,38 +49,105 @@ public class ArrayTest {
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>(); private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
/** /**
* Gets or Sets arrayOfEnum
*/
public enum ArrayOfEnumEnum {
@SerializedName("UPPER")
UPPER("UPPER"),
@SerializedName("lower")
LOWER("lower");
private String value;
ArrayOfEnumEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
@SerializedName("array_of_enum")
private List<ArrayOfEnumEnum> arrayOfEnum = new ArrayList<ArrayOfEnumEnum>();
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
/**
* Get arrayOfString
* @return arrayOfString
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<String> getArrayOfString() { public List<String> getArrayOfString() {
return arrayOfString; return arrayOfString;
} }
public void setArrayOfString(List<String> arrayOfString) { public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString; this.arrayOfString = arrayOfString;
} }
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
/** /**
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger; return arrayArrayOfInteger;
} }
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) { public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger; this.arrayArrayOfInteger = arrayArrayOfInteger;
} }
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
/** /**
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel; return arrayArrayOfModel;
} }
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) { public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel; this.arrayArrayOfModel = arrayArrayOfModel;
} }
public ArrayTest arrayOfEnum(List<ArrayOfEnumEnum> arrayOfEnum) {
this.arrayOfEnum = arrayOfEnum;
return this;
}
/**
* Get arrayOfEnum
* @return arrayOfEnum
**/
@ApiModelProperty(example = "null", value = "")
public List<ArrayOfEnumEnum> getArrayOfEnum() {
return arrayOfEnum;
}
public void setArrayOfEnum(List<ArrayOfEnumEnum> arrayOfEnum) {
this.arrayOfEnum = arrayOfEnum;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -63,14 +155,15 @@ public class ArrayTest {
return false; return false;
} }
ArrayTest arrayTest = (ArrayTest) o; ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(arrayOfString, arrayTest.arrayOfString) && return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(arrayArrayOfModel, arrayTest.arrayArrayOfModel); Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel) &&
Objects.equals(this.arrayOfEnum, arrayTest.arrayOfEnum);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel, arrayOfEnum);
} }
@Override @Override
@ -81,6 +174,7 @@ public class ArrayTest {
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n");
sb.append(" arrayOfEnum: ").append(toIndentedString(arrayOfEnum)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
@ -89,10 +183,11 @@ public class ArrayTest {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,18 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal; import io.swagger.client.model.Animal;
import com.google.gson.annotations.SerializedName;
/**
* Cat
*/
public class Cat extends Animal { public class Cat extends Animal {
@SerializedName("className") @SerializedName("className")
private String className = null; private String className = null;
@ -22,39 +46,63 @@ public class Cat extends Animal {
@SerializedName("declawed") @SerializedName("declawed")
private Boolean declawed = null; private Boolean declawed = null;
public Cat className(String className) {
this.className = className;
return this;
}
/** /**
* Get className
* @return className
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Cat color(String color) {
this.color = color;
return this;
}
/** /**
* Get color
* @return color
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
/** /**
* Get declawed
* @return declawed
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Boolean getDeclawed() { public Boolean getDeclawed() {
return declawed; return declawed;
} }
public void setDeclawed(Boolean declawed) { public void setDeclawed(Boolean declawed) {
this.declawed = declawed; this.declawed = declawed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -62,14 +110,15 @@ public class Cat extends Animal {
return false; return false;
} }
Cat cat = (Cat) o; Cat cat = (Cat) o;
return Objects.equals(className, cat.className) && return Objects.equals(this.className, cat.className) &&
Objects.equals(color, cat.color) && Objects.equals(this.color, cat.color) &&
Objects.equals(declawed, cat.declawed); Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(className, color, declawed); return Objects.hash(className, color, declawed, super.hashCode());
} }
@Override @Override
@ -88,10 +137,11 @@ public class Cat extends Animal {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,46 +1,86 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* Category
*/
public class Category { public class Category {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@SerializedName("name") @SerializedName("name")
private String name = null; private String name = null;
public Category id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Category name(String name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -48,8 +88,8 @@ public class Category {
return false; return false;
} }
Category category = (Category) o; Category category = (Category) o;
return Objects.equals(id, category.id) && return Objects.equals(this.id, category.id) &&
Objects.equals(name, category.name); Objects.equals(this.name, category.name);
} }
@Override @Override
@ -72,10 +112,11 @@ public class Category {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,18 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal; import io.swagger.client.model.Animal;
import com.google.gson.annotations.SerializedName;
/**
* Dog
*/
public class Dog extends Animal { public class Dog extends Animal {
@SerializedName("className") @SerializedName("className")
private String className = null; private String className = null;
@ -22,39 +46,63 @@ public class Dog extends Animal {
@SerializedName("breed") @SerializedName("breed")
private String breed = null; private String breed = null;
public Dog className(String className) {
this.className = className;
return this;
}
/** /**
* Get className
* @return className
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Dog color(String color) {
this.color = color;
return this;
}
/** /**
* Get color
* @return color
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/** /**
* Get breed
* @return breed
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getBreed() { public String getBreed() {
return breed; return breed;
} }
public void setBreed(String breed) { public void setBreed(String breed) {
this.breed = breed; this.breed = breed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -62,14 +110,15 @@ public class Dog extends Animal {
return false; return false;
} }
Dog dog = (Dog) o; Dog dog = (Dog) o;
return Objects.equals(className, dog.className) && return Objects.equals(this.className, dog.className) &&
Objects.equals(color, dog.color) && Objects.equals(this.color, dog.color) &&
Objects.equals(breed, dog.breed); Objects.equals(this.breed, dog.breed) &&
super.equals(o);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(className, color, breed); return Objects.hash(className, color, breed, super.hashCode());
} }
@Override @Override
@ -88,10 +137,11 @@ public class Dog extends Animal {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,50 +1,57 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
/**
* Gets or Sets EnumClass
*/
public enum EnumClass {
@SerializedName("_abc")
_ABC("_abc"),
@SerializedName("-efg")
_EFG("-efg"),
public class EnumClass { @SerializedName("(xyz)")
_XYZ_("(xyz)");
private String value;
@Override EnumClass(String value) {
public boolean equals(Object o) { this.value = value;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumClass enumClass = (EnumClass) o;
return true;
}
@Override
public int hashCode() {
return Objects.hash();
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); return String.valueOf(value);
sb.append("class EnumClass {\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,18 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* EnumTest
*/
public class EnumTest { public class EnumTest {
/** /**
* Gets or Sets enumString * Gets or Sets enumString
*/ */
@ -38,7 +61,6 @@ public class EnumTest {
@SerializedName("enum_string") @SerializedName("enum_string")
private EnumStringEnum enumString = null; private EnumStringEnum enumString = null;
/** /**
* Gets or Sets enumInteger * Gets or Sets enumInteger
*/ */
@ -64,7 +86,6 @@ public class EnumTest {
@SerializedName("enum_integer") @SerializedName("enum_integer")
private EnumIntegerEnum enumInteger = null; private EnumIntegerEnum enumInteger = null;
/** /**
* Gets or Sets enumNumber * Gets or Sets enumNumber
*/ */
@ -90,39 +111,63 @@ public class EnumTest {
@SerializedName("enum_number") @SerializedName("enum_number")
private EnumNumberEnum enumNumber = null; private EnumNumberEnum enumNumber = null;
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
/** /**
* Get enumString
* @return enumString
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public EnumStringEnum getEnumString() { public EnumStringEnum getEnumString() {
return enumString; return enumString;
} }
public void setEnumString(EnumStringEnum enumString) { public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString; this.enumString = enumString;
} }
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
/** /**
* Get enumInteger
* @return enumInteger
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public EnumIntegerEnum getEnumInteger() { public EnumIntegerEnum getEnumInteger() {
return enumInteger; return enumInteger;
} }
public void setEnumInteger(EnumIntegerEnum enumInteger) { public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
} }
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
/** /**
* Get enumNumber
* @return enumNumber
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public EnumNumberEnum getEnumNumber() { public EnumNumberEnum getEnumNumber() {
return enumNumber; return enumNumber;
} }
public void setEnumNumber(EnumNumberEnum enumNumber) { public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber; this.enumNumber = enumNumber;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -130,9 +175,9 @@ public class EnumTest {
return false; return false;
} }
EnumTest enumTest = (EnumTest) o; EnumTest enumTest = (EnumTest) o;
return Objects.equals(enumString, enumTest.enumString) && return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(enumInteger, enumTest.enumInteger) && Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(enumNumber, enumTest.enumNumber); Objects.equals(this.enumNumber, enumTest.enumNumber);
} }
@Override @Override
@ -156,10 +201,11 @@ public class EnumTest {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,20 +1,44 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import com.google.gson.annotations.SerializedName;
/**
* FormatTest
*/
public class FormatTest { public class FormatTest {
@SerializedName("integer") @SerializedName("integer")
private Integer integer = null; private Integer integer = null;
@ -54,149 +78,253 @@ public class FormatTest {
@SerializedName("password") @SerializedName("password")
private String password = null; private String password = null;
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
/** /**
* Get integer
* minimum: 10.0 * minimum: 10.0
* maximum: 100.0 * maximum: 100.0
* @return integer
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getInteger() { public Integer getInteger() {
return integer; return integer;
} }
public void setInteger(Integer integer) { public void setInteger(Integer integer) {
this.integer = integer; this.integer = integer;
} }
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
/** /**
* Get int32
* minimum: 20.0 * minimum: 20.0
* maximum: 200.0 * maximum: 200.0
* @return int32
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getInt32() { public Integer getInt32() {
return int32; return int32;
} }
public void setInt32(Integer int32) { public void setInt32(Integer int32) {
this.int32 = int32; this.int32 = int32;
} }
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
/** /**
* Get int64
* @return int64
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getInt64() { public Long getInt64() {
return int64; return int64;
} }
public void setInt64(Long int64) { public void setInt64(Long int64) {
this.int64 = int64; this.int64 = int64;
} }
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
/** /**
* Get number
* minimum: 32.1 * minimum: 32.1
* maximum: 543.2 * maximum: 543.2
* @return number
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public BigDecimal getNumber() { public BigDecimal getNumber() {
return number; return number;
} }
public void setNumber(BigDecimal number) { public void setNumber(BigDecimal number) {
this.number = number; this.number = number;
} }
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
/** /**
* Get _float
* minimum: 54.3 * minimum: 54.3
* maximum: 987.6 * maximum: 987.6
* @return _float
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Float getFloat() { public Float getFloat() {
return _float; return _float;
} }
public void setFloat(Float _float) { public void setFloat(Float _float) {
this._float = _float; this._float = _float;
} }
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
/** /**
* Get _double
* minimum: 67.8 * minimum: 67.8
* maximum: 123.4 * maximum: 123.4
* @return _double
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Double getDouble() { public Double getDouble() {
return _double; return _double;
} }
public void setDouble(Double _double) { public void setDouble(Double _double) {
this._double = _double; this._double = _double;
} }
public FormatTest string(String string) {
this.string = string;
return this;
}
/** /**
* Get string
* @return string
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getString() { public String getString() {
return string; return string;
} }
public void setString(String string) { public void setString(String string) {
this.string = string; this.string = string;
} }
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/** /**
* Get _byte
* @return _byte
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public byte[] getByte() { public byte[] getByte() {
return _byte; return _byte;
} }
public void setByte(byte[] _byte) { public void setByte(byte[] _byte) {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
/** /**
* Get binary
* @return binary
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public byte[] getBinary() { public byte[] getBinary() {
return binary; return binary;
} }
public void setBinary(byte[] binary) { public void setBinary(byte[] binary) {
this.binary = binary; this.binary = binary;
} }
public FormatTest date(LocalDate date) {
this.date = date;
return this;
}
/** /**
* Get date
* @return date
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public LocalDate getDate() { public LocalDate getDate() {
return date; return date;
} }
public void setDate(LocalDate date) { public void setDate(LocalDate date) {
this.date = date; this.date = date;
} }
public FormatTest dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/** /**
* Get dateTime
* @return dateTime
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public DateTime getDateTime() { public DateTime getDateTime() {
return dateTime; return dateTime;
} }
public void setDateTime(DateTime dateTime) { public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
} }
public FormatTest uuid(String uuid) {
this.uuid = uuid;
return this;
}
/** /**
* Get uuid
* @return uuid
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getUuid() { public String getUuid() {
return uuid; return uuid;
} }
public void setUuid(String uuid) { public void setUuid(String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
public FormatTest password(String password) {
this.password = password;
return this;
}
/** /**
* Get password
* @return password
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -204,19 +332,19 @@ public class FormatTest {
return false; return false;
} }
FormatTest formatTest = (FormatTest) o; FormatTest formatTest = (FormatTest) o;
return Objects.equals(integer, formatTest.integer) && return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(int32, formatTest.int32) && Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(int64, formatTest.int64) && Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(number, formatTest.number) && Objects.equals(this.number, formatTest.number) &&
Objects.equals(_float, formatTest._float) && Objects.equals(this._float, formatTest._float) &&
Objects.equals(_double, formatTest._double) && Objects.equals(this._double, formatTest._double) &&
Objects.equals(string, formatTest.string) && Objects.equals(this.string, formatTest.string) &&
Objects.equals(_byte, formatTest._byte) && Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(binary, formatTest.binary) && Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(date, formatTest.date) && Objects.equals(this.date, formatTest.date) &&
Objects.equals(dateTime, formatTest.dateTime) && Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(uuid, formatTest.uuid) && Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(password, formatTest.password); Objects.equals(this.password, formatTest.password);
} }
@Override @Override
@ -250,10 +378,11 @@ public class FormatTest {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,104 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* HasOnlyReadOnly
*/
public class HasOnlyReadOnly {
@SerializedName("bar")
private String bar = null;
@SerializedName("foo")
private String foo = null;
/**
* Get bar
* @return bar
**/
@ApiModelProperty(example = "null", value = "")
public String getBar() {
return bar;
}
/**
* Get foo
* @return foo
**/
@ApiModelProperty(example = "null", value = "")
public String getFoo() {
return foo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
}
@Override
public int hashCode() {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HasOnlyReadOnly {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" foo: ").append(toIndentedString(foo)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,147 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MapTest
*/
public class MapTest {
@SerializedName("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
/**
* Gets or Sets inner
*/
public enum InnerEnum {
@SerializedName("UPPER")
UPPER("UPPER"),
@SerializedName("lower")
LOWER("lower");
private String value;
InnerEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
@SerializedName("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
/**
* Get mapMapOfString
* @return mapMapOfString
**/
@ApiModelProperty(example = "null", value = "")
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
/**
* Get mapOfEnumString
* @return mapOfEnumString
**/
@ApiModelProperty(example = "null", value = "")
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
}
@Override
public int hashCode() {
return Objects.hash(mapMapOfString, mapOfEnumString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MapTest {\n");
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,6 +1,32 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal; import io.swagger.client.model.Animal;
@ -9,14 +35,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import com.google.gson.annotations.SerializedName;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
public class MixedPropertiesAndAdditionalPropertiesClass { public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid") @SerializedName("uuid")
private String uuid = null; private String uuid = null;
@ -26,39 +50,63 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("map") @SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>(); private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
this.uuid = uuid;
return this;
}
/** /**
* Get uuid
* @return uuid
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getUuid() { public String getUuid() {
return uuid; return uuid;
} }
public void setUuid(String uuid) { public void setUuid(String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/** /**
* Get dateTime
* @return dateTime
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public DateTime getDateTime() { public DateTime getDateTime() {
return dateTime; return dateTime;
} }
public void setDateTime(DateTime dateTime) { public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
} }
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
return this;
}
/** /**
* Get map
* @return map
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Map<String, Animal> getMap() { public Map<String, Animal> getMap() {
return map; return map;
} }
public void setMap(Map<String, Animal> map) { public void setMap(Map<String, Animal> map) {
this.map = map; this.map = map;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -66,9 +114,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return false; return false;
} }
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(map, mixedPropertiesAndAdditionalPropertiesClass.map); Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
} }
@Override @Override
@ -92,10 +140,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,49 +1,87 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/** /**
* Model for testing model name starting with number * Model for testing model name starting with number
**/ */
@ApiModel(description = "Model for testing model name starting with number") @ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
public class Model200Response {
@SerializedName("name") @SerializedName("name")
private Integer name = null; private Integer name = null;
@SerializedName("class") @SerializedName("class")
private String PropertyClass = null; private String PropertyClass = null;
public Model200Response name(Integer name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getName() { public Integer getName() {
return name; return name;
} }
public void setName(Integer name) { public void setName(Integer name) {
this.name = name; this.name = name;
} }
public Model200Response PropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
return this;
}
/** /**
* Get PropertyClass
* @return PropertyClass
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getPropertyClass() { public String getPropertyClass() {
return PropertyClass; return PropertyClass;
} }
public void setPropertyClass(String PropertyClass) { public void setPropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass; this.PropertyClass = PropertyClass;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -51,8 +89,8 @@ public class Model200Response {
return false; return false;
} }
Model200Response _200Response = (Model200Response) o; Model200Response _200Response = (Model200Response) o;
return Objects.equals(name, _200Response.name) && return Objects.equals(this.name, _200Response.name) &&
Objects.equals(PropertyClass, _200Response.PropertyClass); Objects.equals(this.PropertyClass, _200Response.PropertyClass);
} }
@Override @Override
@ -75,10 +113,11 @@ public class Model200Response {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,17 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* ModelApiResponse
*/
public class ModelApiResponse { public class ModelApiResponse {
@SerializedName("code") @SerializedName("code")
private Integer code = null; private Integer code = null;
@ -21,39 +45,63 @@ public class ModelApiResponse {
@SerializedName("message") @SerializedName("message")
private String message = null; private String message = null;
public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
/** /**
* Get code
* @return code
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
public void setCode(Integer code) { public void setCode(Integer code) {
this.code = code; this.code = code;
} }
public ModelApiResponse type(String type) {
this.type = type;
return this;
}
/** /**
* Get type
* @return type
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getType() { public String getType() {
return type; return type;
} }
public void setType(String type) { public void setType(String type) {
this.type = type; this.type = type;
} }
public ModelApiResponse message(String message) {
this.message = message;
return this;
}
/** /**
* Get message
* @return message
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getMessage() { public String getMessage() {
return message; return message;
} }
public void setMessage(String message) { public void setMessage(String message) {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -61,9 +109,9 @@ public class ModelApiResponse {
return false; return false;
} }
ModelApiResponse _apiResponse = (ModelApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(code, _apiResponse.code) && return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(type, _apiResponse.type) && Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(message, _apiResponse.message); Objects.equals(this.message, _apiResponse.message);
} }
@Override @Override
@ -87,10 +135,11 @@ public class ModelApiResponse {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,36 +1,66 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/** /**
* Model for testing reserved words * Model for testing reserved words
**/ */
@ApiModel(description = "Model for testing reserved words") @ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
public class ModelReturn {
@SerializedName("return") @SerializedName("return")
private Integer _return = null; private Integer _return = null;
public ModelReturn _return(Integer _return) {
this._return = _return;
return this;
}
/** /**
* Get _return
* @return _return
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getReturn() { public Integer getReturn() {
return _return; return _return;
} }
public void setReturn(Integer _return) { public void setReturn(Integer _return) {
this._return = _return; this._return = _return;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -38,7 +68,7 @@ public class ModelReturn {
return false; return false;
} }
ModelReturn _return = (ModelReturn) o; ModelReturn _return = (ModelReturn) o;
return Objects.equals(_return, _return._return); return Objects.equals(this._return, _return._return);
} }
@Override @Override
@ -60,10 +90,11 @@ public class ModelReturn {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,20 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/** /**
* Model for testing model name same as property name * Model for testing model name same as property name
**/ */
@ApiModel(description = "Model for testing model name same as property name") @ApiModel(description = "Model for testing model name same as property name")
public class Name {
public class Name {
@SerializedName("name") @SerializedName("name")
private Integer name = null; private Integer name = null;
@ -27,43 +49,63 @@ public class Name {
@SerializedName("123Number") @SerializedName("123Number")
private Integer _123Number = null; private Integer _123Number = null;
public Name name(Integer name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public Integer getName() { public Integer getName() {
return name; return name;
} }
public void setName(Integer name) { public void setName(Integer name) {
this.name = name; this.name = name;
} }
/** /**
* Get snakeCase
* @return snakeCase
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getSnakeCase() { public Integer getSnakeCase() {
return snakeCase; return snakeCase;
} }
public Name property(String property) {
this.property = property;
return this;
}
/** /**
* Get property
* @return property
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getProperty() { public String getProperty() {
return property; return property;
} }
public void setProperty(String property) { public void setProperty(String property) {
this.property = property; this.property = property;
} }
/** /**
* Get _123Number
* @return _123Number
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer get123Number() { public Integer get123Number() {
return _123Number; return _123Number;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -71,10 +113,10 @@ public class Name {
return false; return false;
} }
Name name = (Name) o; Name name = (Name) o;
return Objects.equals(name, name.name) && return Objects.equals(this.name, name.name) &&
Objects.equals(snakeCase, name.snakeCase) && Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(property, name.property) && Objects.equals(this.property, name.property) &&
Objects.equals(_123Number, name._123Number); Objects.equals(this._123Number, name._123Number);
} }
@Override @Override
@ -99,10 +141,11 @@ public class Name {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -0,0 +1,100 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* NumberOnly
*/
public class NumberOnly {
@SerializedName("JustNumber")
private BigDecimal justNumber = null;
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
/**
* Get justNumber
* @return justNumber
**/
@ApiModelProperty(example = "null", value = "")
public BigDecimal getJustNumber() {
return justNumber;
}
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NumberOnly numberOnly = (NumberOnly) o;
return Objects.equals(this.justNumber, numberOnly.justNumber);
}
@Override
public int hashCode() {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NumberOnly {\n");
sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,18 +1,42 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import com.google.gson.annotations.SerializedName;
/**
* Order
*/
public class Order { public class Order {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@ -25,7 +49,6 @@ public class Order {
@SerializedName("shipDate") @SerializedName("shipDate")
private DateTime shipDate = null; private DateTime shipDate = null;
/** /**
* Order Status * Order Status
*/ */
@ -57,70 +80,117 @@ public class Order {
@SerializedName("complete") @SerializedName("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Order petId(Long petId) {
this.petId = petId;
return this;
}
/** /**
* Get petId
* @return petId
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
public void setPetId(Long petId) { public void setPetId(Long petId) {
this.petId = petId; this.petId = petId;
} }
public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
/** /**
* Get quantity
* @return quantity
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
public void setQuantity(Integer quantity) { public void setQuantity(Integer quantity) {
this.quantity = quantity; this.quantity = quantity;
} }
public Order shipDate(DateTime shipDate) {
this.shipDate = shipDate;
return this;
}
/** /**
* Get shipDate
* @return shipDate
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public DateTime getShipDate() { public DateTime getShipDate() {
return shipDate; return shipDate;
} }
public void setShipDate(DateTime shipDate) { public void setShipDate(DateTime shipDate) {
this.shipDate = shipDate; this.shipDate = shipDate;
} }
public Order status(StatusEnum status) {
this.status = status;
return this;
}
/** /**
* Order Status * Order Status
* @return status
**/ **/
@ApiModelProperty(value = "Order Status") @ApiModelProperty(example = "null", value = "Order Status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
public void setStatus(StatusEnum status) { public void setStatus(StatusEnum status) {
this.status = status; this.status = status;
} }
public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
/** /**
* Get complete
* @return complete
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -128,12 +198,12 @@ public class Order {
return false; return false;
} }
Order order = (Order) o; Order order = (Order) o;
return Objects.equals(id, order.id) && return Objects.equals(this.id, order.id) &&
Objects.equals(petId, order.petId) && Objects.equals(this.petId, order.petId) &&
Objects.equals(quantity, order.quantity) && Objects.equals(this.quantity, order.quantity) &&
Objects.equals(shipDate, order.shipDate) && Objects.equals(this.shipDate, order.shipDate) &&
Objects.equals(status, order.status) && Objects.equals(this.status, order.status) &&
Objects.equals(complete, order.complete); Objects.equals(this.complete, order.complete);
} }
@Override @Override
@ -160,10 +230,11 @@ public class Order {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,6 +1,32 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Category; import io.swagger.client.model.Category;
@ -8,14 +34,12 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* Pet
*/
public class Pet { public class Pet {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@ -31,7 +55,6 @@ public class Pet {
@SerializedName("tags") @SerializedName("tags")
private List<Tag> tags = new ArrayList<Tag>(); private List<Tag> tags = new ArrayList<Tag>();
/** /**
* pet status in the store * pet status in the store
*/ */
@ -60,70 +83,117 @@ public class Pet {
@SerializedName("status") @SerializedName("status")
private StatusEnum status = null; private StatusEnum status = null;
public Pet id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Pet category(Category category) {
this.category = category;
return this;
}
/** /**
* Get category
* @return category
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
public void setCategory(Category category) { public void setCategory(Category category) {
this.category = category; this.category = category;
} }
public Pet name(String name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
/** /**
* Get photoUrls
* @return photoUrls
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
public void setPhotoUrls(List<String> photoUrls) { public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls; this.photoUrls = photoUrls;
} }
public Pet tags(List<Tag> tags) {
this.tags = tags;
return this;
}
/** /**
* Get tags
* @return tags
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
public void setTags(List<Tag> tags) { public void setTags(List<Tag> tags) {
this.tags = tags; this.tags = tags;
} }
public Pet status(StatusEnum status) {
this.status = status;
return this;
}
/** /**
* pet status in the store * pet status in the store
* @return status
**/ **/
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(example = "null", value = "pet status in the store")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
public void setStatus(StatusEnum status) { public void setStatus(StatusEnum status) {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -131,12 +201,12 @@ public class Pet {
return false; return false;
} }
Pet pet = (Pet) o; Pet pet = (Pet) o;
return Objects.equals(id, pet.id) && return Objects.equals(this.id, pet.id) &&
Objects.equals(category, pet.category) && Objects.equals(this.category, pet.category) &&
Objects.equals(name, pet.name) && Objects.equals(this.name, pet.name) &&
Objects.equals(photoUrls, pet.photoUrls) && Objects.equals(this.photoUrls, pet.photoUrls) &&
Objects.equals(tags, pet.tags) && Objects.equals(this.tags, pet.tags) &&
Objects.equals(status, pet.status); Objects.equals(this.status, pet.status);
} }
@Override @Override
@ -163,10 +233,11 @@ public class Pet {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,17 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* ReadOnlyFirst
*/
public class ReadOnlyFirst { public class ReadOnlyFirst {
@SerializedName("bar") @SerializedName("bar")
private String bar = null; private String bar = null;
@ -19,25 +43,35 @@ public class ReadOnlyFirst {
private String baz = null; private String baz = null;
/** /**
* Get bar
* @return bar
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getBar() { public String getBar() {
return bar; return bar;
} }
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
/** /**
* Get baz
* @return baz
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getBaz() { public String getBaz() {
return baz; return baz;
} }
public void setBaz(String baz) { public void setBaz(String baz) {
this.baz = baz; this.baz = baz;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -45,8 +79,8 @@ public class ReadOnlyFirst {
return false; return false;
} }
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(bar, readOnlyFirst.bar) && return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(baz, readOnlyFirst.baz); Objects.equals(this.baz, readOnlyFirst.baz);
} }
@Override @Override
@ -69,10 +103,11 @@ public class ReadOnlyFirst {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,33 +1,65 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* SpecialModelName
*/
public class SpecialModelName { public class SpecialModelName {
@SerializedName("$special[property.name]") @SerializedName("$special[property.name]")
private Long specialPropertyName = null; private Long specialPropertyName = null;
public SpecialModelName specialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
return this;
}
/** /**
* Get specialPropertyName
* @return specialPropertyName
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getSpecialPropertyName() { public Long getSpecialPropertyName() {
return specialPropertyName; return specialPropertyName;
} }
public void setSpecialPropertyName(Long specialPropertyName) { public void setSpecialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName; this.specialPropertyName = specialPropertyName;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -35,7 +67,7 @@ public class SpecialModelName {
return false; return false;
} }
SpecialModelName specialModelName = (SpecialModelName) o; SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(specialPropertyName, specialModelName.specialPropertyName); return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
} }
@Override @Override
@ -57,10 +89,11 @@ public class SpecialModelName {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,46 +1,86 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* Tag
*/
public class Tag { public class Tag {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@SerializedName("name") @SerializedName("name")
private String name = null; private String name = null;
public Tag id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Tag name(String name) {
this.name = name;
return this;
}
/** /**
* Get name
* @return name
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -48,8 +88,8 @@ public class Tag {
return false; return false;
} }
Tag tag = (Tag) o; Tag tag = (Tag) o;
return Objects.equals(id, tag.id) && return Objects.equals(this.id, tag.id) &&
Objects.equals(name, tag.name); Objects.equals(this.name, tag.name);
} }
@Override @Override
@ -72,10 +112,11 @@ public class Tag {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@ -1,17 +1,41 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* User
*/
public class User { public class User {
@SerializedName("id") @SerializedName("id")
private Long id = null; private Long id = null;
@ -36,90 +60,153 @@ public class User {
@SerializedName("userStatus") @SerializedName("userStatus")
private Integer userStatus = null; private Integer userStatus = null;
public User id(Long id) {
this.id = id;
return this;
}
/** /**
* Get id
* @return id
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public User username(String username) {
this.username = username;
return this;
}
/** /**
* Get username
* @return username
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getUsername() { public String getUsername() {
return username; return username;
} }
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/** /**
* Get firstName
* @return firstName
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
public void setFirstName(String firstName) { public void setFirstName(String firstName) {
this.firstName = firstName; this.firstName = firstName;
} }
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/** /**
* Get lastName
* @return lastName
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
public void setLastName(String lastName) { public void setLastName(String lastName) {
this.lastName = lastName; this.lastName = lastName;
} }
public User email(String email) {
this.email = email;
return this;
}
/** /**
* Get email
* @return email
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getEmail() { public String getEmail() {
return email; return email;
} }
public void setEmail(String email) { public void setEmail(String email) {
this.email = email; this.email = email;
} }
public User password(String password) {
this.password = password;
return this;
}
/** /**
* Get password
* @return password
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
public User phone(String phone) {
this.phone = phone;
return this;
}
/** /**
* Get phone
* @return phone
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(example = "null", value = "")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
public void setPhone(String phone) { public void setPhone(String phone) {
this.phone = phone; this.phone = phone;
} }
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
/** /**
* User Status * User Status
* @return userStatus
**/ **/
@ApiModelProperty(value = "User Status") @ApiModelProperty(example = "null", value = "User Status")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
public void setUserStatus(Integer userStatus) { public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
@ -127,14 +214,14 @@ public class User {
return false; return false;
} }
User user = (User) o; User user = (User) o;
return Objects.equals(id, user.id) && return Objects.equals(this.id, user.id) &&
Objects.equals(username, user.username) && Objects.equals(this.username, user.username) &&
Objects.equals(firstName, user.firstName) && Objects.equals(this.firstName, user.firstName) &&
Objects.equals(lastName, user.lastName) && Objects.equals(this.lastName, user.lastName) &&
Objects.equals(email, user.email) && Objects.equals(this.email, user.email) &&
Objects.equals(password, user.password) && Objects.equals(this.password, user.password) &&
Objects.equals(phone, user.phone) && Objects.equals(this.phone, user.phone) &&
Objects.equals(userStatus, user.userStatus); Objects.equals(this.userStatus, user.userStatus);
} }
@Override @Override
@ -163,10 +250,11 @@ public class User {
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces
* (except the first line). * (except the first line).
*/ */
private String toIndentedString(Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
return "null"; return "null";
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }