Skip to content

Commit

Permalink
Rename maxResults to pageSize, add tests for pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Mar 13, 2016
1 parent 912ec8b commit ef98269
Show file tree
Hide file tree
Showing 3 changed files with 298 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ public static DiskTypeListOption filter(DiskTypeFilter filter) {
/**
* Returns an option to specify the maximum number of disk types to be returned.
*/
public static DiskTypeListOption maxResults(long maxResults) {
return new DiskTypeListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static DiskTypeListOption pageSize(long pageSize) {
return new DiskTypeListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down Expand Up @@ -642,8 +642,8 @@ public static DiskTypeAggregatedListOption filter(DiskTypeFilter filter) {
/**
* Returns an option to specify the maximum number of disk types to be returned.
*/
public static DiskTypeAggregatedListOption maxResults(long maxResults) {
return new DiskTypeAggregatedListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static DiskTypeAggregatedListOption pageSize(long pageSize) {
return new DiskTypeAggregatedListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down Expand Up @@ -697,8 +697,8 @@ public static MachineTypeListOption filter(MachineTypeFilter filter) {
/**
* Returns an option to specify the maximum number of machine types to be returned.
*/
public static MachineTypeListOption maxResults(long maxResults) {
return new MachineTypeListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static MachineTypeListOption pageSize(long pageSize) {
return new MachineTypeListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down Expand Up @@ -742,8 +742,8 @@ public static MachineTypeAggregatedListOption filter(MachineTypeFilter filter) {
/**
* Returns an option to specify the maximum number of machine types to be returned.
*/
public static MachineTypeAggregatedListOption maxResults(long maxResults) {
return new MachineTypeAggregatedListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static MachineTypeAggregatedListOption pageSize(long pageSize) {
return new MachineTypeAggregatedListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down Expand Up @@ -797,8 +797,8 @@ public static RegionListOption filter(RegionFilter filter) {
/**
* Returns an option to specify the maximum number of regions to be returned.
*/
public static RegionListOption maxResults(long maxResults) {
return new RegionListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static RegionListOption pageSize(long pageSize) {
return new RegionListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down Expand Up @@ -864,8 +864,8 @@ public static ZoneListOption filter(ZoneFilter filter) {
/**
* Returns an option to specify the maximum number of zones to be returned.
*/
public static ZoneListOption maxResults(long maxResults) {
return new ZoneListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static ZoneListOption pageSize(long pageSize) {
return new ZoneListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down Expand Up @@ -953,8 +953,8 @@ public static OperationListOption filter(OperationFilter filter) {
/**
* Returns an option to specify the maximum number of operations to be returned.
*/
public static OperationListOption maxResults(long maxResults) {
return new OperationListOption(ComputeRpc.Option.MAX_RESULTS, maxResults);
public static OperationListOption pageSize(long pageSize) {
return new OperationListOption(ComputeRpc.Option.MAX_RESULTS, pageSize);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* Google Compute Engine operations. Operation identity can be obtained via {@link #operationId()}.
* {@link #operationId()} returns {@link GlobalOperationId} for global operations,
* {@link RegionOperationId} for region operations, and {@link ZoneOperationId} for zone operations.
* To get an {@code Operation} object with the most recent information use
* To get an {@code Operation} object with the most recent information, use
* {@link #reload(Compute.OperationOption...)}.
*/
public final class Operation implements Serializable {
Expand Down
Loading

0 comments on commit ef98269

Please sign in to comment.