Skip to content

Commit

Permalink
Merge pull request #851 from jianghaolu/lazy
Browse files Browse the repository at this point in the history
Lazy initialized paging results
  • Loading branch information
jianghaolu committed Mar 21, 2016
2 parents f24b0b6 + 8238efd commit 6aed2ce
Show file tree
Hide file tree
Showing 37 changed files with 1,920 additions and 457 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private ServiceResponse<Void> postRequiredDelegate(Response<ResponseBody> respon
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> postOptional() throws ErrorException, IOException {
ParameterGroupingPostOptionalParameters parameterGroupingPostOptionalParameters = null;
final ParameterGroupingPostOptionalParameters parameterGroupingPostOptionalParameters = null;
String customHeader = null;
if (parameterGroupingPostOptionalParameters != null) {
customHeader = parameterGroupingPostOptionalParameters.getCustomHeader();
Expand Down Expand Up @@ -272,8 +272,8 @@ private ServiceResponse<Void> postOptionalDelegate(Response<ResponseBody> respon
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> postMultiParamGroups() throws ErrorException, IOException {
FirstParameterGroup firstParameterGroup = null;
ParameterGroupingPostMultiParamGroupsSecondParamGroup parameterGroupingPostMultiParamGroupsSecondParamGroup = null;
final FirstParameterGroup firstParameterGroup = null;
final ParameterGroupingPostMultiParamGroupsSecondParamGroup parameterGroupingPostMultiParamGroupsSecondParamGroup = null;
String headerOne = null;
if (firstParameterGroup != null) {
headerOne = firstParameterGroup.getHeaderOne();
Expand Down Expand Up @@ -431,7 +431,7 @@ private ServiceResponse<Void> postMultiParamGroupsDelegate(Response<ResponseBody
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> postSharedParameterGroupObject() throws ErrorException, IOException {
FirstParameterGroup firstParameterGroup = null;
final FirstParameterGroup firstParameterGroup = null;
String headerOne = null;
if (firstParameterGroup != null) {
headerOne = firstParameterGroup.getHeaderOne();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ interface AutoRestResourceFlatteningTestServiceService {
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> putArray() throws ErrorException, IOException {
List<Resource> resourceArray = null;
final List<Resource> resourceArray = null;
Call<ResponseBody> call = service.putArray(resourceArray, this.getAcceptLanguage());
return putArrayDelegate(call.execute());
}
Expand Down Expand Up @@ -388,7 +388,7 @@ private ServiceResponse<List<FlattenedProduct>> getArrayDelegate(Response<Respon
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> putDictionary() throws ErrorException, IOException {
Map<String, FlattenedProduct> resourceDictionary = null;
final Map<String, FlattenedProduct> resourceDictionary = null;
Call<ResponseBody> call = service.putDictionary(resourceDictionary, this.getAcceptLanguage());
return putDictionaryDelegate(call.execute());
}
Expand Down Expand Up @@ -522,7 +522,7 @@ private ServiceResponse<Map<String, FlattenedProduct>> getDictionaryDelegate(Res
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> putResourceCollection() throws ErrorException, IOException {
ResourceCollection resourceComplexObject = null;
final ResourceCollection resourceComplexObject = null;
Call<ResponseBody> call = service.putResourceCollection(resourceComplexObject, this.getAcceptLanguage());
return putResourceCollectionDelegate(call.execute());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface ApiVersionLocalService {
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getMethodLocalValid() throws ErrorException, IOException {
String apiVersion = "2.0";
final String apiVersion = "2.0";
Call<ResponseBody> call = service.getMethodLocalValid(apiVersion, this.client.getAcceptLanguage());
return getMethodLocalValidDelegate(call.execute());
}
Expand Down Expand Up @@ -126,7 +126,7 @@ private ServiceResponse<Void> getMethodLocalValidDelegate(Response<ResponseBody>
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getMethodLocalNull() throws ErrorException, IOException {
String apiVersion = null;
final String apiVersion = null;
Call<ResponseBody> call = service.getMethodLocalNull(apiVersion, this.client.getAcceptLanguage());
return getMethodLocalNullDelegate(call.execute());
}
Expand Down Expand Up @@ -213,7 +213,7 @@ private ServiceResponse<Void> getMethodLocalNullDelegate(Response<ResponseBody>
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getPathLocalValid() throws ErrorException, IOException {
String apiVersion = "2.0";
final String apiVersion = "2.0";
Call<ResponseBody> call = service.getPathLocalValid(apiVersion, this.client.getAcceptLanguage());
return getPathLocalValidDelegate(call.execute());
}
Expand Down Expand Up @@ -260,7 +260,7 @@ private ServiceResponse<Void> getPathLocalValidDelegate(Response<ResponseBody> r
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getSwaggerLocalValid() throws ErrorException, IOException {
String apiVersion = "2.0";
final String apiVersion = "2.0";
Call<ResponseBody> call = service.getSwaggerLocalValid(apiVersion, this.client.getAcceptLanguage());
return getSwaggerLocalValidDelegate(call.execute());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ interface OdataService {
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getWithFilter() throws ErrorException, IOException {
OdataFilter filter = null;
Integer top = null;
String orderby = null;
final OdataFilter filter = null;
final Integer top = null;
final String orderby = null;
Call<ResponseBody> call = service.getWithFilter(this.client.getMapperAdapter().serializeRaw(filter), top, orderby, this.client.getAcceptLanguage());
return getWithFilterDelegate(call.execute());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private ServiceResponse<Void> getPathPathValidDelegate(Response<ResponseBody> re
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getSwaggerPathValid() throws ErrorException, IOException {
String unencodedPathParam = "path1/path2/path3";
final String unencodedPathParam = "path1/path2/path3";
Call<ResponseBody> call = service.getSwaggerPathValid(unencodedPathParam, this.client.getAcceptLanguage());
return getSwaggerPathValidDelegate(call.execute());
}
Expand Down Expand Up @@ -304,7 +304,7 @@ private ServiceResponse<Void> getMethodQueryValidDelegate(Response<ResponseBody>
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getMethodQueryNull() throws ErrorException, IOException {
String q1 = null;
final String q1 = null;
Call<ResponseBody> call = service.getMethodQueryNull(q1, this.client.getAcceptLanguage());
return getMethodQueryNullDelegate(call.execute());
}
Expand Down Expand Up @@ -446,7 +446,7 @@ private ServiceResponse<Void> getPathQueryValidDelegate(Response<ResponseBody> r
* @return the {@link ServiceResponse} object if successful.
*/
public ServiceResponse<Void> getSwaggerQueryValid() throws ErrorException, IOException {
String q1 = "value1&q2=value2&q3=value3";
final String q1 = "value1&q2=value2&q3=value3";
Call<ResponseBody> call = service.getSwaggerQueryValid(q1, this.client.getAcceptLanguage());
return getSwaggerQueryValidDelegate(call.execute());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
* @return the Product object wrapped in {@link ServiceResponse} if successful.
*/
public ServiceResponse<Product> beginPut201CreatingSucceeded200() throws CloudException, IOException {
Product product = null;
final Product product = null;
Call<ResponseBody> call = service.beginPut201CreatingSucceeded200(product, this.client.getAcceptLanguage());
return beginPut201CreatingSucceeded200Delegate(call.execute());
}
Expand Down Expand Up @@ -387,7 +387,7 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
* @return the Product object wrapped in {@link ServiceResponseWithHeaders} if successful.
*/
public ServiceResponseWithHeaders<Product, LRORetrysPutAsyncRelativeRetrySucceededHeaders> beginPutAsyncRelativeRetrySucceeded() throws CloudException, IOException {
Product product = null;
final Product product = null;
Call<ResponseBody> call = service.beginPutAsyncRelativeRetrySucceeded(product, this.client.getAcceptLanguage());
return beginPutAsyncRelativeRetrySucceededDelegate(call.execute());
}
Expand Down Expand Up @@ -812,7 +812,7 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public ServiceResponseWithHeaders<Void, LRORetrysPost202Retry200Headers> beginPost202Retry200() throws CloudException, IOException {
Product product = null;
final Product product = null;
Call<ResponseBody> call = service.beginPost202Retry200(product, this.client.getAcceptLanguage());
return beginPost202Retry200Delegate(call.execute());
}
Expand Down Expand Up @@ -984,7 +984,7 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public ServiceResponseWithHeaders<Void, LRORetrysPostAsyncRelativeRetrySucceededHeaders> beginPostAsyncRelativeRetrySucceeded() throws CloudException, IOException {
Product product = null;
final Product product = null;
Call<ResponseBody> call = service.beginPostAsyncRelativeRetrySucceeded(product, this.client.getAcceptLanguage());
return beginPostAsyncRelativeRetrySucceededDelegate(call.execute());
}
Expand Down
Loading

0 comments on commit 6aed2ce

Please sign in to comment.