}
@Override
protected Function<Object, IterableWithMarker<Instance>> markerToNextForArg0(Optional<Object> arg0) {
final String region = arg0.isPresent() ? arg0.get().toString() : null;
final InstanceApi instanceApi = api.getInstanceApiForRegion(region);
return new Function<Object, IterableWithMarker<Instance>>() {
@Override
public IterableWithMarker<Instance> apply(Object input) {
return instanceApi.list(ListInstancesOptions.Builder.afterMarker(input));
}
@Override
public String toString() {
return "listInstancesInRegion(" + region + ")";