> +       * @see DiskTypeApi#listAtMarkerInZone(String, String, 
> org.jclouds.googlecomputeengine.options.ListOptions)
> +       *
> +       * @param zone the zone to list in
> +       * @return a Paged, Fluent Iterable that is able to fetch additional 
> pages when required
> +       * @see PagedIterable
> +       */
> +      @Named("DiskTypes:list")
> +      @GET
> +      @Path("/zones/{zone}/diskTypes")
> +      @OAuthScopes(COMPUTE_READONLY_SCOPE)
> +      @ResponseParser(ParseDiskTypes.class)
> +      @Transform(ParseDiskTypes.ToPagedIterable.class)
> +      @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
> +      PagedIterable<DiskType> listInZone(@PathParam("zone") String zone, 
> ListOptions listOptions);
> +
> +}

jclouds APIs with pagination usually provide two methods to implement the 
*list* calls:

* One method that does not have pagination parameters and returns a 
`PagedIterable` (an Iterable that knows how to jump to the next page).
* And a method that accepts custom options (such as the page number, marker, 
whatever), that returns an `IterableWithMarker` (a single page, with the marker 
to the next one, that can be turn into a `PagedIterable`, if needed).

With this approach, would the last two *list* methods in this class be enough? 
The previous `listFirstPageInZone` and `listAtMarkerInZone` seem redundant?
Also, could the last method (the one that accepts the `ListOptions` parameter) 
be changed to return just an `IterableWithMarker`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/56/files#r18989334

Reply via email to