Skip to content

Commit d9e0740

Browse files
authored
Generated from 58a6ac73da75ab8f4ca375803da6c6da6d09dda9 (#3555)
Addressing CR comment: mark next-link as readOnly
1 parent 80a33fa commit d9e0740

File tree

4 files changed

+122
-12
lines changed

4 files changed

+122
-12
lines changed

storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ListContainerItems.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
* Type representing ListContainerItems.
1919
*/
2020
public interface ListContainerItems extends HasInner<ListContainerItemsInner>, HasManager<StorageManager> {
21+
/**
22+
* @return the nextLink value.
23+
*/
24+
String nextLink();
25+
2126
/**
2227
* @return the value value.
2328
*/

storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersInner.java

Lines changed: 96 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public BlobContainersInner(Retrofit retrofit, StorageManagementClientImpl client
6969
interface BlobContainersService {
7070
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_04_01.BlobContainers list" })
7171
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers")
72-
Observable<Response<ResponseBody>> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
72+
Observable<Response<ResponseBody>> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$skipToken") String skipToken, @Query("$maxpagesize") String maxpagesize, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
7373

7474
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_04_01.BlobContainers create" })
7575
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}")
@@ -186,7 +186,101 @@ public Observable<ServiceResponse<ListContainerItemsInner>> listWithServiceRespo
186186
if (this.client.apiVersion() == null) {
187187
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
188188
}
189-
return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
189+
final String skipToken = null;
190+
final String maxpagesize = null;
191+
final String filter = null;
192+
return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), skipToken, maxpagesize, filter, this.client.acceptLanguage(), this.client.userAgent())
193+
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ListContainerItemsInner>>>() {
194+
@Override
195+
public Observable<ServiceResponse<ListContainerItemsInner>> call(Response<ResponseBody> response) {
196+
try {
197+
ServiceResponse<ListContainerItemsInner> clientResponse = listDelegate(response);
198+
return Observable.just(clientResponse);
199+
} catch (Throwable t) {
200+
return Observable.error(t);
201+
}
202+
}
203+
});
204+
}
205+
206+
/**
207+
* Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
208+
*
209+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
210+
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
211+
* @param skipToken Optional. Continuation token for the list operation.
212+
* @param maxpagesize Optional. Specified maximum number of containers that can be included in the list.
213+
* @param filter Optional. When specified, only container names starting with the filter will be listed.
214+
* @throws IllegalArgumentException thrown if parameters fail the validation
215+
* @throws CloudException thrown if the request is rejected by server
216+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
217+
* @return the ListContainerItemsInner object if successful.
218+
*/
219+
public ListContainerItemsInner list(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter) {
220+
return listWithServiceResponseAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).toBlocking().single().body();
221+
}
222+
223+
/**
224+
* Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
225+
*
226+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
227+
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
228+
* @param skipToken Optional. Continuation token for the list operation.
229+
* @param maxpagesize Optional. Specified maximum number of containers that can be included in the list.
230+
* @param filter Optional. When specified, only container names starting with the filter will be listed.
231+
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
232+
* @throws IllegalArgumentException thrown if parameters fail the validation
233+
* @return the {@link ServiceFuture} object
234+
*/
235+
public ServiceFuture<ListContainerItemsInner> listAsync(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter, final ServiceCallback<ListContainerItemsInner> serviceCallback) {
236+
return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter), serviceCallback);
237+
}
238+
239+
/**
240+
* Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
241+
*
242+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
243+
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
244+
* @param skipToken Optional. Continuation token for the list operation.
245+
* @param maxpagesize Optional. Specified maximum number of containers that can be included in the list.
246+
* @param filter Optional. When specified, only container names starting with the filter will be listed.
247+
* @throws IllegalArgumentException thrown if parameters fail the validation
248+
* @return the observable to the ListContainerItemsInner object
249+
*/
250+
public Observable<ListContainerItemsInner> listAsync(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter) {
251+
return listWithServiceResponseAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).map(new Func1<ServiceResponse<ListContainerItemsInner>, ListContainerItemsInner>() {
252+
@Override
253+
public ListContainerItemsInner call(ServiceResponse<ListContainerItemsInner> response) {
254+
return response.body();
255+
}
256+
});
257+
}
258+
259+
/**
260+
* Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
261+
*
262+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
263+
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
264+
* @param skipToken Optional. Continuation token for the list operation.
265+
* @param maxpagesize Optional. Specified maximum number of containers that can be included in the list.
266+
* @param filter Optional. When specified, only container names starting with the filter will be listed.
267+
* @throws IllegalArgumentException thrown if parameters fail the validation
268+
* @return the observable to the ListContainerItemsInner object
269+
*/
270+
public Observable<ServiceResponse<ListContainerItemsInner>> listWithServiceResponseAsync(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter) {
271+
if (resourceGroupName == null) {
272+
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
273+
}
274+
if (accountName == null) {
275+
throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
276+
}
277+
if (this.client.subscriptionId() == null) {
278+
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
279+
}
280+
if (this.client.apiVersion() == null) {
281+
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
282+
}
283+
return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), skipToken, maxpagesize, filter, this.client.acceptLanguage(), this.client.userAgent())
190284
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ListContainerItemsInner>>>() {
191285
@Override
192286
public Observable<ServiceResponse<ListContainerItemsInner>> call(Response<ResponseBody> response) {

storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemsImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public StorageManager manager() {
2525
return this.manager;
2626
}
2727

28+
@Override
29+
public String nextLink() {
30+
return this.inner().nextLink();
31+
}
32+
2833
@Override
2934
public List<ListContainerItem> value() {
3035
return this.inner().value();

storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemsInner.java

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,25 @@
1313
import com.fasterxml.jackson.annotation.JsonProperty;
1414

1515
/**
16-
* The list of blob containers.
16+
* Response schema. Contains list of blobs returned, and if paging is requested
17+
* or required, a URL to next page of containers.
1718
*/
1819
public class ListContainerItemsInner {
1920
/**
20-
* The list of blob containers.
21+
* List of blobs containers returned.
2122
*/
22-
@JsonProperty(value = "value")
23+
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
2324
private List<ListContainerItem> value;
2425

2526
/**
26-
* Get the list of blob containers.
27+
* Request URL that can be used to query next page of containers. Returned
28+
* when total number of requested containers exceed maximum page size.
29+
*/
30+
@JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
31+
private String nextLink;
32+
33+
/**
34+
* Get list of blobs containers returned.
2735
*
2836
* @return the value value
2937
*/
@@ -32,14 +40,12 @@ public List<ListContainerItem> value() {
3240
}
3341

3442
/**
35-
* Set the list of blob containers.
43+
* Get request URL that can be used to query next page of containers. Returned when total number of requested containers exceed maximum page size.
3644
*
37-
* @param value the value value to set
38-
* @return the ListContainerItemsInner object itself.
45+
* @return the nextLink value
3946
*/
40-
public ListContainerItemsInner withValue(List<ListContainerItem> value) {
41-
this.value = value;
42-
return this;
47+
public String nextLink() {
48+
return this.nextLink;
4349
}
4450

4551
}

0 commit comments

Comments
 (0)