public void testUpdateResourceLimit() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(DomainLimitAsyncClient.class, "updateResourceLimit", ResourceLimit.class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of( ResourceLimit.builder().resourceType(ResourceType.SNAPSHOT).account("foo").domainId("100").max(101).build())); assertRequestLineEquals( httpRequest, "GET http://localhost:8080/client/api?response=json&command=updateResourceLimit&resourcetype=3&account=foo&domainid=100&max=101 HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class); checkFilters(httpRequest); } }
public void testUpdateResourceLimit() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(DomainLimitApi.class, "updateResourceLimit", ResourceLimit.class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of( ResourceLimit.builder().resourceType(ResourceType.SNAPSHOT).account("foo").domainId("100").max(101).build())); assertRequestLineEquals( httpRequest, "GET http://localhost:8080/client/api?response=json&command=updateResourceLimit&resourcetype=3&account=foo&domainid=100&max=101 HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class); checkFilters(httpRequest); } }
public T fromResourceLimit(ResourceLimit in) { return this .account(in.getAccount()) .domain(in.getDomain()) .domainId(in.getDomainId()) .max(in.getMax()) .resourceType(in.getResourceType()); } }
public T fromResourceLimit(ResourceLimit in) { return this .account(in.getAccount()) .domain(in.getDomain()) .domainId(in.getDomainId()) .max(in.getMax()) .resourceType(in.getResourceType()); } }
public T fromResourceLimit(ResourceLimit in) { return this .account(in.getAccount()) .domain(in.getDomain()) .domainId(in.getDomainId()) .max(in.getMax()) .resourceType(in.getResourceType()); } }