@@ -531,6 +531,73 @@ public Mono<BlobServiceStatistics> getStatisticsAsync(Integer timeout, String re
531531 .flatMap (res -> Mono .justOrEmpty (res .getValue ()));
532532 }
533533
534+ /**
535+ * The List Containers Segment operation returns a list of the containers under the specified account.
536+ *
537+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
538+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
539+ * listing operation. The operation returns the NextMarker value within the response body if the listing
540+ * operation did not return all containers remaining to be listed with the current page. The NextMarker value
541+ * can be used as the value for the marker parameter in a subsequent call to request the next page of list
542+ * items. The marker value is opaque to the client.
543+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
544+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
545+ * listing operation crosses a partition boundary, then the service will return a continuation token for
546+ * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer
547+ * results than specified by maxresults, or than the default of 5000.
548+ * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned
549+ * as part of the response body.
550+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
551+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
552+ * Timeouts for Blob Service Operations.</a>.
553+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
554+ * analytics logs when storage analytics logging is enabled.
555+ * @throws IllegalArgumentException thrown if parameters fail the validation.
556+ * @throws BlobStorageException thrown if the request is rejected by server.
557+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
558+ * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}.
559+ */
560+ @ ServiceMethod (returns = ReturnType .SINGLE )
561+ public Mono <PagedResponse <BlobContainerItem >> listBlobContainersSegmentSinglePageAsync (
562+ String prefix ,
563+ String marker ,
564+ Integer maxresults ,
565+ List <ListBlobContainersIncludeType > listBlobContainersIncludeType ,
566+ Integer timeout ,
567+ String requestId ) {
568+ final String comp = "list" ;
569+ final String accept = "application/xml" ;
570+ String listBlobContainersIncludeTypeConverted =
571+ (listBlobContainersIncludeType == null )
572+ ? null
573+ : listBlobContainersIncludeType .stream ()
574+ .map (value -> Objects .toString (value , "" ))
575+ .collect (Collectors .joining ("," ));
576+ return FluxUtil .withContext (
577+ context ->
578+ service .listBlobContainersSegment (
579+ this .client .getUrl (),
580+ comp ,
581+ prefix ,
582+ marker ,
583+ maxresults ,
584+ listBlobContainersIncludeTypeConverted ,
585+ timeout ,
586+ this .client .getVersion (),
587+ requestId ,
588+ accept ,
589+ context ))
590+ .map (
591+ res ->
592+ new PagedResponseBase <>(
593+ res .getRequest (),
594+ res .getStatusCode (),
595+ res .getHeaders (),
596+ res .getValue ().getBlobContainerItems (),
597+ res .getValue ().getNextMarker (),
598+ res .getDeserializedHeaders ()));
599+ }
600+
534601 /**
535602 * The List Containers Segment operation returns a list of the containers under the specified account.
536603 *
@@ -632,14 +699,11 @@ public PagedFlux<BlobContainerItem> listBlobContainersSegmentAsync(
632699 List <ListBlobContainersIncludeType > listBlobContainersIncludeType ,
633700 Integer timeout ,
634701 String requestId ) {
635- // TODO (alzimmer): This wasn't passing context as there is no Context to pass.
636- // There will be a fix for this in a future Autorest release but for now this was done manually.
637- // Adding this comment to make this obvious on diff.
638- return new PagedFlux <>(() -> FluxUtil .withContext (context ->
639- listBlobContainersSegmentSinglePageAsync (
640- prefix , marker , maxresults , listBlobContainersIncludeType , timeout , requestId , context )),
641- nextLink -> FluxUtil .withContext (context ->
642- listBlobContainersSegmentNextSinglePageAsync (nextLink , requestId , context )));
702+ return new PagedFlux <>(
703+ () ->
704+ listBlobContainersSegmentSinglePageAsync (
705+ prefix , marker , maxresults , listBlobContainersIncludeType , timeout , requestId ),
706+ nextLink -> listBlobContainersSegmentNextSinglePageAsync (nextLink , requestId ));
643707 }
644708
645709 /**
@@ -1283,6 +1347,42 @@ public Mono<FilterBlobSegment> filterBlobsAsync(
12831347 .flatMap (res -> Mono .justOrEmpty (res .getValue ()));
12841348 }
12851349
1350+ /**
1351+ * Get the next page of items.
1352+ *
1353+ * @param nextLink The URL to get the next list of items
1354+ * <p>The nextLink parameter.
1355+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
1356+ * analytics logs when storage analytics logging is enabled.
1357+ * @throws IllegalArgumentException thrown if parameters fail the validation.
1358+ * @throws BlobStorageException thrown if the request is rejected by server.
1359+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1360+ * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}.
1361+ */
1362+ @ ServiceMethod (returns = ReturnType .SINGLE )
1363+ public Mono <PagedResponse <BlobContainerItem >> listBlobContainersSegmentNextSinglePageAsync (
1364+ String nextLink , String requestId ) {
1365+ final String accept = "application/xml" ;
1366+ return FluxUtil .withContext (
1367+ context ->
1368+ service .listBlobContainersSegmentNext (
1369+ nextLink ,
1370+ this .client .getUrl (),
1371+ this .client .getVersion (),
1372+ requestId ,
1373+ accept ,
1374+ context ))
1375+ .map (
1376+ res ->
1377+ new PagedResponseBase <>(
1378+ res .getRequest (),
1379+ res .getStatusCode (),
1380+ res .getHeaders (),
1381+ res .getValue ().getBlobContainerItems (),
1382+ res .getValue ().getNextMarker (),
1383+ res .getDeserializedHeaders ()));
1384+ }
1385+
12861386 /**
12871387 * Get the next page of items.
12881388 *
0 commit comments