public static GetJobListOptions latestJobForObjectByName(String serverName) { return new GetJobListOptions().latestJobForObjectByName(serverName); } }
public GetJobListOptions latestJobForObjectByName(String serverName) { return maxItemsNumber(1).onlyForObjectName(serverName); }
public static GetJobListOptions startDate(Date startDate){ return new GetJobListOptions().withStartDate(startDate); }
public static GetJobListOptions maxItems(int maxNumber) { return new GetJobListOptions().maxItemsNumber(maxNumber); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetJobListOptions options = (GetJobListOptions) o; return buildQueryParameters().equals(options.buildQueryParameters()); }
@Test public void testGetJobListWithOptions() throws NoSuchMethodException, IOException { Invokable<?, ?> method = method(GridJobAsyncClient.class, "getJobList", GetJobListOptions[].class); GeneratedHttpRequest httpRequest = processor .createRequest(method, ImmutableList.<Object> of(startDate(new Date(1267385381770L)).withEndDate(new Date(1267385382770L)) .onlyForObjectType(ObjectType.VIRTUAL_SERVER).onlyForState(JobState.PROCESSING))); assertRequestLineEquals(httpRequest, "GET https://api.gogrid.com/api/grid/job/list?v=1.5&startdate=1267385381770&" + "enddate=1267385382770&job.objecttype=VirtualServer&" + "job.state=Processing HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, ""); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseJobListFromJsonResponse.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, null); checkFilters(httpRequest); httpRequest = (GeneratedHttpRequest) Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest); assertRequestLineEquals(httpRequest, "GET https://api.gogrid.com/api/grid/job/list?v=1.5&startdate=1267385381770&" + "enddate=1267385382770&job.objecttype=VirtualServer&" + "job.state=Processing&" + "sig=e9aafd0a5d4c69bb24536be4bce8a528&api_key=identity HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, ""); assertPayloadEquals(httpRequest, null, null, false); }
public static GetJobListOptions maxItems(int maxNumber) { return new GetJobListOptions().maxItemsNumber(maxNumber); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetJobListOptions options = (GetJobListOptions) o; return buildQueryParameters().equals(options.buildQueryParameters()); }
@Test public void testGetJobListWithOptions() throws NoSuchMethodException, IOException { Invokable<?, ?> method = method(GridJobApi.class, "getJobList", GetJobListOptions[].class); GeneratedHttpRequest httpRequest = processor .createRequest(method, ImmutableList.<Object> of(startDate(new Date(1267385381770L)).withEndDate(new Date(1267385382770L)) .onlyForObjectType(ObjectType.VIRTUAL_SERVER).onlyForState(JobState.PROCESSING))); assertRequestLineEquals(httpRequest, "GET https://api.gogrid.com/api/grid/job/list?v=1.5&startdate=1267385381770&" + "enddate=1267385382770&job.objecttype=VirtualServer&" + "job.state=Processing HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, ""); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseJobListFromJsonResponse.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, null); checkFilters(httpRequest); httpRequest = (GeneratedHttpRequest) Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest); assertRequestLineEquals(httpRequest, "GET https://api.gogrid.com/api/grid/job/list?v=1.5&startdate=1267385381770&" + "enddate=1267385382770&job.objecttype=VirtualServer&" + "job.state=Processing&" + "sig=e9aafd0a5d4c69bb24536be4bce8a528&api_key=identity HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, ""); assertPayloadEquals(httpRequest, null, null, false); }
public static GetJobListOptions latestJobForObjectByName(String serverName) { return new GetJobListOptions().latestJobForObjectByName(serverName); } }
public static GetJobListOptions startDate(Date startDate) { return new GetJobListOptions().withStartDate(startDate); }
public GetJobListOptions latestJobForObjectByName(String serverName) { return maxItemsNumber(1).onlyForObjectName(serverName); }
public static GetJobListOptions maxItems(int maxNumber) { return new GetJobListOptions().maxItemsNumber(maxNumber); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetJobListOptions options = (GetJobListOptions) o; return buildQueryParameters().equals(options.buildQueryParameters()); }
public static GetJobListOptions latestJobForObjectByName(String serverName) { return new GetJobListOptions().latestJobForObjectByName(serverName); } }
public static GetJobListOptions startDate(Date startDate) { return new GetJobListOptions().withStartDate(startDate); }
public GetJobListOptions latestJobForObjectByName(String serverName) { return maxItemsNumber(1).onlyForObjectName(serverName); }
public static GetJobListOptions maxItems(int maxNumber) { return new GetJobListOptions().maxItemsNumber(maxNumber); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetJobListOptions options = (GetJobListOptions) o; return buildQueryParameters().equals(options.buildQueryParameters()); }
public static GetJobListOptions latestJobForObjectByName(String serverName) { return new GetJobListOptions().latestJobForObjectByName(serverName); } }